diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-04 07:23:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-04 07:23:42 +0000 |
commit | 66cb770a982a2502456d10d73838df2b7239fd89 (patch) | |
tree | fc419dde94a9be3ebe8f2266ff46feb90d2bcbec /plugins/Clist_modern/src | |
parent | bc256df33a57e585367edffe33d3e58d53f82ce8 (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/Clist_modern/src')
-rw-r--r-- | plugins/Clist_modern/src/modern_clcutils.cpp | 16 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clui.cpp | 3 |
2 files changed, 7 insertions, 12 deletions
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index d1aac55e82..63a30b58de 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -234,14 +234,11 @@ void cliRecalcScrollBar(HWND hwnd,ClcData *dat) }
-static WNDPROC OldRenameEditWndProc;
static LRESULT CALLBACK RenameEditSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- switch(msg)
- {
+ switch(msg) {
case WM_KEYDOWN:
- switch(wParam)
- {
+ switch(wParam) {
case VK_RETURN:
pcli->pfnEndRename(GetParent(hwnd),(ClcData*)GetWindowLongPtr(hwnd,GWLP_USERDATA),1);
return 0;
@@ -251,8 +248,7 @@ static LRESULT CALLBACK RenameEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPara }
break;
case WM_GETDLGCODE:
- if (lParam)
- {
+ if (lParam) {
MSG *msg = (MSG*)lParam;
if (msg->message == WM_KEYDOWN && msg->wParam == VK_TAB) return 0;
if (msg->message == WM_CHAR && msg->wParam == '\t') return 0;
@@ -263,7 +259,7 @@ static LRESULT CALLBACK RenameEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPara SendMessage(pcli->hwndContactTree,WM_SIZE, 0, 0);
return 0;
}
- return CallWindowProc(OldRenameEditWndProc,hwnd,msg,wParam,lParam);
+ return mir_callNextSubclass(hwnd, RenameEditSubclassProc, msg, wParam, lParam);
}
void cliBeginRenameSelection(HWND hwnd,ClcData *dat)
@@ -335,11 +331,11 @@ void cliBeginRenameSelection(HWND hwnd,ClcData *dat) }
SetWindowLongPtr(dat->hwndRenameEdit,GWL_STYLE,GetWindowLongPtr(dat->hwndRenameEdit,GWL_STYLE)&(~WS_CAPTION)|WS_BORDER);
SetWindowLongPtr(dat->hwndRenameEdit,GWLP_USERDATA,(LONG_PTR)dat);
- OldRenameEditWndProc = (WNDPROC)SetWindowLongPtr(dat->hwndRenameEdit,GWLP_WNDPROC,(LONG_PTR)RenameEditSubclassProc);
+ mir_subclassWindow(dat->hwndRenameEdit, RenameEditSubclassProc);
SendMessage(dat->hwndRenameEdit,WM_SETFONT,(WPARAM)(contact->type == CLCIT_GROUP?dat->fontModernInfo[FONTID_OPENGROUPS].hFont:dat->fontModernInfo[FONTID_CONTACTS].hFont),0);
SendMessage(dat->hwndRenameEdit,EM_SETMARGINS,EC_LEFTMARGIN|EC_RIGHTMARGIN|EC_USEFONTINFO,0);
SendMessage(dat->hwndRenameEdit,EM_SETSEL, 0, (LPARAM)(-1));
- // SetWindowLongPtr(dat->hwndRenameEdit,GWLP_USERDATA,(LONG_PTR)hwnd);
+
r.top = 1;
r.bottom = h-1;
r.left = 0;
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index b8fb2365c3..f1e57fa4fc 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -1816,8 +1816,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) CLUI::SnappingToEdge( wp );
return DefWindowProc(m_hWnd,msg,wParam,lParam);
}
- switch (msg)
- {
+ switch (msg) {
case WM_DISPLAYCHANGE:
SendMessage(pcli->hwndContactTree, WM_SIZE, 0, 0);
return TRUE;
|