急!!!如何在用户自定义对象中调用菜单?
如何实现在一个用户对象上显示菜单工具条,或菜单中的某几项在该用户对象上以用户自定义菜单条或菜单按钮的形式显示并调用!
我急死了,大家快帮忙啊,马上给分!
问题点数:42、回复次数:2Top
1 楼susu_0807(苏苏)回复于 2001-07-08 19:25:33 得分 30
These statements display the menu m_Emp.M_Procedures at location 100, 200 in the active window. M_Emp is the menu associated with the window:
m_Emp.M_Procedures.PopMenu(100, 200)
This statement displays the menu m_Appl.M_File at the cursor position, where m_Appl is the menu associated with the window.
m_Appl.M_file.PopMenu(PointerX(), PointerY())
These statements display a popup menu at the cursor position. Menu4 was created in the Menu painter and includes a menu called m_language. Menu4 is not the menu for the active window. NewMenu is an instance of Menu4 (data type Menu4):
Menu4 NewMenu
NewMenu = CREATE Menu4
NewMenu.m_language.PopMenu(PointerX(), PointerY())
In an MDI application, the last line would include the MDI frame as the object for the pointer functions:
NewMenu.m_language.PopMenu( &
w_frame.PointerX(), w_frame.PointerY())Top
2 楼Hanson_bati_zhu(欺世盗名之徒)回复于 2001-07-08 19:45:54 得分 12
找个自定义菜单条对象
试试
http://extend.hk.hi.cn/~kjx/download/toolbar.zip
稍微改一下程序就可以随便用了
现在的程序是获得所在窗口的MENU
改成把某个MENU作为参数传给这个对象Top




