From 5fea43e9b07b966fe023105bfd9a224bfbb00e7b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 10 Dec 2016 15:50:53 +0300 Subject: - ability to pass a button's text to a toolbar button; - common code moved into the core --- include/m_message.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/m_message.h b/include/m_message.h index 6136e50676..9df503b6d0 100644 --- a/include/m_message.h +++ b/include/m_message.h @@ -238,14 +238,15 @@ struct StatusIconClickData struct BBButton { - char *pszModuleName; // module name without spaces and underline symbols (e.g. "tabsrmm") - DWORD dwButtonID; // your button ID, will be combined with pszModuleName for storing settings, etc... - - wchar_t *pwszTooltip; - DWORD dwDefPos; // default order pos of button, counted from window edge (left or right) - // use value >100, because internal buttons using 10,20,30... 80, etc - DWORD bbbFlags; // combine of BBBF_ flags above - HANDLE hIcon; // Handle to icolib registered icon + const char *pszModuleName; // module name without spaces and underline symbols (e.g. "tabsrmm") + DWORD dwButtonID; // your button ID, will be combined with pszModuleName for storing settings, etc... + + const wchar_t *pwszText; // button's text, might be NULL + const wchar_t *pwszTooltip; // button's tooltip, might be NULL + DWORD dwDefPos; // default order pos of button, counted from window edge (left or right) + // use value >100, because internal buttons using 10,20,30... 80, etc + DWORD bbbFlags; // combine of BBBF_ flags above + HANDLE hIcon; // Handle to icolib registered icon }; // adds a new toolbar button @@ -272,6 +273,10 @@ EXTERN_C MIR_APP_DLL(int) Srmm_SetButtonState(MCONTACT hContact, BBButton *bbdi) // returns 0 on success and nonzero value otherwise EXTERN_C MIR_APP_DLL(void) Srmm_ResetToolbar(); +// creates toolbar buttons for a SRMM window +// flags might be either BBBF_ISIMBUTTON or BBBF_ISCHATBUTTON, depending on a window type +EXTERN_C MIR_APP_DLL(void) Srmm_CreateToolbarIcons(HWND hwndDlg, int flags); + // updates all toolbar icons in a message dialog EXTERN_C MIR_APP_DLL(void) Srmm_UpdateToolbarIcons(HWND hdlg); @@ -334,6 +339,7 @@ struct CustomButtonData : public MZeroedObject DWORD m_dwButtonCID; DWORD m_dwArrowCID; // only use with BBBF_ISARROWBUTTON flag + ptrW m_pwszText; // button's text ptrW m_pwszTooltip; // button's tooltip int m_iButtonWidth; // must be 22 for regular button and 33 for button with arrow -- cgit v1.2.3