]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/control.cpp
Open files in binary mode to convert DOS to Unix
[wxWidgets.git] / src / msw / control.cpp
index 65042f462eb4b964dabcb38a2854f1de15ee9ade..20c7dd20fe0e257c6b30ead00819c0b58e5701e2 100644 (file)
@@ -150,7 +150,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
     if ( !m_hWnd )
     {
         wxLogDebug(wxT("Failed to create a control of class '%s'"), classname);
-        wxFAIL_MSG(_T("something is very wrong"));
+        wxFAIL_MSG(_T("something is very wrong, CreateWindowEx failed"));
 
         return FALSE;
     }
@@ -168,7 +168,8 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
 
     // set up fonts and colours
     InheritAttributes();
-    SetFont(GetDefaultAttributes().font);
+    if (!m_hasFont)
+        SetFont(GetDefaultAttributes().font);
 
     // set the size now if no initial size specified
     SetInitialBestSize(size);