diff options
Diffstat (limited to 'widgetcheckbox.cpp')
-rw-r--r-- | widgetcheckbox.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
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 <skygi/skygi.h>
+
+#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);
+}
+
|