summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/unix/CPP/Windows/Window.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/7zip/unix/CPP/Windows/Window.h')
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Window.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/libs/7zip/unix/CPP/Windows/Window.h b/src/libs/7zip/unix/CPP/Windows/Window.h
new file mode 100644
index 000000000..1970fe62d
--- /dev/null
+++ b/src/libs/7zip/unix/CPP/Windows/Window.h
@@ -0,0 +1,43 @@
+// Windows/Window.h
+
+#ifndef __WINDOWS_WINDOW_H
+#define __WINDOWS_WINDOW_H
+
+#include "Windows/Defs.h"
+#include "Common/MyString.h"
+
+namespace NWindows {
+
+HWND GetDlgItem(HWND dialogWindow, int ControlID);
+void MySetWindowText(HWND wnd, LPCWSTR s);
+
+class CWindow
+{
+private:
+ // bool ModifyStyleBase(int styleOffset, DWORD remove, DWORD add, UINT flags);
+protected:
+ HWND _window;
+public:
+ CWindow(HWND newWindow = NULL): _window(newWindow){};
+ CWindow& operator=(HWND newWindow)
+ {
+ _window = newWindow;
+ return *this;
+ }
+ operator HWND() const { return _window; }
+ void Attach(HWND newWindow) { _window = newWindow; }
+ HWND Detach()
+ {
+ HWND window = _window;
+ _window = NULL;
+ return window;
+ }
+ virtual void SetText(LPCWSTR s) { MySetWindowText(_window, s); }
+ virtual bool GetText(CSysString &s);
+ bool IsEnabled();
+};
+
+}
+
+#endif
+