void main()
{
int i=1;
while(i<10)
{
HCURSOR hcur = LoadCursor(NULL,IDC_CROSS);// 加载系统预置的鼠标样式
//HWND h=GetForegroundWindow();
// 获取屏幕鼠标坐标
POINT pt;
POINT pt1;
GetCursorPos(&pt);
printf("%d %d\n",pt.x,pt.y);
pt1=pt;
// 获取窗口鼠标坐标
HWND h= WindowFromPoint(pt);
// 获取窗口标题
char text[200];
GetWindowText(h,(text),200);
printf("%s\n",text);
ScreenToClient(h,&pt);
printf("%d %d\n",pt.x,pt.y);
SetCursorPos(pt1.x+10,pt1.y+10);
DWORD erro = SetClassLong(h, GCL_HCURSOR, (long)hcur); // 设置窗口类的鼠标样式
DWORD erro1 = GetLastError();
cout<<"设置鼠标的返回值:"<
}
}