]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/combobox.cpp
Added MSWPositionForWxMenu() method which is used to translate wxWindows
[wxWidgets.git] / src / msw / combobox.cpp
index d16144afbc9021c488ed7d49b7e08c7cf98f4ae5..2e18557cbab15d08275ebae2ef2c0fcba0154738 100644 (file)
@@ -72,14 +72,14 @@ wxBEGIN_FLAGS( wxComboBoxStyle )
     wxFLAGS_MEMBER(wxDOUBLE_BORDER)
     wxFLAGS_MEMBER(wxRAISED_BORDER)
     wxFLAGS_MEMBER(wxSTATIC_BORDER)
-    wxFLAGS_MEMBER(wxNO_BORDER)
+    wxFLAGS_MEMBER(wxBORDER)
 
     // standard window styles
     wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
     wxFLAGS_MEMBER(wxCLIP_CHILDREN)
     wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
     wxFLAGS_MEMBER(wxWANTS_CHARS)
-    wxFLAGS_MEMBER(wxNO_FULL_REPAINT_ON_RESIZE)
+    wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
     wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
     wxFLAGS_MEMBER(wxVSCROLL)
     wxFLAGS_MEMBER(wxHSCROLL)
@@ -237,6 +237,24 @@ WXHBRUSH wxComboBox::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSE
 // wxComboBox
 // ----------------------------------------------------------------------------
 
+wxComboBox::wxComboBox()
+{
+}
+
+wxComboBox::wxComboBox(wxWindow *parent, 
+                       wxWindowID id,
+                       const wxString& value,
+                       const wxPoint& pos,
+                       const wxSize& size,
+                       int n,
+                       const wxString choices[],
+                       long style,
+                       const wxValidator& validator,
+                       const wxString& name)
+{
+    Create(parent, id, value, pos, size, n, choices, style, validator, name);
+}
+
 bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
 {
     switch ( msg )
@@ -311,6 +329,14 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
                 }
                 else // we're synthesizing text updated event from sel change
                 {
+                    // We need to retrieve the current selection because the user
+                    // may have changed it in the previous handler (for CBN_SELCHANGE
+                    // above).
+                    sel = GetSelection();
+                    if ( sel > -1 )
+                    {
+                        value = GetString(sel);
+                    }
                     // we need to do this because the user code expects
                     // wxComboBox::GetValue() to return the new value from
                     // "text updated" handler but it hadn't been updated yet