1. new wxList code
2. fixes to allow compilation at -W4 with VisualC++ 6.0 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -231,10 +231,10 @@ void wxMenu::Append(int Id, const wxString& label,
|
||||
void wxMenu::Delete(int id)
|
||||
{
|
||||
wxNode *node;
|
||||
wxMenuItem *item;
|
||||
int pos;
|
||||
HMENU menu;
|
||||
|
||||
wxMenuItem *item = NULL;
|
||||
for (pos = 0, node = m_menuItems.First(); node; node = node->Next(), pos++) {
|
||||
item = (wxMenuItem *)node->Data();
|
||||
if (item->GetId() == id)
|
||||
@@ -310,9 +310,9 @@ void wxMenu::SetTitle(const wxString& label)
|
||||
{
|
||||
if ( !label.IsEmpty() )
|
||||
{
|
||||
if ( !InsertMenu(hMenu, 0, MF_BYPOSITION | MF_STRING,
|
||||
idMenuTitle, m_title) ||
|
||||
!InsertMenu(hMenu, 1, MF_BYPOSITION, -1, NULL) )
|
||||
if ( !InsertMenu(hMenu, 0u, MF_BYPOSITION | MF_STRING,
|
||||
(unsigned)idMenuTitle, m_title) ||
|
||||
!InsertMenu(hMenu, 1u, MF_BYPOSITION, (unsigned)-1, NULL) )
|
||||
{
|
||||
wxLogLastError("InsertMenu");
|
||||
}
|
||||
@@ -332,9 +332,9 @@ void wxMenu::SetTitle(const wxString& label)
|
||||
else
|
||||
{
|
||||
// modify the title
|
||||
if ( !ModifyMenu(hMenu, 0,
|
||||
if ( !ModifyMenu(hMenu, 0u,
|
||||
MF_BYPOSITION | MF_STRING,
|
||||
idMenuTitle, m_title) )
|
||||
(unsigned)idMenuTitle, m_title) )
|
||||
{
|
||||
wxLogLastError("ModifyMenu");
|
||||
}
|
||||
@@ -667,7 +667,7 @@ bool wxMenuBar::Checked(int Id) const
|
||||
if (!item)
|
||||
return FALSE;
|
||||
|
||||
int Flag ;
|
||||
int Flag = 0;
|
||||
|
||||
if (itemMenu->m_hMenu)
|
||||
Flag=GetMenuState((HMENU)itemMenu->m_hMenu, Id, MF_BYCOMMAND) ;
|
||||
@@ -892,8 +892,11 @@ wxMenuItem *wxMenuBar::FindItemForId (int Id, wxMenu ** itemMenu) const
|
||||
wxMenuItem *item = NULL;
|
||||
int i;
|
||||
for (i = 0; i < m_menuCount; i++)
|
||||
if ((item = m_menus[i]->FindItemForId (Id, itemMenu)))
|
||||
{
|
||||
item = m_menus[i]->FindItemForId (Id, itemMenu);
|
||||
if (item)
|
||||
return item;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user