summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-17 19:59:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-17 19:59:32 +0300
commit34d9db73c26ad24b1f8bf1e5a1949c407c9639ca (patch)
tree4e8875c6e3b9a18b947963edf9088aa0d915f9c0 /src/mir_app
parent83175855d796e139c67d145e710336ec44660319 (diff)
- tabSRMM to share the kernel window list for chats & group chats;
- button creation nuances moved to the core
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index 88f79dc544..aeff306fdf 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -327,7 +327,7 @@ MIR_APP_DLL(void) Srmm_CreateToolbarIcons(HWND hwndDlg, int flags)
HWND hwndButton = GetDlgItem(hwndDlg, cbd->m_dwButtonCID);
if ((flags & BBBF_ISIMBUTTON) && cbd->m_bIMButton || (flags & BBBF_ISCHATBUTTON) && cbd->m_bChatButton) {
if (hwndButton == NULL) {
- hwndButton = CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, cbd->m_iButtonWidth, 22, hwndDlg, (HMENU)cbd->m_dwButtonCID, hInstance, NULL);
+ hwndButton = CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, cbd->m_iButtonWidth, DPISCALEX_S(22), hwndDlg, (HMENU)cbd->m_dwButtonCID, hInstance, NULL);
if (hwndButton == NULL) // smth went wrong
continue;
}
@@ -338,6 +338,16 @@ MIR_APP_DLL(void) Srmm_CreateToolbarIcons(HWND hwndDlg, int flags)
SendMessage(hwndButton, BUTTONADDTOOLTIP, LPARAM(cbd->m_pwszTooltip), BATF_UNICODE);
if (cbd->m_hIcon)
SendMessage(hwndButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon));
+
+ if (cbd->m_dwArrowCID)
+ SendMessage(hwndButton, BUTTONSETARROW, cbd->m_dwArrowCID, 0);
+ if (cbd->m_bPushButton)
+ SendMessage(hwndButton, BUTTONSETASPUSHBTN, TRUE, 0);
+
+ if (cbd->m_bDisabled)
+ EnableWindow(hwndButton, FALSE);
+ if (cbd->m_bHidden)
+ ShowWindow(hwndButton, SW_HIDE);
}
else if (hwndButton)
DestroyWindow(hwndButton);