From 15f871ebb43e49f96e8f7e2ec95359bc0a05545f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 7 Dec 2016 18:28:15 +0300 Subject: no need to calculate button width each time --- plugins/Scriver/src/chat/window.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'plugins/Scriver/src/chat') diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index ce1168ceb6..06a8dce233 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -950,8 +950,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR if (!cbd->m_bChatButton) continue; - int width = (cbd->m_dwArrowCID) ? 34 : 22; - HWND hwndButton = CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, width, 22, hwndDlg, (HMENU)cbd->m_dwButtonCID, g_hInst, NULL); + HWND hwndButton = CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, cbd->m_iButtonWidth, 22, hwndDlg, (HMENU)cbd->m_dwButtonCID, g_hInst, NULL); SendMessage(hwndButton, BUTTONSETASFLATBTN, TRUE, 0); if (cbd->m_pwszTooltip) SendMessage(hwndButton, BUTTONADDTOOLTIP, LPARAM(cbd->m_pwszTooltip), BATF_UNICODE); -- cgit v1.2.3