+ else if (style & BS_BITMAP)
+ {
+ // TODO: how to find the bitmap?
+ win = new wxBitmapButton;
+ wxLogError(wxT("Have not yet implemented bitmap button as BS_BITMAP button."));
+ }
+#endif
+ else if (style1 == BS_OWNERDRAW)
+ {
+ // TODO: how to find the bitmap?
+ // TODO: can't distinguish between bitmap button and bitmap static.
+ // Change implementation of wxStaticBitmap to SS_BITMAP.
+ // PROBLEM: this assumes that we're using resource-based bitmaps.
+ // So maybe need 2 implementations of bitmap buttons/static controls,
+ // with a switch in the drawing code. Call default proc if BS_BITMAP.
+ win = new wxBitmapButton;
+ }
+#endif
+ else if ((style1 == BS_PUSHBUTTON) || (style1 == BS_DEFPUSHBUTTON))
+ {
+ win = new wxButton;
+ }
+ else if (style1 == BS_GROUPBOX)
+ {
+ win = new wxStaticBox;
+ }
+ else
+ {
+ wxLogError(wxT("Don't know what kind of button this is: id = %ld"),
+ id);
+ }
+ }
+ else if (str == wxT("COMBOBOX"))
+ {
+ win = new wxComboBox;
+ }
+ // TODO: Problem if the user creates a multiline - but not rich text - text control,
+ // since wxWin assumes RichEdit control for this. Should have m_isRichText in
+ // wxTextCtrl. Also, convert as much of the window style as is necessary
+ // for correct functioning.
+ // Could have wxWindow::AdoptAttributesFromHWND(WXHWND)
+ // to be overridden by each control class.
+ else if (str == wxT("EDIT"))
+ {
+ win = new wxTextCtrl;
+ }
+ else if (str == wxT("LISTBOX"))
+ {
+ win = new wxListBox;
+ }
+ else if (str == wxT("SCROLLBAR"))
+ {
+ win = new wxScrollBar;
+ }
+#if defined(__WIN95__) && wxUSE_SPINBTN
+ else if (str == wxT("MSCTLS_UPDOWN32"))
+ {
+ win = new wxSpinButton;
+ }