]> git.saurik.com Git - wxWidgets.git/commitdiff
Compilation fix for wxCStrData handling.
authorStefan Neis <Stefan.Neis@t-online.de>
Fri, 6 Apr 2007 20:06:41 +0000 (20:06 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Fri, 6 Apr 2007 20:06:41 +0000 (20:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/os2/dnd.cpp
src/os2/filedlg.cpp
src/os2/listbox.cpp
src/os2/menu.cpp
src/os2/menuitem.cpp
src/os2/notebook.cpp

index e612b2ee65c5b725fa4df26f2dff184e5d2b4f86..3a968d35869f5b04dc663798a73cc2f622b57f12 100644 (file)
@@ -387,7 +387,7 @@ wxDataFormat wxDropTarget::GetSupportedFormat (
         for (i = 0; i < ulItems; i++)
         {
             pDragItem = ::DrgQueryDragitemPtr(pDataSource, i);
-            if (::DrgVerifyRMF(pDragItem, (PSZ)sMechanism.c_str(), (PSZ)sFormat.c_str()))
+            if (::DrgVerifyRMF(pDragItem, sMechanism.c_str(), sFormat.c_str()))
             {
                 bValid = true;
                 break;
index 3c54e02e3a951123288d6a025478e54b884ac46c..06028d0a696d275eb9c15a0f4925c60cb45d0930 100644 (file)
@@ -193,7 +193,7 @@ int wxFileDialog::ShowModal()
     else
         sTheFilter = m_wildCard;
 
-    wxStrtok((wxChar*)sTheFilter.c_str(), wxT("|"), &pzFilterBuffer);
+    wxStrtok(sTheFilter.char_str(), wxT("|"), &pzFilterBuffer);
     while(pzFilterBuffer != NULL)
     {
         if (nCount > 0 && !(nCount % 2))
index ae9fc4101aff2677635cd3836c9f2e174506b2c8..b7990354077a9da47bee2d521e4fb34f5e445714 100644 (file)
@@ -281,7 +281,7 @@ int wxListBox::DoAppend(const wxString& rsItem)
     else
         lIndexType = LIT_END;
 
-    lIndex = (long)::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)rsItem.c_str());
+    lIndex = (long)::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)rsItem.char_str());
     m_nNumItems++;
 
 #if wxUSE_OWNER_DRAWN
@@ -318,7 +318,7 @@ void wxListBox::DoSetItems( const wxArrayString& raChoices,
             lIndexType = LIT_SORTASCENDING;
         else
             lIndexType = LIT_END;
-        ::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)raChoices[i].c_str());
+        ::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)raChoices[i].char_str());
 
         if (ppClientData)
         {
@@ -563,7 +563,7 @@ void wxListBox::DoInsertItems(const wxArrayString& asItems, unsigned int nPos)
         int nIndex = (int)::WinSendMsg( GetHwnd(),
                                         LM_INSERTITEM,
                                         MPFROMLONG((LONG)(i + nPos)),
-                                        (MPARAM)asItems[i].c_str() );
+                                        (MPARAM)asItems[i].char_str() );
 
         wxOwnerDrawn* pNewItem = CreateItem(nIndex);
 
@@ -613,7 +613,7 @@ void wxListBox::SetString(unsigned int n, const wxString& rsString)
     ::WinSendMsg( GetHwnd()
                  ,LM_INSERTITEM
                  ,(MPARAM)nNewN
-                 ,(MPARAM)rsString.c_str()
+                 ,(MPARAM)rsString.char_str()
                 );
 
     //
index ae8c5db5fcf6b0c68ad8748887d3d3c5e85ca380..bd013d35bf249ca55fc1ee7cf25b0617509c22ac 100644 (file)
@@ -287,7 +287,7 @@ bool wxMenu::DoInsertOrAppend( wxMenuItem* pItem,
         rItem.id = (USHORT)pItem->GetId();
     }
 
-    BYTE*                           pData=NULL;
+    char *pData = NULL;
 
 #if wxUSE_OWNER_DRAWN
     if (pItem->IsOwnerDrawn())
@@ -298,7 +298,7 @@ bool wxMenu::DoInsertOrAppend( wxMenuItem* pItem,
         // Will eventually need to set the image handle somewhere into vItem.hItem
         //
         rItem.afStyle             |= MIS_OWNERDRAW;
-        pData                      = (BYTE*)NULL;
+        pData                      = NULL;
         rItem.hItem                = (HBITMAP)pItem->GetBitmap().GetHBITMAP();
         pItem->m_vMenuData.afStyle = rItem.afStyle;
         pItem->m_vMenuData.hItem   = rItem.hItem;
@@ -323,7 +323,7 @@ bool wxMenu::DoInsertOrAppend( wxMenuItem* pItem,
             //
             rItem.afStyle |= MIS_TEXT;
         }
-        pData = (char*)pItem->GetText().c_str();
+        pData = pItem->GetText().char_str();
     }
 
     if (nPos == (size_t)-1)
