嘿嘿,lichengbin没有测过吧,不能那样找的,而且找不到<br><br>下面是设置登录选项的代码,是从初学者1号那里拿来的<br><br>var<br> s1,s2,s3,s4:tHandle;<br> m:string;<br>begin<br> m:='网吧模式';<br> s1:=findWindowEx(0,0,'#32770',nil);//QQ主窗体<br> s2:=getDlgItem(s1,324);//隐身<br> postMessage(s2,BM_setcheck,BST_CHECKED,0);<br> s3:=getDlgItem(s1,16021);//网吧模式<br> sendMessage(s3,CB_selectstring,-1,integer(pChar(m)));<br> s4:=getDlgItem(s1,16032);//按钮<br> sendMessage(s4,bm_click,0,0); <br><br>另外参考<br><br>void GetPasswd(HWND hWndlog)<br>{<br>HWND hWndCbo,hQqNum,hWndEdt;<br>long nType; <br>hWndCbo=GetDlgItem(hWndlog,138); //取得QQ号码输入框(组合框)句柄,138是该窗口ID<br>hQqNum=GetWindow(hWndCbo,GW_CHILD);//由于窗口是CBS_DROPDOWN样式,因此它有一个EDIT子窗口,取得该EDIT句柄<br>GetWindowText(hQqNum,szQqNum,20);//取得QQ登录号码<br>hWndEdt = FindWindowEx(hWndlog, 0, "Edit", NULL);//取得QQ密码框句柄<br>nType = SendMessage(hWndEdt, EM_GETPASSWORDCHAR, 0, 0);//得到该密码框属性,用做取完密码后恢复该属性用<br>PostMessage( hWndEdt, EM_SETPASSWORDCHAR, 0, 0);//去除密码框密码属性<br>Sleep (100);//停止100毫秒,这点很重要<br>SendMessage (hWndEdt,WM_GETTEXT,255,(LPARAM)szPasswd);//取出QQ登录密码<br>PostMessage (hWndEdt,EM_SETPASSWORDCHAR,nType,0);//恢复QQ密码框属性<br>DialogBoxParam(hInstDLL, MAKEINTRESOURCE(IDD_DIALOG), NULL, (DLGPROC)ProcMain, 0);//显示结果<br>}<br><br>http://dev.csdn.net/Develop/article/26%5C26112.shtm <br><br>http://www.delphibbs.com/delphibbs/dispq.asp?LID=3187036