import win.ui;
/*DSG{{*/
var winform = win.form(text="aardio form";right=759;bottom=469)
winform.add()
/*}}*/
import win.ui.menu
var menu = win.ui.popmenu(winform)
menu.addTable( {
{ "启动"; function(id){
var s = menu.getString(1)=="启动" ? "停止" : "启动"
menu.setString(1, s)
} }; { /*分隔线*/ }
{ "退出程序"; function(id){
winform.close()
} };
} )
winform.wndproc = function(hwnd,message,wParam,lParam){
select( message ) {
case 0x205/*_WM_RBUTTONUP*/{
//鼠标右键弹起,下面获取坐标
var x,y = win.getMessagePos(lParam);
menu.popup(x,y)
}
}
}
winform.show();
win.loopMessage();