From: Stefan Neis Date: Sun, 11 Nov 2007 22:35:20 +0000 (+0000) Subject: Avoid passing wxChar* to API functions (patch #1830017). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/932762afbff99b28617b01b833042038f793ae32 Avoid passing wxChar* to API functions (patch #1830017). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/os2/toplevel.cpp b/src/os2/toplevel.cpp index e076e50197..a22fed882d 100644 --- a/src/os2/toplevel.cpp +++ b/src/os2/toplevel.cpp @@ -484,8 +484,8 @@ bool wxTopLevelWindowOS2::CreateFrame( const wxString& rsTitle, hFrame = ::WinCreateStdWindow( hParent ,ulStyleFlags // frame-window style ,(PULONG)&lFlags // window style - ,wxFrameClassName // class name - ,rsTitle.c_str() // window title + ,wxString(wxFrameClassName).c_str() // class name + ,rsTitle.c_str() // window title ,0L // default client style ,NULLHANDLE // resource in executable file ,0 // resource id diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 44fdde685b..3250350bc3 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -2941,6 +2941,7 @@ bool wxWindowOS2::OS2Create( PSZ zClass, long lControlId = 0L; wxWindowCreationHook vHook(this); wxString sClassName((wxChar*)zClass); + wxString sTitle(zTitle ? zTitle : wxEmptyString); OS2GetCreateWindowCoords( rPos ,rSize @@ -2969,7 +2970,7 @@ bool wxWindowOS2::OS2Create( PSZ zClass, } m_hWnd = (WXHWND)::WinCreateWindow( (HWND)OS2GetParent() ,sClassName.c_str() - ,(zTitle ? zTitle : wxEmptyString) + ,sTitle.c_str() ,(ULONG)dwStyle ,(LONG)0L ,(LONG)0L