import win.ui;
tick = 0;
/*DSG{{*/
var winform = win.form(text="aardio form";right=759;bottom=469)
winform.add(
button={cls="button";text="button";left=117;top=84;right=229;bottom=142;z=1};
static={cls="static";text="static";left=83;top=187;right=315;bottom=229;transparent=1;z=2}
)
/*}}*/

winform.button.wndproc = function(hwnd,message,wParam,lParam){
if(message == 0x0201/*_WM_LBUTTONDOWN*/){
winform.static.text = "按下鼠标";
tick = time.tick();
}
if(message == 0x0202/*_WM_LBUTTONUP*/){
winform.static.text = "放开鼠标";
jg = time.tick() - tick;
if(jg > 300){
winform.static.text = "长按。ms:" ++ jg ;
}else {
winform.static.text = "单击。ms:" ++ jg;
}
}

}

winform.show()
win.loopMessage();