如何用FindWindowEx来搜索 edit 类的窗口?
FindWindowEx()函数,要求类名和text参数,而Edit类却没有文字说明,我该怎么做?
我是菜鸟,我的问题自己也说不清。
用spy++可以查到窗口的句柄,那是一窜数字,怎么把这些数字转换成窗口指针?
程序代码:void CTest_sumDlg::OnButton3()
{
// TODO: Add your control notification handler code here
int x,y;
CPoint p;
if(!hw3)MessageBox("fail to find window");else
{
CRect r;
::GetWindowRect(hw3,r);
x=(r.left+r.right)/2; y=(r.top+r.bottom)/2;
GetCursorPos(&p); SetCursorPos(x,y);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
::Sleep(5);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
SetCursorPos(p.x,p.y);
}
}