]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
don't call gtk_selection_data_set_text() with non-UTF-8 data as we did in ANSI build...
[wxWidgets.git] / src / msw / window.cpp
index 5b449b2277b4982cc9938dc62e5913233dd27ff1..7dfd87df9935a76de35ab6a37d3354550f495bf6 100644 (file)
@@ -871,7 +871,11 @@ bool wxWindowMSW::SetFont(const wxFont& font)
     HWND hWnd = GetHwnd();
     if ( hWnd != 0 )
     {
-        WXHANDLE hFont = m_font.GetResourceHandle();
+        // note the use of GetFont() instead of m_font: our own font could have
+        // just been reset and in this case we need to change the font used by
+        // the native window to the default for this class, i.e. exactly what
+        // GetFont() returns
+        WXHANDLE hFont = GetFont().GetResourceHandle();
 
         wxASSERT_MSG( hFont, wxT("should have valid font") );