C
chenybin
Unregistered / Unconfirmed
GUEST, unregistred user!
MSDN里面说如果用MF_POPUP,那么就可以建立子菜单,但是关键问题在于,后面那个参数是连接子菜单的那个菜单项的句柄<br>楼主在你自己的代码上添加一个全局变量SubM<br>然后修改楼主建立菜单的代码<br> mainmenu := CreatePopupMenu;<br> SubM := CreateMenu;<br> AppendMenu(Subm,MF_STRING,101,'delphibbs');<br> AppendMenu(Subm,MF_STRING,102,'chenybin');<br> AppendMenu(Subm,MF_STRING,103,'大家好'); <br> for i := 0 to maincount do<br> AppendMenu(mainmenu, MF_STRING, i, PChar(mainstr));<br><br>// 添加子菜单<br> AppendMenu(mainmenu,MF_POPUP,SubM,'子菜单(&F)');<br><br>楼主这个是你要的效果吗?