]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/colordlg.cpp
compile fix
[wxWidgets.git] / src / msw / colordlg.cpp
index 21d50103f3922e0e9cea0096a881d77573640521..5b9d60ff5814e3cb5ccf7ef2b32862e2bef5c1d1 100644 (file)
@@ -29,6 +29,7 @@
 #include "wx/colordlg.h"
 
 #ifndef WX_PRECOMP
+    #include "wx/msw/wrapcdlg.h"
     #include <stdio.h>
     #include "wx/colour.h"
     #include "wx/gdicmn.h"
@@ -39,7 +40,6 @@
 #endif
 
 #include "wx/msw/private.h"
-#include "wx/msw/wrapcdlg.h"
 
 #include <stdlib.h>
 #include <string.h>
@@ -69,7 +69,9 @@ wxColourDialogHookProc(HWND hwnd,
         CHOOSECOLOR *pCC = (CHOOSECOLOR *)lParam;
         wxColourDialog *dialog = (wxColourDialog *)pCC->lCustData;
 
-        ::SetWindowText(hwnd, dialog->GetTitle());
+        const wxString& title = dialog->GetTitle();
+        if ( !title.empty() )
+            ::SetWindowText(hwnd, title.wx_str());
 
         wxPoint pos = dialog->GetPosition();
         if ( pos != wxDefaultPosition )