1 // Windows/Control/ComboBox.h
2 
3 #ifndef __WINDOWS_WX_CONTROL_COMBOBOX_H
4 #define __WINDOWS_WX_CONTROL_COMBOBOX_H
5 
6 #include "Windows/Window.h"
7 #include "Windows/Defs.h"
8 
9 #ifndef _WIN32
10 #define CB_ERR (-1)  // wxNOT_FOUND
11 #endif
12 
13 class wxComboBox;
14 
15 namespace NWindows {
16 	namespace NControl {
17 
18 		class CComboBox // : public CWindow
19 		{
20 			wxComboBox* _choice;
21 		public:
CComboBox()22 			CComboBox() : _choice(0) {}
23 
24 			void Attach(wxWindow * newWindow);
25 			wxWindow * Detach();
26 
27 			int AddString(const TCHAR * txt);
28 
29 			void SetText(LPCTSTR s);
30 
31 			void GetText(CSysString &s);
32 
33 			int GetCount() const ;
34 			void GetLBText(int index, CSysString &s);
35 
36 			void SetCurSel(int index);
37 			int GetCurSel();
38 
39 			void SetItemData(int index, int val);
40 
41 			int GetItemData(int index);
42 
43 			void Enable(bool state);
44 
45 			void ResetContent();
46 		};
47 
48 		class CComboBoxEx : public CComboBox // : public CWindow
49 		{
50 		public:
51 			/* FIXME
52   			LRESULT DeleteItem(int index)
53     			{ return SendMessage(CBEM_DELETEITEM, index, 0); }
54   			LRESULT InsertItem(COMBOBOXEXITEM *item)
55     			{ return SendMessage(CBEM_INSERTITEM, 0, (LPARAM)item); }
56   			DWORD SetExtendedStyle(DWORD exMask, DWORD exStyle)
57     			{ return (DWORD)SendMessage(CBEM_SETEXTENDEDSTYLE, exMask, exStyle); }
58   			HWND GetEditControl()
59     			{ return (HWND)SendMessage(CBEM_GETEDITCONTROL, 0, 0); }
60 			*/
61 		};
62 
63 
64 	}
65 }
66 
67 #endif // __WINDOWS_WX_CONTROL_COMBOBOX_H
68