当前位置: 首页>>代码示例>>C++>>正文


C++ MenuManager::GetMenu方法代码示例

本文整理汇总了C++中MenuManager::GetMenu方法的典型用法代码示例。如果您正苦于以下问题:C++ MenuManager::GetMenu方法的具体用法?C++ MenuManager::GetMenu怎么用?C++ MenuManager::GetMenu使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MenuManager的用法示例。


在下文中一共展示了MenuManager::GetMenu方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PRGAPI

ITSMenu& PlayListPane::GetInternalMenu(MenusEnum mnu)
{
	TRACEST(_T("PlayListPane::GetMenu."), mnu);
	ASSERT(mnu < M_Last);
	PrgAPI* pAPI = PRGAPI();
	if (m_pMenu[mnu] == NULL)
		m_pMenu[mnu] = pAPI->CreatePopupMenu();
	ITSMenu& curMenu = *m_pMenu[mnu];
	if (curMenu.GetInternalHandler() != NULL)
		return curMenu;
	curMenu.Create();
	switch (mnu)
	{
	case M_Main:
		{
			MenuManager* pMM = pAPI->GetMenuManager();
			curMenu.AppendMenu(ITSMenu::MIT_Menu, 
				(INT)pMM->GetMenu(MenuManager::MNU_PlayListModes).GetInternalHandler(), (LPTSTR)pAPI->GetString(IDS_MODE));
			
			curMenu.AppendMenu(ITSMenu::MIT_Menu, 
				(INT)pMM->GetMenu(MenuManager::MNU_PlayListSerialization).GetInternalHandler(), (LPTSTR)pAPI->GetString(IDS_PLAYLIST));

			curMenu.AppendMenu(ITSMenu::MIT_Separator, NULL, NULL);
			curMenu.AppendMenu(ITSMenu::MIT_String, MI_ShowNumbers, (LPTSTR)pAPI->GetString(IDS_SHOWNUMBERS));
		}
		break;
	default:
		ASSERT(0);
	}
	return curMenu;
}
开发者ID:KurzedMetal,项目名称:Jaangle,代码行数:31,代码来源:PlayListPane.cpp

示例2: PRGAPI

ITSMenu& WebPane::GetInternalMenu(MenusEnum mnu)
{
	TRACEST(_T("PlayListPane::GetMenu."), mnu);
	ASSERT(mnu < M_Last);
	PrgAPI* pAPI = PRGAPI();
	if (m_pMenu[mnu] == NULL)
		m_pMenu[mnu] = pAPI->CreatePopupMenu();
	ITSMenu& curMenu = *m_pMenu[mnu];
	if (curMenu.GetInternalHandler() != NULL)
		return curMenu;
	curMenu.Create();
	switch (mnu)
	{
	case M_Main:
		{
			MenuManager* pMM = pAPI->GetMenuManager();
			curMenu.AppendMenu(ITSMenu::MIT_Menu, 
				(INT)pMM->GetMenu(MenuManager::MNU_ArtistServices).GetInternalHandler(), (LPTSTR)pAPI->GetString(IDS_ARTIST));

			curMenu.AppendMenu(ITSMenu::MIT_Menu, 
				(INT)pMM->GetMenu(MenuManager::MNU_AlbumServices).GetInternalHandler(), (LPTSTR)pAPI->GetString(IDS_ALBUM));

			curMenu.AppendMenu(ITSMenu::MIT_Menu, 
				(INT)pMM->GetMenu(MenuManager::MNU_TrackServices).GetInternalHandler(), (LPTSTR)pAPI->GetString(IDS_TITLE));
			
			curMenu.AppendMenu(ITSMenu::MIT_Separator, NULL, NULL);
			
			curMenu.AppendMenu(ITSMenu::MIT_String, MI_SyncWithSectionChanger, (LPTSTR)pAPI->GetString(IDS_SYNCWITHSECTIONS));
			curMenu.AppendMenu(ITSMenu::MIT_String, MI_SyncWithTracksChanger, (LPTSTR)pAPI->GetString(IDS_SYNCWITHTRACKS));
			curMenu.AppendMenu(ITSMenu::MIT_String, MI_SyncWithPlayer, (LPTSTR)pAPI->GetString(IDS_SYNCWITHPLAYER));
			
			curMenu.AppendMenu(ITSMenu::MIT_Separator, NULL, NULL);
			
			curMenu.AppendMenu(ITSMenu::MIT_String, MI_UseAsWebViewer, (LPTSTR)pAPI->GetString(IDS_WEBVIEWER));
		}
		break;
	default:
		ASSERT(0);
	}
	return curMenu;
}
开发者ID:KurzedMetal,项目名称:Jaangle,代码行数:41,代码来源:WebPane.cpp

示例3: 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);
}
开发者ID:KurzedMetal,项目名称:Jaangle,代码行数:13,代码来源:TeenSpiritDlg.cpp


注:本文中的MenuManager::GetMenu方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。