- // first create wxWin object
- if ( !CreateControl(parent, id, pos, size, style, validator, name) )
- return FALSE;
+ // and finally, show the control
+ Show(true);
+
+ return true;
+}
+
+bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style,
+ const wxValidator& validator,
+ const wxString& name)
+{
+ wxCArrayString chs(choices);
+ return Create(parent, id, value, pos, size, chs.GetCount(),
+ chs.GetStrings(), style, validator, name);
+}
+
+WXDWORD wxComboBox::MSWGetStyle(long style, WXDWORD *exstyle) const
+{
+ // we never have an external border
+ WXDWORD msStyle = wxChoice::MSWGetStyle
+ (
+ (style & ~wxBORDER_MASK) | wxBORDER_NONE, exstyle
+ );
+
+ // usually WS_TABSTOP is added by wxControl::MSWGetStyle() but as we're
+ // created hidden (see Create() above), it is not done for us but we still
+ // want to have this style
+ msStyle |= WS_TABSTOP;
+
+ // remove the style always added by wxChoice
+ msStyle &= ~CBS_DROPDOWNLIST;