diff options
Diffstat (limited to 'installerbuilder/libinstaller/3rdparty/p7zip_9.04/unix/CPP/7zip/UI/Explorer/MyMessages.cpp')
-rw-r--r-- | installerbuilder/libinstaller/3rdparty/p7zip_9.04/unix/CPP/7zip/UI/Explorer/MyMessages.cpp | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/installerbuilder/libinstaller/3rdparty/p7zip_9.04/unix/CPP/7zip/UI/Explorer/MyMessages.cpp b/installerbuilder/libinstaller/3rdparty/p7zip_9.04/unix/CPP/7zip/UI/Explorer/MyMessages.cpp new file mode 100644 index 000000000..62ac42ec1 --- /dev/null +++ b/installerbuilder/libinstaller/3rdparty/p7zip_9.04/unix/CPP/7zip/UI/Explorer/MyMessages.cpp @@ -0,0 +1,58 @@ +// MyMessages.cpp + +#include "StdAfx.h" + +#include "MyMessages.h" + +#include "Windows/Error.h" +#include "Windows/ResourceString.h" + +#ifdef LANG +#include "../FileManager/LangUtils.h" +#endif + +using namespace NWindows; + +void ShowErrorMessage(HWND window, LPCWSTR message) +{ + ::MessageBoxW(window, message, L"7-Zip", MB_OK | MB_ICONSTOP); +} + +void ShowErrorMessageHwndRes(HWND window, UINT resID + #ifdef LANG + , UInt32 langID + #endif + ) +{ + ShowErrorMessage(window, + #ifdef LANG + LangString(resID, langID) + #else + MyLoadStringW(resID) + #endif + ); +} + +void ShowErrorMessageRes(UINT resID + #ifdef LANG + , UInt32 langID + #endif + ) +{ + ShowErrorMessageHwndRes(0, resID + #ifdef LANG + , langID + #endif + ); +} + +void ShowErrorMessageDWORD(HWND window, DWORD errorCode) +{ + ShowErrorMessage(window, NError::MyFormatMessageW(errorCode)); +} + +void ShowLastErrorMessage(HWND window) +{ + ShowErrorMessageDWORD(window, ::GetLastError()); +} + |