|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
void CLlkfuzhuDlg::OnBUTTONhuode()
{
// TODO: Add your control notification handler code here
RECT r1;
POINT OldP;
//找到窗体
HWND gameh = ::FindWindow(NULL,L"QQ游戏 - 连连看角色版");
//设置窗体属性
::SetWindowPos(gameh,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_SHOWWINDOW);
//得到窗体位置
::GetWindowRect(gameh,&r1);
//656 567
//保存原始鼠标位置
GetCursorPos(&OldP);
//设置鼠标位置
SetCursorPos(r1.left+656,r1.top+567);
//模拟鼠标单击事件
//抬起
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
//压下
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
//抬起
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
//休息一下
Sleep(200);
//还原鼠标原始位置
SetCursorPos(OldP.x,OldP.y);
return;
}
--------------------Configuration: llkfuzhu - Win32 Debug--------------------
Compiling...
StdAfx.cpp
Compiling...
llkfuzhu.cpp
llkfuzhuDlg.cpp
Generating Code...
Linking...
LINK : fatal error LNK1104: cannot open file "mfc42ud.lib"
执行 link.exe 时出错.
llkfuzhu.exe - 1 error(s), 0 warning(s)
|
|