[AAuto]批量添加按钮及注册命令演示
import win.ui;/*DSG{{*/var winform = ..win.form( exmode="none";bgcolor=1;text="液晶显示器坏点检测";bottom=400;parent=...;right=600;border="none";maxmize=1 ) winform.add( )/*}}*/ var colorIndex,color = 1;var colorTable = { 1;0xFF0000;0x0000FF;0x00FF00;0xFFFFFF } winform.wndproc = function(hwnd,message,wParam,lParam){ select( message ) { case 0x202/*_WM_LBUTTONUP*/{ colorIndex,color = table.next(colorTable, colorIndex ) if(!colorIndex){ return winform.close(); } winform.bgcolor = color; winform.redraw() } } } winform.show() win.loopMessage();return winform;
赞 (0)