From 5e67eb97376165832f4db541a5e4be0414da9efc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 31 Jan 2005 23:45:52 +0000 Subject: [PATCH] - use CreateWindowEx(), please explain why CreateWindow() is needed if it is - 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 | 46 +++++++++++++--------------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index d19a7a49e1..d90a1772e6 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -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; } -- 2.45.2