summaryrefslogtreecommitdiff
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
parentbbde34e3dcea951b26cba271020aa9a8cf73e811 (diff)
CCtrlButton:
bool IsPushed() returns a status for a PUSHBUTTON; void Push(bool) sets a new pushed status
-rw-r--r--include/m_gui.h3
-rw-r--r--libs/win32/mir_core.libbin313082 -> 313620 bytes
-rw-r--r--libs/win64/mir_core.libbin313980 -> 314528 bytes
-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
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
index 0b632f4203..dfed0f6fc3 100644
--- a/libs/win32/mir_core.lib
+++ b/libs/win32/mir_core.lib
Binary files differ
diff --git a/libs/win64/mir_core.lib b/libs/win64/mir_core.lib
index b673a25a3d..0861e6c4cf 100644
--- a/libs/win64/mir_core.lib
+++ b/libs/win64/mir_core.lib
Binary files differ
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