From 3fe0fd0f99ff17216b9cb8b479c5c8c77d4e1c3c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 13 Aug 2013 14:15:27 +0000 Subject: more correct variant of the previous patch git-svn-id: http://svn.miranda-ng.org/main/trunk@5668 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/TSButton.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'plugins') diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp index 524644406d..8eea888d8f 100644 --- a/plugins/TabSRMM/src/TSButton.cpp +++ b/plugins/TabSRMM/src/TSButton.cpp @@ -500,13 +500,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, return 0; } - LRESULT res = mir_callNextSubclass(hwndDlg, TSButtonWndProc, msg, wParam, lParam); - - if (msg == WM_NCCREATE) - if (M.isVSAPIState()) - bct->hThemeToolbar = (M.isAero() || IsWinVerVistaPlus()) ? CMimAPI::m_pfnOpenThemeData(bct->hwnd, L"MENU") : CMimAPI::m_pfnOpenThemeData(bct->hwnd, L"TOOLBAR"); - - return res; + return mir_callNextSubclass(hwndDlg, TSButtonWndProc, msg, wParam, lParam); } int TSAPI UnloadTSButtonModule() @@ -524,4 +518,9 @@ void CustomizeButton(HWND hwndButton) SendMessage(hwndButton, BUTTONSETCUSTOMPAINT, sizeof(TSButtonCtrl), 0); mir_subclassWindow(hwndButton, TSButtonWndProc); + + TSButtonCtrl *bct = (TSButtonCtrl*)GetWindowLongPtr(hwndButton, 0); + if (bct && M.isVSAPIState()) + bct->hThemeToolbar = (M.isAero() || IsWinVerVistaPlus()) ? CMimAPI::m_pfnOpenThemeData(bct->hwnd, L"MENU") : CMimAPI::m_pfnOpenThemeData(bct->hwnd, L"TOOLBAR"); + } -- cgit v1.2.3