[Project64] Clean up Menu Class.cpp
This commit is contained in:
parent
9e744ef180
commit
003bcc9096
|
@ -1,11 +1,12 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
CBaseMenu::CBaseMenu () :
|
||||
m_MenuHandle((HMENU)CreateMenu())
|
||||
CBaseMenu::CBaseMenu() :
|
||||
m_MenuHandle((HMENU)CreateMenu())
|
||||
{
|
||||
}
|
||||
|
||||
bool CBaseMenu::AddMenu(HMENU hMenu, MenuItemList Items ) {
|
||||
bool CBaseMenu::AddMenu(HMENU hMenu, MenuItemList Items)
|
||||
{
|
||||
if (Items.begin() == Items.end()) { return false; }
|
||||
|
||||
UINT ItemID, uFlags;
|
||||
|
@ -43,7 +44,7 @@ bool CBaseMenu::AddMenu(HMENU hMenu, MenuItemList Items ) {
|
|||
ItemID = (UINT)CreatePopupMenu();
|
||||
uFlags |= MF_POPUP;
|
||||
|
||||
AddMenu((HMENU)ItemID,*SubMenu);
|
||||
AddMenu((HMENU)ItemID, *SubMenu);
|
||||
}
|
||||
|
||||
if (ItemID == ID_PLUGIN_MENU)
|
||||
|
@ -55,7 +56,7 @@ bool CBaseMenu::AddMenu(HMENU hMenu, MenuItemList Items ) {
|
|||
lpmii.cbSize = sizeof(MENUITEMINFO);
|
||||
lpmii.fMask = MIIM_STATE;
|
||||
lpmii.fState = 0;
|
||||
SetMenuItemInfo((HMENU)ItemID, (DWORD)MenuItem->SubMenu(), FALSE,&lpmii);
|
||||
SetMenuItemInfo((HMENU)ItemID, (DWORD)MenuItem->SubMenu(), FALSE, &lpmii);
|
||||
}
|
||||
|
||||
if (MenuItem->ShortCut().empty() == false)
|
||||
|
@ -65,8 +66,7 @@ bool CBaseMenu::AddMenu(HMENU hMenu, MenuItemList Items ) {
|
|||
String += MenuItem->ShortCut();
|
||||
Text = String;
|
||||
}
|
||||
AppendMenuW(hMenu,uFlags,ItemID,Text.c_str());
|
||||
AppendMenuW(hMenu, uFlags, ItemID, Text.c_str());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue