summaryrefslogtreecommitdiff
path: root/widgetcheckbox.cpp
blob: 9e1397cd5a8a6359418cdbe8b4a950c2d8e5467c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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);
}