@@ -562,7 +562,7 @@ void wxMenu::SetTitle( const wxString& rLabel )
     {
         if (!rLabel.empty())
         {
-            if (!::WinSetWindowText(hMenu, (PSZ)rLabel.c_str()))
+            if (!::WinSetWindowText(hMenu, rLabel.c_str()))
             {
                 wxLogLastError(wxT("SetMenuTitle"));
             }
@@ -583,7 +583,7 @@ void wxMenu::SetTitle( const wxString& rLabel )
             //
             // Modify the title
             //
-            if (!::WinSetWindowText(hMenu, (PSZ)rLabel.c_str()))
+            if (!::WinSetWindowText(hMenu, rLabel.c_str()))
             {
                 wxLogLastError(wxT("SetMenuTitle"));
             }
@@ -756,7 +756,7 @@ WXHMENU wxMenuBar::Create()
     //
     if ((m_hMenu =  ::WinCreateWindow( hFrame
                                       ,WC_MENU
-                                      ,(PSZ)NULL
+                                      ,NULL
                                       ,MS_ACTIONBAR | WS_SYNCPAINT | WS_VISIBLE
                                       ,0L
                                       ,0L
@@ -804,7 +804,7 @@ WXHMENU wxMenuBar::Create()
 
             (*it)->m_vMenuData.iPosition = (SHORT)i;
 
-            rc = (APIRET)::WinSendMsg(m_hMenu, MM_INSERTITEM, (MPARAM)&(*it)->m_vMenuData, (MPARAM)m_titles[i].c_str());
+            rc = (APIRET)::WinSendMsg(m_hMenu, MM_INSERTITEM, (MPARAM)&(*it)->m_vMenuData, (MPARAM)m_titles[i].char_str());
             if (rc == (APIRET)MIT_MEMERROR || rc == (APIRET)MIT_ERROR)
             {
                 vError = ::WinGetLastError(vHabmain);
@@ -879,7 +879,7 @@ void wxMenuBar::SetLabelTop(
     }
     nId = vItem.id;
 
-    if (::WinSendMsg(GetHmenu(), MM_SETITEMTEXT, MPFROMSHORT(nId), (MPARAM)rLabel.c_str()));
+    if (::WinSendMsg(GetHmenu(), MM_SETITEMTEXT, MPFROMSHORT(nId), (MPARAM)rLabel.char_str()));
     {
         wxLogLastError(wxT("ModifyMenu"));
     }
@@ -925,7 +925,7 @@ wxMenu* wxMenuBar::Replace(
     if (IsAttached())
     {
         ::WinSendMsg((HWND)m_hMenu, MM_REMOVEITEM, MPFROM2SHORT(nId, TRUE), (MPARAM)0);
-        ::WinSendMsg((HWND)m_hMenu, MM_INSERTITEM, (MPARAM)&pMenu->m_vMenuData, (MPARAM)sTitle.c_str());
+        ::WinSendMsg((HWND)m_hMenu, MM_INSERTITEM, (MPARAM)&pMenu->m_vMenuData, (MPARAM)sTitle.char_str());
 
 #if wxUSE_ACCEL
         if (pMenuOld->HasAccels() || pMenu->HasAccels())
@@ -958,7 +958,7 @@ bool wxMenuBar::Insert( size_t          nPos,
         ::WinSendMsg( (HWND)m_hMenu
                      ,MM_INSERTITEM
                      ,(MPARAM)&pMenu->m_vMenuData
-                     ,(MPARAM)sTitle.c_str()
+                     ,(MPARAM)sTitle.char_str()
                     );
 #if wxUSE_ACCEL
         if (pMenu->HasAccels())
@@ -990,7 +990,7 @@ bool wxMenuBar::Append( wxMenu* pMenu,
     if ( IsAttached() )
     {
         pMenu->m_vMenuData.iPosition = MIT_END;
-        ::WinSendMsg((HWND)m_hMenu, MM_INSERTITEM, (MPARAM)&pMenu->m_vMenuData, (MPARAM)sTitle.c_str());
+        ::WinSendMsg((HWND)m_hMenu, MM_INSERTITEM, (MPARAM)&pMenu->m_vMenuData, (MPARAM)sTitle.char_str());
 #if wxUSE_ACCEL
         if (pMenu->HasAccels())
         {
index 9a0ed8134035ec6d9c425efa62ab0ed600842539..f0b69b5f796b285df9f430db0ab11a376370b4c9 100644 (file)
@@ -415,19 +415,19 @@ void wxMenuItem::SetText( const wxString& rText )
             uFlagsOld |= MIS_SUBMENU;
         }
 
-        BYTE*                       pData;
+        char*                       pData;
 
 #if wxUSE_OWNER_DRAWN
         if (IsOwnerDrawn())
         {
             uFlagsOld |= MIS_OWNERDRAW;
-            pData = (BYTE*)this;
+            pData = (char*)this;
         }
         else
 #endif  //owner drawn
         {
             uFlagsOld |= MIS_TEXT;
-            pData = (BYTE*)m_text.c_str();
+            pData = m_text.char_str();
         }
 
         //
index 07fda9543e45aacd8584d1bb99e12dabe360d3b9..e01175a5136f913d702ce08dcfb09e71e30f32ff 100644 (file)
@@ -266,7 +266,7 @@ bool wxNotebook::SetPageText( size_t nPage,
     return (bool)::WinSendMsg( m_hWnd
                               ,BKM_SETTABTEXT
                               ,MPFROMLONG((ULONG)m_alPageId[nPage])
-                              ,MPFROMP((PSZ)rsStrText.c_str())
+                              ,MPFROMP(rsStrText.c_str())
                              );
 } // end of wxNotebook::SetPageText