summaryrefslogtreecommitdiff
path: root/src/autocheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/autocheck.cpp')
-rw-r--r--src/autocheck.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/autocheck.cpp b/src/autocheck.cpp
index 57ec5bd..f713c19 100644
--- a/src/autocheck.cpp
+++ b/src/autocheck.cpp
@@ -51,7 +51,7 @@ void AutoCheck::OnPress(Window *owner, W32DLibCallback callback)
// ------------------------------------------------------------
//
-void AutoCheck::SetState(EState state)
+void AutoCheck::SetFullState(EState state)
{
CheckDlgButton(m_parent->GetHWND(),
m_resid,
@@ -61,11 +61,32 @@ void AutoCheck::SetState(EState state)
// ------------------------------------------------------------
//
-AutoCheck::EState AutoCheck::GetState()
+AutoCheck::EState AutoCheck::GetFullState()
{
return static_cast<EState>(IsDlgButtonChecked(m_parent->GetHWND(),m_resid));
}
+
+// ------------------------------------------------------------
+//
+void AutoCheck::SetState(bool state)
+{
+ CheckDlgButton(m_parent->GetHWND(),
+ m_resid,
+ state ? BST_CHECKED:BST_UNCHECKED);
+}
+
+
+// ------------------------------------------------------------
+//
+bool AutoCheck::GetState()
+{
+ UINT state=IsDlgButtonChecked(m_parent->GetHWND(),m_resid);
+
+ return (state==BST_CHECKED || state==BST_INDETERMINATE);
+}
+
+
}; // namespace W32DLib