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/modules/database/profilemanager.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/modules/database') diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp index d597d50a3f..67589a9d25 100644 --- a/src/modules/database/profilemanager.cpp +++ b/src/modules/database/profilemanager.cpp @@ -155,7 +155,7 @@ static LRESULT CALLBACK ProfileNameValidate(HWND edit, UINT msg, WPARAM wParam, return 0; PostMessage(GetParent(edit), WM_INPUTCHANGED, 0, 0); } - return CallWindowProc((WNDPROC)GetWindowLongPtr(edit, GWLP_USERDATA), edit, msg, wParam, lParam); + return mir_callNextSubclass(edit, ProfileNameValidate, msg, wParam, lParam); } static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -187,10 +187,7 @@ static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPA SendMessage(hwndCombo, CB_SETCURSEL, 0, 0); // subclass the profile name box - HWND hwndProfile = GetDlgItem(hwndDlg, IDC_PROFILENAME); - WNDPROC proc = (WNDPROC)GetWindowLongPtr(hwndProfile, GWLP_WNDPROC); - SetWindowLongPtr(hwndProfile, GWLP_USERDATA, (LONG_PTR)proc); - SetWindowLongPtr(hwndProfile, GWLP_WNDPROC, (LONG_PTR)ProfileNameValidate); + mir_subclassWindow(GetDlgItem(hwndDlg, IDC_PROFILENAME), ProfileNameValidate); } // decide if there is a default profile name given in the INI and if it should be used -- cgit v1.2.3