本文整理汇总了C++中MenuManager::PreparePlayerCommands方法的典型用法代码示例。如果您正苦于以下问题:C++ MenuManager::PreparePlayerCommands方法的具体用法?C++ MenuManager::PreparePlayerCommands怎么用?C++ MenuManager::PreparePlayerCommands使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MenuManager
的用法示例。
在下文中一共展示了MenuManager::PreparePlayerCommands方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetMenu
ITSMenu* PlayListPane::GetMenu(UINT idx)
{
switch (idx)
{
case BTN_Options:
{
PrgAPI* pAPI = PRGAPI();
MediaPlayer* pPlayer = pAPI->GetMediaPlayer();
MenuManager* pMM = pAPI->GetMenuManager();
MenuCommandsEnum cmd = (MenuCommandsEnum) idx;
ITSMenu& mnu = GetInternalMenu(M_Main);
pMM->PreparePlayerCommands(*pPlayer);
mnu.CheckMenuItem(MI_ShowNumbers, m_PlayList.GetConfigurationOption(CPlayListListCtrl::C_ShowNumbers) != 0);
return &mnu;
}
break;
case BTN_QuickSearch:
{
PrgAPI* pAPI = PRGAPI();
QuickSearchDlg* pQSDlg = pAPI->GetQuickSearchDlg();
pQSDlg->SetSearchText(_T(""));
pQSDlg->ShowRelative(AfxGetMainWnd(), QuickSearchDlg::RP_Centered);
return NULL;
}
break;
default:
return NULL;
}
return NULL;
}
示例2: ShowTrayMenu
void CTeenSpiritDlg::ShowTrayMenu(CPoint& pt)
{
PrgAPI* pAPI = PRGAPI();
MenuManager* pMM = pAPI->GetMenuManager();
ITSMenu& trayMenu = pMM->GetMenu(MenuManager::MNU_Tray);
pMM->PrepareMenu(MenuManager::MNU_Tray);
pMM->PreparePlayerCommands(*pAPI->GetMediaPlayer());
//=== This handling is done because otherwise the menu will not disappear when the user clicks outside
SetForegroundWindow();
trayMenu.TrackPopupMenu(pt.x, pt.y, GetSafeHwnd());
PostMessage(WM_NULL, 0, 0);
}