Compilation fix for wxCStrData handling.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis
2007-04-06 20:06:41 +00:00
parent f8ab85ae72
commit f450b5cf10
6 changed files with 21 additions and 21 deletions

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

View 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))

View 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()
);
//

View 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())
{

View 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();
}
//

View 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