分类: C/C++
2012-01-27 02:55:55
Called by the framework before a shortcut menu is displayed on one of the tabs. Valid for MDI Tabbed Groups only.
virtual BOOL OnShowMDITabContextMenu(
CPoint point,
DWORD dwAllowedItems,
BOOL bTabDrop
);
Parameters
[in] point
The location of the menu in screen coordinates.
[in] dwAllowedItems
A bitwise-OR combination of flags that indicates what actions are allowed for the current tab:
*BCGP_MDI_CREATE_VERT_GROUP - can create a vertical tab group.
*BCGP_MDI_CREATE_HORZ_GROUP - can create a horizontal tab group.
*BCGP_MDI_CAN_MOVE_PREV - can move a tab to the previous tab group.
*BCGP_MDI_CAN_MOVE_NEXT - can move a tab to the next tab group.
*BCGP_MDI_CAN_BE_DOCKED - switch a tabbed document to docked state (relevant for tabbed documents only).
[in] bTabDrop
TRUE to display the menu as a result of dragging the tab onto another tabbed group. FALSE to display the menu as a shortcut menu on the currently active tab.
Return Value
Override this method in a CMDIFrameWndEx Class-derived class.
有关的信息可以参考 例子,下面是例子截图:
MSDN上的例子为:
然后在在MainFrm.h中,添加声明virtual BOOL OnShowMDITabContextMenu(CPoint point, DWORD dwAllowedItems, BOOL bDrop);即可。
其他资料:http://hi.baidu.com/20794027/blog/item/6cffdbdb3285c06ed0164ed2.html