diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-13 14:15:27 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-13 14:15:27 +0000 |
commit | 3fe0fd0f99ff17216b9cb8b479c5c8c77d4e1c3c (patch) | |
tree | 0ab2490c376951b80b32235b602189cdb35a7c27 /plugins/TabSRMM | |
parent | cda582b4409add7b8fd8ff29fef9debb90267c88 (diff) |
more correct variant of the previous patch
git-svn-id: http://svn.miranda-ng.org/main/trunk@5668 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/TSButton.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
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");
+
}
|