// id is the numeric id for normal menu items and HMENU for submenus as
// required by ::AppendMenu() API
// id is the numeric id for normal menu items and HMENU for submenus as
// required by ::AppendMenu() API
wxMenu *submenu = pItem->GetSubMenu();
if ( submenu != NULL ) {
wxASSERT_MSG( submenu->GetHMenu(), wxT("invalid submenu") );
submenu->SetParent(this);
wxMenu *submenu = pItem->GetSubMenu();
if ( submenu != NULL ) {
wxASSERT_MSG( submenu->GetHMenu(), wxT("invalid submenu") );
submenu->SetParent(this);
for ( i = 0, it = m_menus.begin(); i < count; i++, it++ )
{
if ( !::AppendMenu((HMENU)m_hMenu, MF_POPUP | MF_STRING,
for ( i = 0, it = m_menus.begin(); i < count; i++, it++ )
{
if ( !::AppendMenu((HMENU)m_hMenu, MF_POPUP | MF_STRING,
UINT flagsOld = ::GetMenuState((HMENU)m_hMenu, mswpos, MF_BYPOSITION);
if ( flagsOld == 0xFFFFFFFF )
{
UINT flagsOld = ::GetMenuState((HMENU)m_hMenu, mswpos, MF_BYPOSITION);
if ( flagsOld == 0xFFFFFFFF )
{
info.fType = MFT_STRING;
info.cch = label.length();
info.dwTypeData = wx_const_cast(wxChar *, label.wx_str());
info.fType = MFT_STRING;
info.cch = label.length();
info.dwTypeData = wx_const_cast(wxChar *, label.wx_str());
- if ( !SetMenuItemInfo(GetHmenu(), id, TRUE, & info) )
+ if ( !SetMenuItemInfo(GetHmenu(), id, TRUE, &info) )
if ( !::InsertMenu(GetHmenu(), (UINT)mswpos,
MF_BYPOSITION | MF_POPUP | MF_STRING,
if ( !::InsertMenu(GetHmenu(), (UINT)mswpos,
MF_BYPOSITION | MF_POPUP | MF_STRING,
#else
if ( !::InsertMenu(GetHmenu(), mswpos,
MF_BYPOSITION | MF_POPUP | MF_STRING,
#else
if ( !::InsertMenu(GetHmenu(), mswpos,
MF_BYPOSITION | MF_POPUP | MF_STRING,