summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-21 20:25:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-21 20:25:27 +0300
commit7104a25fa975b8b70fcab6e499efe91bc1a9313c (patch)
tree2baf44bef58606923d73980c63d6cb63a5bfd779 /src/mir_core
parentbbde34e3dcea951b26cba271020aa9a8cf73e811 (diff)
CCtrlButton:
bool IsPushed() returns a status for a PUSHBUTTON; void Push(bool) sets a new pushed status
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/mir_core.def2
-rw-r--r--src/mir_core/src/mir_core64.def2
-rw-r--r--src/mir_core/src/ui_utils.cpp11
3 files changed, 15 insertions, 0 deletions
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