//鼠标指针函数演示

import win.ui;
import win.ui.menu;
import com.picture;
/*DSG{{*/
var winform = win.form(parent=...; min=1;bottom=249;max=1;text="AAuto Form";right=349 )
winform.add( 
button={ bottom=155;text="光标等待";left=110;right=229;top=114;z=1;cls="button" };
static={ notify=1;color=16711680;right=266;left=93;bottom=72;top=41;font=LOGFONT( underline=1;h=-12;name="Microsoft Sans Serif";out=3;family=34;clip=2;quality=1 );align="center";transparent=1;text="www.ecranesoft.com";z=0;edge=1;cls="static" }
)
/*}}*/

import win.cur;

winform.button.oncommand = function(id,event){
	winform.button.text = "请稍候......"
	winform.button.disabled = true;
	
	win.cur.beginWaitCur();//鼠标指针进入等待状态
	win.delay(2000) 
	win.cur.endCur();//还原鼠标指针
	
	winform.button.text = "已完成"
	winform.button.disabled = false;

}

//鼠标回到窗体上时，切换鼠标为箭头
winform.wndproc = function(hwnd,message,wParam,lParam){
	if(message =  0x20/*_WM_SETCURSOR*/){
		win.cur.load(0x7F00/*_IDC_ARROW*/)
		win.cur.setCur();
	} 
}//endproc

//当鼠标指针移到静态控件上是，切换鼠标为手形
var hand = win.cur.load(32649/*_IDC_HAND*/)
winform.static.wndproc = function(hwnd,message,wParam,lParam){
	if(message = 0x200/*_WM_MOUSEMOVE*/) { 
		win.cur.setCur(hand);
	} 
}//endproc


winform.show(true) 
win.loopMessage();
return winform;