#define STRICT #include #include "WSL.h" #include "Window.h" #include "Control.h" #include "ComboBox.h" SComboBox::SComboBox(SWindow* parent, int id) : SControl(parent, TEXT("combobox"), id) { } SComboBox::SComboBox(SWindow* parent, HWND hwnd) : SControl(parent, hwnd) { } SComboBox::~SComboBox(void) { } int SComboBox::GetCount(void) { return static_cast(SendMessage(CB_GETCOUNT)); } int SComboBox::AddString(LPCTSTR lpsz) { return static_cast(SendMessage(CB_ADDSTRING, 0, reinterpret_cast(lpsz))); } int SComboBox::SetEditSel(DWORD ichStart, DWORD ichEnd) { return static_cast(SendMessage(CB_SETEDITSEL, 0, MAKELONG(ichStart, ichEnd))); } DWORD SComboBox::GetEditSel(LPDWORD lpdwStart, LPDWORD lpdwEnd) { return static_cast(SendMessage( CB_GETEDITSEL, reinterpret_cast(lpdwStart), reinterpret_cast(lpdwEnd))); } int SComboBox::SetCurSel(int index) { return static_cast(SendMessage(CB_SETCURSEL, index)); } int SComboBox::GetCurSel(void) { return static_cast(SendMessage(CB_GETCURSEL)); } int SComboBox::DeleteString(int index) { return static_cast(SendMessage(CB_DELETESTRING, index)); }