summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src/main_window.cpp
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/DbEditorPP/src/main_window.cpp
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/DbEditorPP/src/main_window.cpp')
-rw-r--r--plugins/DbEditorPP/src/main_window.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp
index c1608498a6..814361037d 100644
--- a/plugins/DbEditorPP/src/main_window.cpp
+++ b/plugins/DbEditorPP/src/main_window.cpp
@@ -9,8 +9,6 @@ int Hex;
extern BOOL bServiceMode;
-static WNDPROC SettingListSubClass, ModuleTreeSubClass, SplitterSubClass;
-
void moduleListWM_NOTIFY(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
void SettingsListWM_NOTIFY(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
@@ -79,7 +77,7 @@ static LRESULT CALLBACK SplitterSubclassProc(HWND hwnd,UINT msg,WPARAM wParam,LP
return 0;
}
- return CallWindowProc(SplitterSubClass,hwnd,msg,wParam,lParam);
+ return mir_callNextSubclass(hwnd, SplitterSubclassProc, msg, wParam, lParam);
}
LRESULT CALLBACK ModuleTreeSubclassProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
@@ -149,7 +147,7 @@ LRESULT CALLBACK ModuleTreeSubclassProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM
}
break;
}
- return CallWindowProc(ModuleTreeSubClass,hwnd,msg,wParam,lParam);
+ return mir_callNextSubclass(hwnd, ModuleTreeSubclassProc, msg, wParam, lParam);
}
static LRESULT CALLBACK SettingListSubclassProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
@@ -186,7 +184,7 @@ static LRESULT CALLBACK SettingListSubclassProc(HWND hwnd,UINT msg,WPARAM wParam
CreateDialog(hInst, MAKEINTRESOURCE(IDD_FIND), hwnd, FindWindowDlgProc);
break;
}
- return CallWindowProc(SettingListSubClass,hwnd,msg,wParam,lParam);
+ return mir_callNextSubclass(hwnd, SettingListSubclassProc, msg, wParam, lParam);
}
INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -203,13 +201,13 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
// setup the splitter
SetWindowLongPtr(GetDlgItem(hwnd,IDC_SPLITTER),GWLP_USERDATA,(LPARAM)DBGetContactSettingWord(NULL, modname, "Splitter", 300));
SendMessage(hwnd, GC_SPLITTERMOVED, 0,0);
- SplitterSubClass=(WNDPROC)SetWindowLongPtr(GetDlgItem(hwnd,IDC_SPLITTER),GWLP_WNDPROC,(LONG)SplitterSubclassProc);
+ mir_subclassWindow(GetDlgItem(hwnd,IDC_SPLITTER), SplitterSubclassProc);
// module tree
TreeView_SetUnicodeFormat(GetDlgItem(hwnd,IDC_MODULES), TRUE);
- ModuleTreeSubClass=(WNDPROC)SetWindowLongPtr(GetDlgItem(hwnd,IDC_MODULES),GWLP_WNDPROC,(LONG)ModuleTreeSubclassProc);
+ mir_subclassWindow(GetDlgItem(hwnd,IDC_MODULES), ModuleTreeSubclassProc);
//setting list
setupSettingsList(GetDlgItem(hwnd,IDC_SETTINGS));
- SettingListSubClass=(WNDPROC)SetWindowLongPtr(GetDlgItem(hwnd,IDC_SETTINGS),GWLP_WNDPROC,(LONG)SettingListSubclassProc);
+ mir_subclassWindow(GetDlgItem(hwnd,IDC_SETTINGS), SettingListSubclassProc);
HMENU hMenu = GetMenu(hwnd);
TranslateMenu(hMenu);
@@ -420,9 +418,6 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
ImageList_Destroy(himl);
if (himl2)
ImageList_Destroy(himl2);
- SetWindowLongPtr(GetDlgItem(hwnd,IDC_SETTINGS),GWLP_WNDPROC,(LONG)SettingListSubClass);
- SetWindowLongPtr(GetDlgItem(hwnd,IDC_MODULES),GWLP_WNDPROC,(LONG)ModuleTreeSubClass);
- SetWindowLongPtr(GetDlgItem(hwnd,IDC_SPLITTER),GWLP_WNDPROC,(LONG)SplitterSubClass);
if (!DBGetContactSettingByte(NULL,modname,"Maximised",0)) {
RECT rc;