如何获得IE窗口的句柄? (100分)

  • 主题发起人 主题发起人 NetBird
  • 开始时间 开始时间
N

NetBird

Unregistered / Unconfirmed
GUEST, unregistred user!
都是简单的问题:<br>1、如何获得IE窗口句柄<br>2、如何将鼠标移动到IE窗口的确定位置(例如(100,100));<br>3、如何发送LButtonDown消息。<br>其中第一个问题对我非常重要,另外两个问题只是想听听大家的方法和我的是否一样,还有没有更简单的。<br>&nbsp; &nbsp; 谢谢
 
怎么没有人回答?分不够我可以再加
 
hwndIE = FindWindow("IEFrame", NULL);
 
参考下面一些代码:<br><br>IEFrame(IE的主窗口)-&gt;WorkerA-&gt;RebarWindow32-&gt;ComboBoxEx32-&gt;ComboBox-&gt;Edit。 <br><br>&nbsp; &nbsp; hwndIE = FindWindow("IEFrame", NULL); <br>&nbsp; &nbsp; &nbsp;hwndWorker = FindWindowEx(hwndIE, 0, "WorkerA", NULL); <br>&nbsp; &nbsp; &nbsp;hwndToolbar = FindWindowEx(hwndWorker, 0, "rebarwindow32", NULL); <br>&nbsp; &nbsp; &nbsp;hwndComboboxex = FindWindowEx(hwndToolbar, 0, "comboboxex32", NULL); <br>&nbsp; &nbsp; &nbsp;hwndCombo = FindWindowEx(hwndComboboxex,0,"ComboBox", NULL); <br>&nbsp; &nbsp; &nbsp;hwndEdit = FindWindowEx(hwndCombo,0, "Edit", NULL); <br>&nbsp; &nbsp; &nbsp;SendMessage (hwndEdit, WM_GETTEXT, 255, buffer);
 
后退
顶部