diff options
author | George Hazan <ghazan@miranda.im> | 2016-12-01 19:33:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-12-01 19:33:35 +0300 |
commit | 06fc3d811d71a44b92d45e1263e5fb0099a7304e (patch) | |
tree | cbcdafbcddacab601a6d47321ec09aac5d5e5c0c /plugins/TabSRMM/src/chat | |
parent | bd408d296ccfa16dba379f3820a2007ff6963a6a (diff) |
toolbar icons processing code moved to mir_app
Diffstat (limited to 'plugins/TabSRMM/src/chat')
-rw-r--r-- | plugins/TabSRMM/src/chat/chat_resource.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 22 |
2 files changed, 11 insertions, 12 deletions
diff --git a/plugins/TabSRMM/src/chat/chat_resource.h b/plugins/TabSRMM/src/chat/chat_resource.h index 4ae21e844e..1674adf3e5 100644 --- a/plugins/TabSRMM/src/chat/chat_resource.h +++ b/plugins/TabSRMM/src/chat/chat_resource.h @@ -89,7 +89,6 @@ #define IDC_10 1209
#define IDC_11 1210
#define IDC_PANELSPLITTER 1216
-#define IDC_CHAT_TOGGLESIDEBAR 1277
#define IDC_P1 1300
#define IDC_P2 1301
#define IDC_P3 1302
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index f67ccbdcc2..646a4398f1 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -1658,17 +1658,17 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar GetMYUIN(dat); GetMyNick(dat); - CustomizeButton(CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, 6, DPISCALEY_S(20), - hwndDlg, (HMENU)IDC_CHAT_TOGGLESIDEBAR, g_hInst, NULL)); - SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASTHEMEDBTN, 1, 0); - SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0); - SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASFLATBTN, FALSE, 0); - SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASTOOLBARBUTTON, TRUE, 0); - SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Expand or collapse the side bar"), BATF_UNICODE); + HWND hwndBtn = CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, 6, DPISCALEY_S(20), hwndDlg, (HMENU)IDC_TOGGLESIDEBAR, g_hInst, NULL); + CustomizeButton(hwndBtn); + SendMessage(hwndBtn, BUTTONSETASTHEMEDBTN, 1, 0); + SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0); + SendMessage(hwndBtn, BUTTONSETASFLATBTN, FALSE, 0); + SendMessage(hwndBtn, BUTTONSETASTOOLBARBUTTON, TRUE, 0); + SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Expand or collapse the side bar"), BATF_UNICODE); DM_InitTip(dat); BB_InitDlgButtons(dat); - SendMessage(hwndDlg, DM_LOADBUTTONBARICONS, 0, 0); + SendMessage(hwndDlg, WM_CBD_LOADICONS, 0, 0); mir_subclassWindow(GetDlgItem(hwndDlg, IDC_SPLITTERX), SplitterSubclassProc); mir_subclassWindow(GetDlgItem(hwndDlg, IDC_SPLITTERY), SplitterSubclassProc); @@ -1706,8 +1706,8 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar PostMessage(hwndDlg, GC_REDRAWLOG, 0, 0); break; - case DM_LOADBUTTONBARICONS: - BB_UpdateIcons(hwndDlg); + case WM_CBD_LOADICONS: + Srmm_UpdateToolbarIcons(hwndDlg); return 0; case GC_SETWNDPROPS: @@ -2647,7 +2647,7 @@ LABEL_SHOWWINDOW: RedrawWindow(GetDlgItem(hwndDlg, IDC_LIST), NULL, NULL, RDW_INVALIDATE); break; - case IDC_CHAT_TOGGLESIDEBAR: + case IDC_TOGGLESIDEBAR: SendMessage(dat->pContainer->hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0); break; |