#pragma once #include "SRWnd.h" #include namespace SRFramework{ class SRComboBox : public SRFramework::SRWnd { public: SRComboBox(VOID); virtual ~SRComboBox(VOID); BOOL Create(SRWnd *pParentWnd, RECT bounds, INT nChildID = NULL, DWORD dwStyle = WS_CHILD | WS_BORDER | CBS_DROPDOWN | WS_VSCROLL); // Does not need to be registered the call to InitCommonControlsEx // does that for us. BOOL Register() { return TRUE; } WCString GetText(); VOID Clear(); INT AddItem(const WCString &wcsItem); INT InsertItem(INT nItemIndex, const WCString &wcsItem); INT DeleteItem(INT nItemIndex); INT FindItem(const WCString &wcsItem); INT SelectItem(const WCString &wcsItem); INT SetCurSel(INT nItemIndex); INT GetCurSel(); BOOL SetText(const WCString &text); WCString GetItemAt(INT nItemIndex); BOOL OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); }; }