利用API产生菜单~~~<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> uMenu,uSubMenu :HMenu;<br>begin<br> uSubMenu := CreatePopupMenu;<br> AppendMenu(uSubMenu, MF_ENABLED or MF_UNCHECKED or MF_STRING,<br> 2, '关闭');<br> uMenu :=CreateMenu;<br> AppendMenu(uMenu, MF_ENABLED or MF_POPUP<br> or MF_UNCHECKED or MF_STRING, uSubMenu, '文件');<br> SetMenu(Handle, uMenu);<br>end;