]> git.saurik.com Git - wxWidgets.git/commitdiff
- use CreateWindowEx(), please explain why CreateWindow() is needed if it is
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 31 Jan 2005 23:45:52 +0000 (23:45 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 31 Jan 2005 23:45:52 +0000 (23:45 +0000)
- use window name if it has no title (patch 1106877)
- corrected error message when window creation fails

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index d19a7a49e139189a9863b913c698558b6227fbd5..d90a1772e6940e16c74b6a987a127506576a6dbf 100644 (file)
@@ -3039,42 +3039,22 @@ bool wxWindowMSW::MSWCreate(const wxChar *wclass,
     // do create the window
     wxWindowCreationHook hook(this);
 
-    // VZ: anyone care to explain why this is done for CE?
-#ifdef __WXWINCE__
-    if (extendedStyle == 0)
-    {
-        m_hWnd = (WXHWND)::CreateWindow
-            (
-            className,
-            title ? title : wxEmptyString,
-            style,
-            x, y, w, h,
-            (HWND)MSWGetParent(),
-            (HMENU)controlId,
-            wxGetInstance(),
-            NULL                        // no extra data
-            );
-    }
-    else
-#endif // __WXWINCE__
-    {
-        m_hWnd = (WXHWND)::CreateWindowEx
-            (
-            extendedStyle,
-            className,
-            title ? title : wxEmptyString,
-            style,
-            x, y, w, h,
-            (HWND)MSWGetParent(),
-            (HMENU)controlId,
-            wxGetInstance(),
-            NULL                        // no extra data
-            );
-    }
+    m_hWnd = (WXHWND)::CreateWindowEx
+                       (
+                        extendedStyle,
+                        className,
+                        title ? title : m_windowName.c_str(),
+                        style,
+                        x, y, w, h,
+                        (HWND)MSWGetParent(),
+                        (HMENU)controlId,
+                        wxGetInstance(),
+                        NULL                        // no extra data
+                       );
 
     if ( !m_hWnd )
     {
-        wxLogSysError(_("Can't create window of class %s"), wclass);
+        wxLogSysError(_("Can't create window of class %s"), className.c_str());
 
         return false;
     }