VOID mouse_event(
DWORD dwFlags, // flags specifying various motion/click variants
DWORD dx, // horizontal mouse position or position change
DWORD dy, // vertical mouse position or position change
DWORD dwData, // amount of wheel movement
DWORD dwExtraInfo
// 32 bits of application-defined information
);
DWORD dwFlags, // flags specifying various motion/click variants
DWORD dx, // horizontal mouse position or position change
DWORD dy, // vertical mouse position or position change
DWORD dwData, // amount of wheel movement
DWORD dwExtraInfo
// 32 bits of application-defined information
);
模拟鼠标滚动,滚动到窗口的X的位置,也就是取得窗口的右上角的坐标,然后,鼠标滚动到窗口右上角坐标(x-2,y-2)的位置,
用这个API实现:
BOOL SetCursorPos( int X, // horizontal position
int Y // vertical position
);
这时再给窗口发一个关闭的消息就是了。
程序退出时SendMessage,发送一个鼠标左键的消息就可以了!
mouse_event我试过啦,能够满足我的需要,发分喽~~~~