summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-21 10:37:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-21 10:37:30 +0000
commita971c497d5c86f11df8a048e3e9eb88691966169 (patch)
tree2570d81ccc8302aac31b3aaa299627679eeb367e /include
parent25bbf4a64df769564aa3b177712dfd21d910edab (diff)
- BUTTONSETSENDONDOWN functionality moved to the core;
- custom button click processing removed from clist_nicer; - control id assignment removed and replaced with the search by HWND git-svn-id: http://svn.miranda-ng.org/main/trunk@5440 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/m_button.h27
-rw-r--r--include/m_button_int.h15
2 files changed, 24 insertions, 18 deletions
diff --git a/include/m_button.h b/include/m_button.h
index c3b0dfabd7..e743bd61c9 100644
--- a/include/m_button.h
+++ b/include/m_button.h
@@ -27,38 +27,37 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MIRANDABUTTONCLASS _T("MButtonClass") // Class of the control
-
// Sets whether a dropdown arrow is used
// wParam = TRUE/FALSE turns arrow on or off
-// lParam = not used
-// Usage: SendMessage(hwndbutton, BUTTONSETARROW, 1, 0);
+// lParam = 0 (unused)
+// Usage: SendMessage(hwndbutton, BUTTONSETARROW, TRUE, 0);
// Only works on MButtonClass buttons
#define BUTTONSETARROW (WM_USER+1)
// Sets whether the button is a default button
// wParam = TRUE/FALSE default on/off
-// lParam = not used
-// Usage: SendMessage(hwndbutton, BUTTONSETDEFAULT, 1, 0);
+// lParam = 0 (unused)
+// Usage: SendMessage(hwndbutton, BUTTONSETDEFAULT, TRUE, 0);
// Only works on MButtonClass buttons
#define BUTTONSETDEFAULT (WM_USER+2)
// Sets the button as a push button
// wParam = TRUE/FALSE default on/off
-// lParam = not used
-// Usage: SendMessage(hwndbutton, BUTTONSETASPUSHBTN, 1, 0);
+// lParam = 0 (unused)
+// Usage: SendMessage(hwndbutton, BUTTONSETASPUSHBTN, TRUE, 0);
// Only works on MButtonClass buttons
#define BUTTONSETASPUSHBTN (WM_USER+3)
// Sets the button type as a flat button without borders v0.3.3+
// wParam = TRUE/FALSE default on/off
-// lParam = not used
-// Usage: SendMessage(hwndbutton, BUTTONSETASFLATBTN, 1, 0);
+// lParam = 0 (unused)
+// Usage: SendMessage(hwndbutton, BUTTONSETASFLATBTN, TRUE, 0);
// Only works on MButtonClass buttons
#define BUTTONSETASFLATBTN (WM_USER+4)
// Sets a tooltip for the button v0.3.3+
// wParam = (WPARAM)(char *)szTip
-// lParam = not used
+// lParam = 0 (unused)
// Usage: SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)"My Tip", BATF_* flags);
#define BATF_UNICODE 1
#if defined(_UNICODE)
@@ -72,7 +71,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Applies themes to a button
// wParam = TRUE/FALSE default on/off
// lParam = not used
-// Usage: SendMessage(hwndbutton, BUTTONSETASTHEMEDBTN, 1, 0);
+// Usage: SendMessage(hwndbutton, BUTTONSETASTHEMEDBTN, TRUE, 0);
// Only works on MButtonClass buttons
#define BUTTONSETASTHEMEDBTN (WM_USER+6)
@@ -83,4 +82,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Only works on MButtonClass buttons
#define BUTTONSETCUSTOMPAINT (WM_USER+7)
+// Forces a button to send clicks on push
+// wParam = TRUE/FALSE default on/off
+// lParam = 0 (unused)
+// Usage: SendMessage(hwndbutton, BUTTONSETSENDONDOWN, TRUE, 0);
+#define BUTTONSETSENDONDOWN (WM_USER+8)
+
#endif // M_BUTTON_H__
diff --git a/include/m_button_int.h b/include/m_button_int.h
index f40a83ced7..9bdd651731 100644
--- a/include/m_button_int.h
+++ b/include/m_button_int.h
@@ -44,13 +44,14 @@ struct MButtonCtrl
TCHAR cHot;
HWND hwndToolTips;
- bool bIsPushBtn, // button has two states
- bIsPushed, // is button pushed or not
- bIsDefault, // default button
- bIsFlat, // flat button
- bIsThemed, // themed button
- bIsSkinned; // skinned button
-
+ bool bIsPushBtn, // button has two states
+ bIsPushed, // is button pushed or not
+ bIsDefault, // default button
+ bIsFlat, // flat button
+ bIsThemed, // themed button
+ bIsSkinned, // skinned button
+ bSendOnDown; // sends BN_CLICKED on WM_LBUTTONDOWN
+
pfnPainterFunc fnPainter; // custom button painter
IAccPropServices* pAccPropServices;