summaryrefslogtreecommitdiff
path: root/src/modules/clist/clcutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/clist/clcutils.cpp')
-rw-r--r--src/modules/clist/clcutils.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/clist/clcutils.cpp b/src/modules/clist/clcutils.cpp
index fb5053bd00..b4873b9d03 100644
--- a/src/modules/clist/clcutils.cpp
+++ b/src/modules/clist/clcutils.cpp
@@ -457,7 +457,6 @@ void fnDeleteFromContactList(HWND hwnd, struct ClcData *dat)
}
}
-static WNDPROC OldRenameEditWndProc;
static LRESULT CALLBACK RenameEditSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
@@ -484,7 +483,7 @@ static LRESULT CALLBACK RenameEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPara
cli.pfnEndRename(GetParent(hwnd), (struct ClcData *) GetWindowLongPtr(GetParent(hwnd), 0), 1);
return 0;
}
- return CallWindowProc(OldRenameEditWndProc, hwnd, msg, wParam, lParam);
+ return mir_callNextSubclass(hwnd, RenameEditSubclassProc, msg, wParam, lParam);
}
void fnBeginRenameSelection(HWND hwnd, struct ClcData *dat)
@@ -507,7 +506,7 @@ void fnBeginRenameSelection(HWND hwnd, struct ClcData *dat)
cli.pfnCalcEipPosition(dat, contact, group, &pt);
int h = cli.pfnGetRowHeight(dat, dat->selection);
dat->hwndRenameEdit = CreateWindow(_T("EDIT"), contact->szText, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL, pt.x, pt.y, clRect.right - pt.x, h, hwnd, NULL, cli.hInst, NULL);
- 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->fontInfo[FONTID_GROUPS].hFont : dat->fontInfo[FONTID_CONTACTS].hFont), 0);
SendMessage(dat->hwndRenameEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN | EC_USEFONTINFO, 0);
SendMessage(dat->hwndRenameEdit, EM_SETSEL, 0, (LPARAM) (-1));