diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-04 23:23:45 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-04 23:23:45 +0000 |
commit | 15855fa84a09fd1fd486d357c38db0f2bd181e74 (patch) | |
tree | c98d1ae74abca41c776522059343eda13a7e0a31 /plugins/HistoryStats/src/dlgoption_subbase.cpp | |
parent | 819f8efabea6b0d7d971f9e6e4b21bbc18838874 (diff) |
HistoryStats compiles ok now
git-svn-id: http://svn.miranda-ng.org/main/trunk@8399 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryStats/src/dlgoption_subbase.cpp')
-rw-r--r-- | plugins/HistoryStats/src/dlgoption_subbase.cpp | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/plugins/HistoryStats/src/dlgoption_subbase.cpp b/plugins/HistoryStats/src/dlgoption_subbase.cpp new file mode 100644 index 0000000000..921195d4c9 --- /dev/null +++ b/plugins/HistoryStats/src/dlgoption_subbase.cpp @@ -0,0 +1,76 @@ +#include "_globals.h"
+#include "dlgoption.h"
+
+#include "main.h"
+
+/*
+ * DlgOption::SubBase
+ */
+
+INT_PTR CALLBACK DlgOption::SubBase::staticDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ SubBase* pDlg = reinterpret_cast<SubBase*>(GetWindowLong(hDlg, DWLP_USER));
+
+ switch (msg)
+ {
+ case WM_INITDIALOG:
+ pDlg = reinterpret_cast<SubBase*>(lParam);
+ SetWindowLong(hDlg, DWLP_USER, reinterpret_cast<LONG>(pDlg));
+ pDlg->m_hWnd = hDlg;
+ pDlg->onWMInitDialog();
+ pDlg->loadSettings();
+ return TRUE;
+
+ case WM_DESTROY:
+ pDlg->onWMDestroy();
+ delete pDlg;
+ SetWindowLong(hDlg, DWLP_USER, 0);
+ return TRUE;
+ }
+
+ return pDlg ? pDlg->handleMsg(msg, wParam, lParam) : FALSE;
+}
+
+DlgOption::SubBase::SubBase()
+ : m_pParent(NULL), m_hWnd(NULL)
+{
+}
+
+DlgOption::SubBase::~SubBase()
+{
+}
+
+void DlgOption::SubBase::createWindow(DlgOption* pParent, WORD nDlgResource, const RECT& rect)
+{
+ m_pParent = pParent;
+
+ CreateDialogParam(
+ g_hInst,
+ MAKEINTRESOURCE(nDlgResource),
+ m_pParent->getHWnd(),
+ staticDlgProc,
+ reinterpret_cast<LPARAM>(this));
+
+ MoveWindow(
+ m_hWnd,
+ rect.left,
+ rect.top,
+ rect.right - rect.left,
+ rect.bottom - rect.top, TRUE);
+}
+
+void DlgOption::SubBase::destroyWindow()
+{
+ if (m_hWnd)
+ {
+ DestroyWindow(m_hWnd);
+
+ // exit NOW since we destroyed ourselves
+ return;
+ }
+}
+
+void DlgOption::SubBase::moveWindow(const RECT& rWnd)
+{
+ utils::moveWindow(m_hWnd, rWnd);
+}
|