- 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
This commit is contained in:
Vadim Zeitlin
2005-01-31 23:45:52 +00:00
parent 0ae4d1210a
commit 5e67eb9737

View 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;
}