diff options
author | George Hazan <ghazan@miranda.im> | 2016-12-10 15:50:53 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-12-10 15:50:53 +0300 |
commit | 5fea43e9b07b966fe023105bfd9a224bfbb00e7b (patch) | |
tree | 5868406c223c0ed4cca707f258dc55c331844298 /plugins/Scriver/src/msgdialog.cpp | |
parent | 271558cf6114d70da75ed474d7c04fa707ae3369 (diff) |
- ability to pass a button's text to a toolbar button;
- common code moved into the core
Diffstat (limited to 'plugins/Scriver/src/msgdialog.cpp')
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 93d659545d..fd24b73a60 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -755,19 +755,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP PostMessage(GetDlgItem(hwndDlg, IDC_MESSAGE), EM_SETSEL, len, len);
}
- CustomButtonData *cbd;
- for (int i = 0; cbd = Srmm_GetNthButton(i); i++) {
- if (!cbd->m_bIMButton)
- continue;
-
- 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);
- if (cbd->m_hIcon)
- SendMessage(hwndButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon));
- }
-
+ Srmm_CreateToolbarIcons(hwndDlg, BBBF_ISIMBUTTON);
SendMessage(hwndDlg, DM_CHANGEICONS, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETOLECALLBACK, 0, (LPARAM)&reOleCallback);
|