]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/bmpcbox.cpp
Disable deprecation and other warnings in MFC sample.
[wxWidgets.git] / src / msw / bmpcbox.cpp
index 19a5d3a050b53395d4a9fc2f209643247e092708..52235a87798dd8d648f6c7dba88d25c1e948af3a 100644 (file)
@@ -140,7 +140,7 @@ void wxBitmapComboBox::RecreateControl()
     DissociateHandle();
     ::DestroyWindow(hwnd);
 
-    if ( !MSWCreateControl(wxT("COMBOBOX"), value, pos, size) )
+    if ( !MSWCreateControl(wxT("COMBOBOX"), wxEmptyString, pos, size) )
         return;
 
     // initialize the controls contents
@@ -179,6 +179,9 @@ void wxBitmapComboBox::RecreateControl()
     }
 
     ::SendMessage(GetHwnd(), CB_SETITEMHEIGHT, 0, MeasureItem(0));
+
+    // Revert the old string value
+    ChangeValue(value);
 }
 
 wxBitmapComboBox::~wxBitmapComboBox()