From dfa4a46bb0e6c6df9d07039fda5ef7f4309915b2 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Fri, 4 Aug 2006 01:04:15 +0000 Subject: git-svn-id: svn://mattst88.com/svn/skygipp/trunk@2 a71248a0-261a-0410-b604-901f7c0bd773 --- widgetcheckbox.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 widgetcheckbox.cpp (limited to 'widgetcheckbox.cpp') diff --git a/widgetcheckbox.cpp b/widgetcheckbox.cpp new file mode 100644 index 0000000..9e1397c --- /dev/null +++ b/widgetcheckbox.cpp @@ -0,0 +1,32 @@ +#include + +#include "widgetcheckbox.h" + +CCheckbox::CCheckbox() { + this->hWnd = NULL; +} + +HRESULT CCheckbox::Create(HANDLE parent, char * name, int x, int y, int w, int h, int style, unsigned int ID) { + this->hWnd = GI_WidgetCheckboxCreate(parent, name, x, y, w, h, style, ID); + if (this->hWnd) { + return S_OK; + } + return E_HANDLE; +} + +HRESULT CCheckbox::Enable() { + return GI_WidgetCheckboxEnable(this->hWnd); +} + +HRESULT CCheckbox::Disable() { + return GI_WidgetCheckboxDisable(this->hWnd); +} + +HRESULT CCheckbox::SetState(int state) { + return GI_WidgetCheckboxSet(this->hWnd, state); +} + +int CCheckbox::GetState() { + return GI_WidgetCheckboxGet(this->hWnd); +} + -- cgit v1.2.3