其他分享
首页 > 其他分享> > TC4.3 右键菜单

TC4.3 右键菜单

作者:互联网

功能 右键菜单()     var Mx,My  // 装载鼠标座标     mouse.getmousepoint(Mx,My)     // 得到鼠标位置          Hmnu=dllcall("user32.dll","long","CreatePopupMenu")  // 创建弹出式菜单     dllcall("user32.dll","long","AppendMenuA","long",Hmnu,"long",0,"long",1,"char *","怀孕次数")     dllcall("user32.dll","long","AppendMenuA","long",Hmnu,"long",0,"long",2,"char *","活产次数")     //  添加菜单内容  注 :  第3个参数 1 是下一个函数返回的ID值 每次添加一个内容建议加+1(数字)   第4个参数 "菜单内容" 是显示的内容 可以随便更改     //  如果有多个内容 请复制上面  更改返回的ID  和 显示的内容        返回的ID=dllcall("user32.dll","long","TrackPopupMenu","long",Hmnu,"long",256,"long",Mx,"long",My,"long",0,"long",window.getmyhwnd(),"long",0)     // 显示弹出式菜单//没有选择返回0      help.messagebox(返回的ID) 功能结束

标签:Hmnu,菜单,TC4.3,long,dll,user32,右键,dllcall
来源: https://www.cnblogs.com/xztbb/p/14723079.html