summaryrefslogtreecommitdiff
path: root/plugins/FTPFileYM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-04 07:23:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-04 07:23:42 +0000
commit66cb770a982a2502456d10d73838df2b7239fd89 (patch)
treefc419dde94a9be3ebe8f2266ff46feb90d2bcbec /plugins/FTPFileYM
parentbc256df33a57e585367edffe33d3e58d53f82ce8 (diff)
new subclassing functions applied to all plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@3880 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FTPFileYM')
-rw-r--r--plugins/FTPFileYM/src/dialog.cpp14
-rw-r--r--plugins/FTPFileYM/src/dialog.h3
2 files changed, 7 insertions, 10 deletions
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp
index 9553a42dae..20cbeb3105 100644
--- a/plugins/FTPFileYM/src/dialog.cpp
+++ b/plugins/FTPFileYM/src/dialog.cpp
@@ -22,7 +22,6 @@ UploadDialog *UploadDialog::instance = NULL;
UploadDialog *uDlg = NULL;
Mutex UploadDialog::mutexTabs;
-WNDPROC UploadDialog::oldTabControlProc;
extern Options &opt;
extern BOOL (WINAPI *MyEnableThemeDialogTexture)(HANDLE, DWORD);
@@ -141,12 +140,11 @@ void UploadDialog::Tab::labelCompleted()
TabCtrl_SetItem(uDlg->hwndTabs, this->index(), &tab);
}
-INT_PTR CALLBACK UploadDialog::TabControlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+LRESULT CALLBACK UploadDialog::TabControlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- switch (msg)
- {
- case WM_LBUTTONDBLCLK:
- case WM_MBUTTONDOWN:
+ switch (msg) {
+ case WM_LBUTTONDBLCLK:
+ case WM_MBUTTONDOWN:
{
POINT pt;
GetCursorPos(&pt);
@@ -163,7 +161,7 @@ INT_PTR CALLBACK UploadDialog::TabControlProc(HWND hwnd, UINT msg, WPARAM wParam
break;
}
- return CallWindowProc(UploadDialog::oldTabControlProc, hwnd, msg, wParam, lParam);
+ return mir_callNextSubclass(hwnd, UploadDialog::TabControlProc, msg, wParam, lParam);
}
INT_PTR CALLBACK UploadDialog::UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -175,7 +173,7 @@ INT_PTR CALLBACK UploadDialog::UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar
TranslateDialogDefault(hwndDlg);
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Utils::loadIconEx("main"));
- UploadDialog::oldTabControlProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TAB), GWLP_WNDPROC, (LONG_PTR)TabControlProc);
+ mir_subclassWindow(GetDlgItem(hwndDlg, IDC_TAB), TabControlProc);
LOGFONT logFont = {0};
HFONT hFont = (HFONT)SendMessage(GetDlgItem(hwndDlg, IDC_ST_FILE), WM_GETFONT, 0, 0);
diff --git a/plugins/FTPFileYM/src/dialog.h b/plugins/FTPFileYM/src/dialog.h
index 1c1cd38ff8..c7d3ceb81a 100644
--- a/plugins/FTPFileYM/src/dialog.h
+++ b/plugins/FTPFileYM/src/dialog.h
@@ -33,7 +33,6 @@ class UploadDialog
private:
static UploadDialog *instance;
static Mutex mutexTabs;
- static WNDPROC oldTabControlProc;
TCHAR stzToolTipText[1024];
UploadDialog();
@@ -79,6 +78,6 @@ public:
void selectTab(int index);
void show();
- static INT_PTR CALLBACK TabControlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+ static LRESULT CALLBACK TabControlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
static INT_PTR CALLBACK UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
}; \ No newline at end of file