aboutsummaryrefslogtreecommitdiff
path: root/CPP/7zip/UI/Explorer
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2015-05-11 12:31:23 +0100
committerDavid Srbecky <dsrbecky@google.com>2015-05-13 01:06:58 +0100
commitcd66d540cead3f8200b0c73bad9c276d67896c3d (patch)
treed25a4a409bd041f18b856e156cf1fa71f6169369 /CPP/7zip/UI/Explorer
parentb473eaa2840cccf2fef15d53f00bccf92c41b615 (diff)
downloadlzma-cd66d540cead3f8200b0c73bad9c276d67896c3d.tar.gz
Updated LZMA SDK to 9.38 beta.
The webpage says "If you use XZ code from LZMA SDK, it's recommended to upgrade to new XZ code from 7-Zip 9.38 beta. That new code fixes some bugs." and we do use the XZ code. The code is identical to the stock LZMA SDK with the following changes: deleted bin/ added C/Util/Lzma/Android.mk added MODULE_LICENSE_PUBLIC_DOMAIN added NOTICE added xz-embedded/ Change-Id: Ibc5d353748420f7b3ae2877d625d7ddb788bdc6e
Diffstat (limited to 'CPP/7zip/UI/Explorer')
-rw-r--r--CPP/7zip/UI/Explorer/MyMessages.cpp37
-rw-r--r--CPP/7zip/UI/Explorer/MyMessages.h16
2 files changed, 53 insertions, 0 deletions
diff --git a/CPP/7zip/UI/Explorer/MyMessages.cpp b/CPP/7zip/UI/Explorer/MyMessages.cpp
new file mode 100644
index 0000000..1ef0d9c
--- /dev/null
+++ b/CPP/7zip/UI/Explorer/MyMessages.cpp
@@ -0,0 +1,37 @@
+// MyMessages.cpp
+
+#include "StdAfx.h"
+
+#include "MyMessages.h"
+
+#include "../../../Windows/ErrorMsg.h"
+#include "../../../Windows/ResourceString.h"
+
+#include "../FileManager/LangUtils.h"
+
+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)
+{
+ ShowErrorMessage(window, LangString(resID));
+}
+
+void ShowErrorMessageRes(UINT resID)
+{
+ ShowErrorMessageHwndRes(0, resID);
+}
+
+void ShowErrorMessageDWORD(HWND window, DWORD errorCode)
+{
+ ShowErrorMessage(window, NError::MyFormatMessage(errorCode));
+}
+
+void ShowLastErrorMessage(HWND window)
+{
+ ShowErrorMessageDWORD(window, ::GetLastError());
+}
diff --git a/CPP/7zip/UI/Explorer/MyMessages.h b/CPP/7zip/UI/Explorer/MyMessages.h
new file mode 100644
index 0000000..c175e8a
--- /dev/null
+++ b/CPP/7zip/UI/Explorer/MyMessages.h
@@ -0,0 +1,16 @@
+// MyMessages.h
+
+#ifndef __MY_MESSAGES_H
+#define __MY_MESSAGES_H
+
+#include "../../../Common/MyString.h"
+
+void ShowErrorMessage(HWND window, LPCWSTR message);
+inline void ShowErrorMessage(LPCWSTR message) { ShowErrorMessage(0, message); }
+
+void ShowErrorMessageHwndRes(HWND window, UInt32 langID);
+void ShowErrorMessageRes(UInt32 langID);
+
+void ShowLastErrorMessage(HWND window = 0);
+
+#endif