From 66cb770a982a2502456d10d73838df2b7239fd89 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 4 Mar 2013 07:23:42 +0000 Subject: new subclassing functions applied to all plugins git-svn-id: http://svn.miranda-ng.org/main/trunk@3880 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdfile/fileexistsdlg.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/core/stdfile/fileexistsdlg.cpp') diff --git a/src/core/stdfile/fileexistsdlg.cpp b/src/core/stdfile/fileexistsdlg.cpp index 4efb73ebfb..8729229462 100644 --- a/src/core/stdfile/fileexistsdlg.cpp +++ b/src/core/stdfile/fileexistsdlg.cpp @@ -112,24 +112,23 @@ static void DoAnnoyingShellCommand(HWND hwnd, const TCHAR *szFilename, int cmd, } } -static WNDPROC pfnIconWindowProc; static LRESULT CALLBACK IconCtrlSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { PROTOFILETRANSFERSTATUS* pft = (PROTOFILETRANSFERSTATUS*)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA); switch(msg) { - case WM_LBUTTONDBLCLK: - ShellExecute(hwnd, NULL, pft->tszCurrentFile, NULL, NULL, SW_SHOW); - break; - case WM_RBUTTONUP: + case WM_LBUTTONDBLCLK: + ShellExecute(hwnd, NULL, pft->tszCurrentFile, NULL, NULL, SW_SHOW); + break; + case WM_RBUTTONUP: { POINT pt; - pt.x = (short)LOWORD(lParam); pt.y = (short)HIWORD(lParam); - ClientToScreen(hwnd, &pt); - DoAnnoyingShellCommand(hwnd, pft->tszCurrentFile, C_CONTEXTMENU, &pt); - return 0; + pt.x = (short)LOWORD(lParam); pt.y = (short)HIWORD(lParam); + ClientToScreen(hwnd, &pt); + DoAnnoyingShellCommand(hwnd, pft->tszCurrentFile, C_CONTEXTMENU, &pt); + return 0; } } - return CallWindowProc(pfnIconWindowProc, hwnd, msg, wParam, lParam); + return mir_callNextSubclass(hwnd, IconCtrlSubclassProc, msg, wParam, lParam); } struct loadiconsstartinfo { @@ -215,7 +214,7 @@ INT_PTR CALLBACK DlgProcFileExists(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM GetSensiblyFormattedSize(fts->currentFileSize, szSize, SIZEOF(szSize), 0, 1, NULL); SetDlgItemText(hwndDlg, IDC_NEWSIZE, szSize); - pfnIconWindowProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EXISTINGICON), GWLP_WNDPROC, (LONG_PTR)IconCtrlSubclassProc); + mir_subclassWindow( GetDlgItem(hwndDlg, IDC_EXISTINGICON), IconCtrlSubclassProc); hwndFocus = GetDlgItem(hwndDlg, IDC_RESUME); if (_tstati64(fts->tszCurrentFile, &statbuf) == 0) { -- cgit v1.2.3