From: Stefan Neis Date: Fri, 6 Apr 2007 18:08:32 +0000 (+0000) Subject: Compilation fix for wxCStrData handling. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/65f3f920ba3601249efdd84efc1a9299d80d1b4f Compilation fix for wxCStrData handling. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/os2/accel.cpp b/src/os2/accel.cpp index 3dc254182f..fc5f2a319b 100644 --- a/src/os2/accel.cpp +++ b/src/os2/accel.cpp @@ -75,7 +75,7 @@ wxAcceleratorTable::wxAcceleratorTable( m_refData = new wxAcceleratorRefData; - ulId = atol((char*)rResource.c_str()); + ulId = atol(rResource.c_str()); hAccel = ::WinLoadAccelTable( vHabmain ,NULL // resources always in .exe ,(ULONG)ulId diff --git a/src/os2/button.cpp b/src/os2/button.cpp index 838cc7413b..746e0300c4 100644 --- a/src/os2/button.cpp +++ b/src/os2/button.cpp @@ -80,7 +80,7 @@ bool wxButton::Create( wxWindow* pParent, m_hWnd = (WXHWND)::WinCreateWindow( GetHwndOf(pParent) // Parent handle ,WC_BUTTON // A Button class window - ,(PSZ)sLabel.c_str() // Button text + ,sLabel.c_str() // Button text ,lStyle // Button style ,0, 0, 0, 0 // Location and size ,GetHwndOf(pParent) // Owner handle diff --git a/src/os2/checkbox.cpp b/src/os2/checkbox.cpp index 84d93fc94b..2925980a9f 100644 --- a/src/os2/checkbox.cpp +++ b/src/os2/checkbox.cpp @@ -96,7 +96,7 @@ bool wxCheckBox::Create(wxWindow* pParent, void wxCheckBox::SetLabel( const wxString& rsLabel ) { wxString sLabel=::wxPMTextToLabel(rsLabel); - ::WinSetWindowText(GetHwnd(), (PSZ)sLabel.c_str()); + ::WinSetWindowText(GetHwnd(), sLabel.c_str()); } // end of wxCheckBox::SetLabel wxSize wxCheckBox::DoGetBestSize() const diff --git a/src/os2/choice.cpp b/src/os2/choice.cpp index 1e62c4f6c0..0b769aceb8 100644 --- a/src/os2/choice.cpp +++ b/src/os2/choice.cpp @@ -134,7 +134,7 @@ int wxChoice::DoAppend( nIndex = (int)::WinSendMsg( GetHwnd() ,LM_INSERTITEM ,(MPARAM)nIndexType - ,(MPARAM)rsItem.c_str() + ,(MPARAM)rsItem.char_str() ); return nIndex; } // end of wxChoice::DoAppend @@ -157,7 +157,7 @@ int wxChoice::DoInsert( const wxString& rsItem, unsigned int pos ) nIndex = (int)::WinSendMsg( GetHwnd() ,LM_INSERTITEM ,(MPARAM)nIndexType - ,(MPARAM)rsItem.c_str() + ,(MPARAM)rsItem.char_str() ); return nIndex; } // end of wxChoice::DoInsert @@ -232,7 +232,7 @@ void wxChoice::SetString(unsigned int n, const wxString& rsStr) ::WinSendMsg( GetHwnd() ,LM_INSERTITEM ,(MPARAM)nIndexType - ,(MPARAM)rsStr.c_str() + ,(MPARAM)rsStr.char_str() ); if (pData) diff --git a/src/os2/combobox.cpp b/src/os2/combobox.cpp index 2c28d28b70..d3ff05da08 100644 --- a/src/os2/combobox.cpp +++ b/src/os2/combobox.cpp @@ -193,7 +193,7 @@ void wxComboBox::SetValue( if ( HasFlag(wxCB_READONLY) ) SetStringSelection(rsValue); else - ::WinSetWindowText(GetHwnd(), (PSZ)rsValue.c_str()); + ::WinSetWindowText(GetHwnd(), rsValue.c_str()); } // end of wxComboBox::SetValue // @@ -299,7 +299,7 @@ void wxComboBox::Replace( long lFrom, // Now replace with 'value', by pasting. // wxSetClipboardData( wxDF_TEXT - ,(wxObject *)rsValue.c_str() + ,rsValue.c_str() ,0 ,0 ); diff --git a/src/os2/control.cpp b/src/os2/control.cpp index 09bf756b6f..63650453c8 100644 --- a/src/os2/control.cpp +++ b/src/os2/control.cpp @@ -135,8 +135,8 @@ bool wxControl::OS2CreateControl( const wxChar* zClassname, dwStyle &= ~WS_CLIPSIBLINGS; m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle - ,(PSZ)zClass // Window class - ,(PSZ)label.c_str() // Initial Text + ,zClass // Window class + ,label.c_str() // Initial Text ,(ULONG)dwStyle // Style flags ,(LONG)0 // X pos of origin ,(LONG)0 // Y pos of origin @@ -244,7 +244,7 @@ void wxControl::SetLabel( const wxString& rsLabel ) label = ::wxPMTextToLabel(m_label); else label = m_label; - ::WinSetWindowText(GetHwnd(), (PSZ)label.c_str()); + ::WinSetWindowText(GetHwnd(), label.c_str()); } } // end of wxControl::SetLabel diff --git a/src/os2/dc.cpp b/src/os2/dc.cpp index efce57c91e..1a65b1804c 100644 --- a/src/os2/dc.cpp +++ b/src/os2/dc.cpp @@ -1753,7 +1753,7 @@ void wxDC::DrawAnyText( const wxString& rsText, vPtlStart.y = vY; } - PCH pzStr = (PCH)rsText.c_str(); + PCH pzStr = rsText.char_str(); ::GpiMove(m_hPS, &vPtlStart); lHits = ::GpiCharString( m_hPS @@ -2178,7 +2178,7 @@ void wxDC::DoGetTextExtent( // bRc = ::GpiQueryTextBox( m_hPS ,l - ,(PCH)rsString.c_str() + ,rsString.char_str() ,TXTBOX_COUNT // return maximum information ,avPoint // array of coordinates points ); diff --git a/src/os2/dcprint.cpp b/src/os2/dcprint.cpp index 30ba0d7c3a..807340d397 100644 --- a/src/os2/dcprint.cpp +++ b/src/os2/dcprint.cpp @@ -41,8 +41,8 @@ wxPrinterDC::wxPrinterDC( const wxString& rsDriverName, bool bInteractive, int nOrientation ) { - DEVOPENSTRUC vDevOpen = { (char*)rsDeviceName.c_str() - ,(char*)rsDriverName.c_str() + DEVOPENSTRUC vDevOpen = { rsDeviceName.char_str() + ,rsDriverName.char_str() ,NULL ,NULL ,NULL diff --git a/src/os2/dialog.cpp b/src/os2/dialog.cpp index 12d98447d1..e17a1414d8 100644 --- a/src/os2/dialog.cpp +++ b/src/os2/dialog.cpp @@ -222,7 +222,7 @@ bool wxDialog::Show( bool bShow ) wxString title = GetTitle(); if (!title.empty()) - ::WinSetWindowText((HWND)GetHwnd(), (PSZ)title.c_str()); + ::WinSetWindowText((HWND)GetHwnd(), title.c_str()); if ( bShow ) {