#include #include "widgetslider.h" CSlider::CSlider() { this->maximum = 0; this->hWnd = NULL; } HRESULT CSlider::Create(HANDLE parent, char * name, int x, int y, int w, int h, int style) { this->hWnd = GI_WidgetSliderCreate(parent, name, x, y, w, h, style); if (this->hWnd) { return S_OK; } return E_HANDLE; } HRESULT CSlider::SetValue(int position) { this->pos = position; return GI_WidgetSliderSet(this->hWnd, position); } int CSlider::GetValue() { return this->pos; } HRESULT CSlider::SetMax(int max) { maximum = max; return GI_WidgetSliderSetMax(this->hWnd, max); } int CSlider::GetMax() { return this->maximum; }