From 607a3e9ede6147e4667a564ed685132906e1a1fa Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Tue, 20 Aug 2013 20:09:05 +0000 Subject: Tlen: Fixed username in options (forgotten subclassing). partial fix for #447. git-svn-id: http://svn.miranda-ng.org/main/trunk@5763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tlen/src/tlen_opt.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'protocols') diff --git a/protocols/Tlen/src/tlen_opt.cpp b/protocols/Tlen/src/tlen_opt.cpp index ceb5afe8e7..08faa0770e 100644 --- a/protocols/Tlen/src/tlen_opt.cpp +++ b/protocols/Tlen/src/tlen_opt.cpp @@ -82,7 +82,7 @@ static void MarkChanges(int i, HWND hWnd) { } -int TlenProtocol::OptionsInit(WPARAM wParam, LPARAM lParam) +int TlenProtocol::OptionsInit(WPARAM wParam, LPARAM) { OPTIONSDIALOGPAGE odp = { sizeof(odp) }; odp.hInstance = hInst; @@ -191,7 +191,6 @@ INT_PTR CALLBACK TlenAccMgrUIDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR static INT_PTR CALLBACK TlenBasicOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { char text[256]; - WNDPROC oldProc; TlenProtocol *proto = (TlenProtocol *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); switch (msg) { @@ -249,9 +248,7 @@ static INT_PTR CALLBACK TlenBasicOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,ID_STATUS_INVISIBLE,GSMDF_TCHAR)); SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_SETCURSEL, proto->tlenOptions.offlineMessageOption, 0); - oldProc = (WNDPROC) GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EDIT_USERNAME), GWLP_WNDPROC); - SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EDIT_USERNAME), GWLP_USERDATA, (LONG_PTR) oldProc); - SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EDIT_USERNAME), GWLP_WNDPROC, (LONG_PTR) TlenValidateUsernameWndProc); + mir_subclassWindow(GetDlgItem(hwndDlg, IDC_EDIT_USERNAME), TlenValidateUsernameWndProc); return TRUE; } case WM_COMMAND: -- cgit v1.2.3