diff options
author | Ian C <ianc@noddybox.co.uk> | 2005-03-29 01:22:42 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2005-03-29 01:22:42 +0000 |
commit | effc648f262bd3bd7b57d4e76db2f768510be55c (patch) | |
tree | d77a2e04e58847a3517649ffa83f86b066de08f6 /src/autocheck.cpp | |
parent | 82f1d860690dc0a2d0210db12344f7ea5e88b6a4 (diff) |
Tweaks to Text controls and text handling.
Diffstat (limited to 'src/autocheck.cpp')
-rw-r--r-- | src/autocheck.cpp | 25 |
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 |