]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/fontpickerg.cpp
many compilation fixes for WinCE using VC8 (it now build, although still doesn't...
[wxWidgets.git] / src / generic / fontpickerg.cpp
index 1a67f07b85a0d14fdcea7a05a61853ef86531d2c..26f9908d7df1dd05c4ea60136f016cbebe1f0403 100644 (file)
     #pragma hdrstop
 #endif
 
-#ifndef WX_PRECOMP
-    #include "wx/window.h"
-#endif //WX_PRECOMP
+#if wxUSE_FONTPICKERCTRL
 
 #include "wx/fontpicker.h"
+
 #include "wx/fontdlg.h"
 
 
@@ -36,8 +35,6 @@
 // implementation
 // ============================================================================
 
-#if wxUSE_FONTPICKERCTRL
-
 wxFontData wxGenericFontButton::ms_data;
 IMPLEMENT_DYNAMIC_CLASS(wxGenericFontButton, wxButton)
 
@@ -67,7 +64,7 @@ bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id,
             wxCommandEventHandler(wxGenericFontButton::OnButtonClick),
             NULL, this);
 
-    m_selectedFont = initial;
+    m_selectedFont = initial.IsOk() ? initial : *wxNORMAL_FONT;
     UpdateFont();
     InitFontData();