- Use the menu editor to insert a new, empty menu in your project's resource file.
- Type some characters in the left top-level item, and then add your menu items in the resulting pop-up menu.
- Use ClassWizard to add a WM_CONTEXTMENU message handler in your view class or in some other window class that receives mouse-click messages. Code the handler as shown below.
void CMyView::OnContextMenu(CWnd *pWnd, CPoint point) { CMenu menu; menu.LoadMenu(IDR_MYFLOATINGMENU); menu.GetSubMenu(0) ->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this); }You can use ClassWizard to map the floating menu's command IDs the same way you would map the frame menu's command IDs.
Floating Pop-Up Menus
原创
©著作权归作者所有:来自51CTO博客作者tridrop的原创作品,请联系作者获取转载授权,否则将追究法律责任
Floating Pop-Up Menus是在用户接口设计中最新倾向之一,就是右击出来个菜单供用户选择的那种。
使用步骤:
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
安装Anaconda时Setting up the package cache卡住不动怎么办?
本文介绍在Windows电脑中,安装Anaconda时,安装进度卡在“Setting up the package cache”阶段的一种解决方法~
Windows Anaconda Python 安装 开发环境 -
Using the Image control as a pop up
The following example shows how you can use the PopUpManager class to launch an modal Image control.
addPopUp centerPopUp Image modal PopUpManager -
Creating a pop up TitleWindow using the PopUpButton control in Flex
The following example shows how you can create a pop up TitleWindow container using the Flex PopUpButton control
ArrayCollection PopUpButton TitleWindow Repeater ToolBar
















