- SetName(name);
-#if wxUSE_VALIDATORS
- SetValidator(validator);
-#endif
- if (parent) parent->AddChild(this);
- SetBackgroundColour(parent->GetBackgroundColour()) ;
- SetForegroundColour(parent->GetForegroundColour()) ;
-
- 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;
-// TODO:
-/*
- long msStyle = WS_CHILD | WS_TABSTOP | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL |
- CBS_NOINTEGRALHEIGHT;
-
- if (m_windowStyle & wxCB_READONLY)
- msStyle |= CBS_DROPDOWNLIST;
- else if (m_windowStyle & wxCB_SIMPLE)
- msStyle |= CBS_SIMPLE; // A list (shown always) and edit control
- else
- msStyle |= CBS_DROPDOWN;
-
- 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 || wxStyleHasBorder(m_windowStyle) )
- msStyle |= WS_BORDER;
-
- m_hWnd = (WXHWND)::CreateWindowEx(exStyle, wxT("COMBOBOX"), NULL,
- msStyle,
- 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
- wxGetInstance(), NULL);
-
- wxCHECK_MSG( m_hWnd, FALSE, wxT("Failed to create combobox") );
-
- // Subclass again for purposes of dialog editing mode
- SubclassWin(m_hWnd);
-
- SetFont(parent->GetFont());
- int i;
- for (i = 0; i < n; i++)
- {
- Append(choices[i]);
- }
-
- SetSelection(i);
-
- SetSize(x, y, width, height);
- if ( !value.IsEmpty() )
- {
- SetValue(value);
- }
-*/
- return TRUE;
-}