other-licenses/7zstub/src/7zip/UI/Explorer/MyMessages.cpp

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 // MyMessages.cpp
michael@0 2
michael@0 3 #include "StdAfx.h"
michael@0 4
michael@0 5 #include "MyMessages.h"
michael@0 6 #include "Common/String.h"
michael@0 7 #include "Common/StringConvert.h"
michael@0 8
michael@0 9 #include "Windows/Error.h"
michael@0 10 #include "Windows/ResourceString.h"
michael@0 11
michael@0 12 #ifdef LANG
michael@0 13 #include "../../FileManager/LangUtils.h"
michael@0 14 #endif
michael@0 15
michael@0 16 using namespace NWindows;
michael@0 17
michael@0 18 void MyMessageBox(HWND window, LPCWSTR message)
michael@0 19 {
michael@0 20 ::MessageBoxW(window, message, L"7-Zip", 0);
michael@0 21 }
michael@0 22
michael@0 23 void MyMessageBox(UINT32 id
michael@0 24 #ifdef LANG
michael@0 25 ,UINT32 langID
michael@0 26 #endif
michael@0 27 )
michael@0 28 {
michael@0 29 #ifdef LANG
michael@0 30 MyMessageBox(LangString(id, langID));
michael@0 31 #else
michael@0 32 MyMessageBox(MyLoadStringW(id));
michael@0 33 #endif
michael@0 34 }
michael@0 35
michael@0 36 void ShowErrorMessage(HWND window, DWORD message)
michael@0 37 {
michael@0 38 MyMessageBox(window, NError::MyFormatMessageW(message));
michael@0 39 }
michael@0 40
michael@0 41 void ShowLastErrorMessage(HWND window)
michael@0 42 {
michael@0 43 ShowErrorMessage(window, ::GetLastError());
michael@0 44 }
michael@0 45

mercurial