![]() |
#2
radcat2008-04-23 10:51
|

char passid[128];
int i=0;
HWND hwndform=::FindWindow(0,"QQ用户登录");
if(hwndform!=NULL){
HWND hwndlist=::GetDlgItem(hwndform,138);
::SetForegroundWindow(hwndlist);
::SetFocus(hwndlist);
i=::GetWindowText(hwndlist,(LPSTR)passid,sizeof(passid));
以下省略......
hwndform是QQ登录框的句柄,hwndlist是输入帐号那个文本框的句柄
我帐号文本框里有QQ号,但为什么i的返回值始终是0呢?