summaryrefslogtreecommitdiff
path: root/include/m_message.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-01 20:51:42 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-01 21:49:54 +0300
commitf9c7760f54c279327a977b0cb5ee028c8f0c0bfb (patch)
tree0a1cf4602a5eac89dc38606cc91981c2166a83e0 /include/m_message.h
parent40203d30ad1a569cfea61442782393b200e9fbe3 (diff)
more fixes
Diffstat (limited to 'include/m_message.h')
-rw-r--r--include/m_message.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/m_message.h b/include/m_message.h
index 402c62f880..f5106c4ce9 100644
--- a/include/m_message.h
+++ b/include/m_message.h
@@ -285,8 +285,37 @@ EXTERN_C MIR_APP_DLL(void) Srmm_RedrawToolbarIcons(HWND hwndDlg);
#define ME_MSG_TOOLBARLOADED "SRMM/ButtonsBar/ModuleLoaded"
/////////////////////////////////////////////////////////////////////////////////////////
+// toolbar button clicked event
+
+EXTERN_C MIR_APP_DLL(void) Srmm_ClickToolbarIcon(MCONTACT hContact, DWORD idFrom, HWND hwndFrom, BOOL code);
+
+// wParam = (HANDLE)hContact;
+// lParam = (CustomButtonClickData *)&CustomButtonClickData;
+// catch to show a popup menu, etc.
+#define ME_MSG_BUTTONPRESSED "SRMM/ButtonsBar/ButtonPressed"
+
+// event flags
+#define BBCF_RIGHTBUTTON (1<<0)
+#define BBCF_SHIFTPRESSED (1<<1)
+#define BBCF_CONTROLPRESSED (1<<2)
+#define BBCF_ARROWCLICKED (1<<3)
+
+struct CustomButtonClickData
+{
+ char *pszModule; // button owners name
+ POINT pt; // screen coordinates for menus
+ DWORD dwButtonId; // registered button ID
+ HWND hwndFrom; // button parents HWND
+ MCONTACT hContact;
+ DWORD flags; // BBCF_ flags
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
// toolbar button internal representation
+#define MIN_CBUTTONID 4000
+#define MAX_CBUTTONID 5000
+
#define BBSF_IMBUTTON (1<<0)
#define BBSF_CHATBUTTON (1<<1)
#define BBSF_CANBEHIDDEN (1<<2)