-bool wxChoice::Create(wxWindow *parent, wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- int n, const wxString choices[],
- long style,
- const wxValidator& validator,
- const wxString& name)
-{
- SetName(name);
- SetValidator(validator);
- if (parent) parent->AddChild(this);
- SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
- SetForegroundColour(parent->GetDefaultForegroundColour()) ;
- m_noStrings = n;
-
- m_windowStyle = style;
-
- if ( id == -1 )
- m_windowId = (int)NewControlId();
- else
- m_windowId = id;
-
- int x = pos.x;
- int y = pos.y;
- int width = size.x;
- int height = size.y;
-
- long msStyle = WS_CHILD | CBS_DROPDOWNLIST | WS_HSCROLL | WS_VSCROLL
- | WS_TABSTOP | WS_VISIBLE;
- if (m_windowStyle & wxCB_SORT)
- msStyle |= CBS_SORT;
-
- bool want3D;
- WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ;
-
- // Even with extended styles, need to combine with WS_BORDER
- // for them to look right.
- if (want3D || (m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) ||
- (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER))
- msStyle |= WS_BORDER;
-
- HWND wx_combo = CreateWindowEx(exStyle, "COMBOBOX", NULL,
- msStyle,
- 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
- wxGetInstance(), NULL);
-/*
-#if CTL3D
- if (want3D)
- {
- m_useCtl3D = TRUE;
- Ctl3dSubclassCtl(wx_combo); // Does CTL3D affect the combobox? I think not.
- }
-#endif
-*/