diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-21 20:25:27 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-21 20:25:27 +0300 |
commit | 7104a25fa975b8b70fcab6e499efe91bc1a9313c (patch) | |
tree | 2baf44bef58606923d73980c63d6cb63a5bfd779 | |
parent | bbde34e3dcea951b26cba271020aa9a8cf73e811 (diff) |
CCtrlButton:
bool IsPushed() returns a status for a PUSHBUTTON;
void Push(bool) sets a new pushed status
-rw-r--r-- | include/m_gui.h | 3 | ||||
-rw-r--r-- | libs/win32/mir_core.lib | bin | 313082 -> 313620 bytes | |||
-rw-r--r-- | libs/win64/mir_core.lib | bin | 313980 -> 314528 bytes | |||
-rw-r--r-- | src/mir_core/src/mir_core.def | 2 | ||||
-rw-r--r-- | src/mir_core/src/mir_core64.def | 2 | ||||
-rw-r--r-- | src/mir_core/src/ui_utils.cpp | 11 |
6 files changed, 18 insertions, 0 deletions
diff --git a/include/m_gui.h b/include/m_gui.h index 31e33c0994..270e6205bb 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -565,6 +565,9 @@ public: virtual BOOL OnCommand(HWND hwndCtrl, WORD idCtrl, WORD idCode) override;
CCallback<CCtrlButton> OnClick;
+
+ bool IsPushed() const;
+ void Push(bool bPushed);
};
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/libs/win32/mir_core.lib b/libs/win32/mir_core.lib Binary files differindex 0b632f4203..dfed0f6fc3 100644 --- a/libs/win32/mir_core.lib +++ b/libs/win32/mir_core.lib diff --git a/libs/win64/mir_core.lib b/libs/win64/mir_core.lib Binary files differindex b673a25a3d..0861e6c4cf 100644 --- a/libs/win64/mir_core.lib +++ b/libs/win64/mir_core.lib diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 360a389038..dc9ce30241 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -1035,3 +1035,5 @@ CallFunctionSync @1170 ?GetPos@CSplitter@@QBEHXZ @1222 NONAME
?OnInit@CSplitter@@MAEXXZ @1223 NONAME
?SwapPages@CCtrlPages@@QAEXHH@Z @1224 NONAME
+?IsPushed@CCtrlButton@@QBE_NXZ @1225 NONAME
+?Push@CCtrlButton@@QAEX_N@Z @1226 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index c5ac07935b..ea7e8b69ee 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -1035,3 +1035,5 @@ CallFunctionSync @1170 ?GetPos@CSplitter@@QEBAHXZ @1222 NONAME
?OnInit@CSplitter@@MEAAXXZ @1223 NONAME
?SwapPages@CCtrlPages@@QEAAXHH@Z @1224 NONAME
+?IsPushed@CCtrlButton@@QEBA_NXZ @1225 NONAME
+?Push@CCtrlButton@@QEAAX_N@Z @1226 NONAME
diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp index 87cecc737a..76dfb85a23 100644 --- a/src/mir_core/src/ui_utils.cpp +++ b/src/mir_core/src/ui_utils.cpp @@ -788,6 +788,17 @@ BOOL CCtrlButton::OnCommand(HWND, WORD, WORD idCode) return FALSE;
}
+bool CCtrlButton::IsPushed() const
+{
+ return ::SendMessage(m_hwnd, BM_GETCHECK, 0, 0) == BST_CHECKED;
+}
+
+void CCtrlButton::Push(bool bPushed)
+{
+ ::SendMessage(m_hwnd, BM_SETCHECK, (bPushed) ? BST_CHECKED : BST_UNCHECKED, 0);
+}
+
+
/////////////////////////////////////////////////////////////////////////////////////////
// CCtrlHyperlink
|