blob: 8717b486714bd194b7a99441272a7337467b44ca (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
// Windows/Control/ComboBox.h
#ifndef __WINDOWS_WX_CONTROL_COMBOBOX_H
#define __WINDOWS_WX_CONTROL_COMBOBOX_H
#include "Windows/Window.h"
#include "Windows/Defs.h"
#include "Windows/Control/Window2.h" // NMHDR
#ifndef _WIN32
#define CB_ERR (-1) // wxNOT_FOUND
#endif
typedef struct
{
NMHDR hdr;
#define CBENF_ESCAPE 1
#define CBENF_RETURN 2
int iWhy;
} NMCBEENDEDITW;
typedef NMCBEENDEDITW * PNMCBEENDEDITW;
class wxComboBox;
namespace NWindows {
namespace NControl {
class CComboBox // : public CWindow
{
wxComboBox* _choice;
public:
CComboBox() : _choice(0) {}
void Attach(wxWindow * newWindow);
wxWindow * Detach();
operator HWND() const;
int AddString(const TCHAR * txt);
void SetText(LPCTSTR s);
void GetText(CSysString &s);
int GetCount() const ;
void GetLBText(int index, CSysString &s);
void SetCurSel(int index);
int GetCurSel();
void SetItemData(int index, int val);
int GetItemData(int index);
void Enable(bool state);
void ResetContent();
};
class CComboBoxEx : public CComboBox // : public CWindow
{
public:
/* FIXME
LRESULT DeleteItem(int index)
{ return SendMessage(CBEM_DELETEITEM, index, 0); }
LRESULT InsertItem(COMBOBOXEXITEM *item)
{ return SendMessage(CBEM_INSERTITEM, 0, (LPARAM)item); }
DWORD SetExtendedStyle(DWORD exMask, DWORD exStyle)
{ return (DWORD)SendMessage(CBEM_SETEXTENDEDSTYLE, exMask, exStyle); }
HWND GetEditControl()
{ return (HWND)SendMessage(CBEM_GETEDITCONTROL, 0, 0); }
*/
};
}
}
#endif // __WINDOWS_WX_CONTROL_COMBOBOX_H
|