不知道哪里错了因为可以能是者FindWindowEx的问题,各位高手帮一下看看哪错了
HWNDgameh;RECTr1;RECTr2;voidCWgDlg::OnButton2(){gameh=::FindWindowEx("0001053C","0001...
HWND gameh;
RECT r1;
RECT r2;
void CWgDlg::OnButton2()
{
gameh=::FindWindowEx("0001053C","0001057E","CabinetWClass","我的文档");
::GetWindowRect(gameh,&r1);
SetCursorPos(184+r1.left,168+r1.top);
}
错误提示error C2664: 'FindWindowExA' : cannot convert parameter 1 from 'char [9]' to 'struct HWND__ *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
执行 cl.exe 时出错. 展开
RECT r1;
RECT r2;
void CWgDlg::OnButton2()
{
gameh=::FindWindowEx("0001053C","0001057E","CabinetWClass","我的文档");
::GetWindowRect(gameh,&r1);
SetCursorPos(184+r1.left,168+r1.top);
}
错误提示error C2664: 'FindWindowExA' : cannot convert parameter 1 from 'char [9]' to 'struct HWND__ *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
执行 cl.exe 时出错. 展开
1个回答
2013-12-12
展开全部
FindWindowEx(0001053C,0001057E,"CabinetWClass","我的文档");前两个参数是句柄,不应该用字符串,把引号去掉
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询