结果:
DeskTopPos:
X: 680 Y: 592
ClientPos:
X: 586 Y: 444
请按任意键如配皮继续. . .
代码:
#include
#include "stdlib.h"
#include
main()
{
HWND hConsole = FindWindow("ConsoleWindowClass", NULL);
POINT pt;
GetCursorPos(&pt);
printf("DeskTopPos:\nX:%4i Y:%4i\n", pt.x, pt.y);
ScreenToClient(hConsole, &pt);
printf("ClientPos:\nX:%4i Y:%4i\n", pt.x, pt.y);
fflush(stdin);
system("pause");
}
函数连接:卖枝
http://baike.baidu.com/view/1080506.htm
http://baike.baidu.com/view/1079910.htm
楼主好运!渣差