]> git.saurik.com Git - wxWidgets.git/commitdiff
Avoid passing wxChar* to API functions (patch #1830017).
authorStefan Neis <Stefan.Neis@t-online.de>
Sun, 11 Nov 2007 22:35:20 +0000 (22:35 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Sun, 11 Nov 2007 22:35:20 +0000 (22:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/os2/toplevel.cpp
src/os2/window.cpp

index e076e5019770769b0bef482b373e40476e673031..a22fed882d51735873a19e4aa776d1a0a23e6f28 100644 (file)
@@ -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
index 44fdde685bfa3403f14fae76a6e9e40086809300..3250350bc3a9811a17d9bb372b72dfa13a0cfc78 100644 (file)
@@ -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