回复 2# 灭火的风 的帖子
那 我看到还有个 Sleep(5) 不知道由什么用!!
void CGetQQRobtDlg::OnTimer(UINT nIDEvent)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
if(nIDEvent == 111)
{
HWND SendWnd = NULL;
HWND GetWnd = NULL;
HWND BtWnd = NULL;
char szName[128];
sprintf(szName, "与 %s 交谈中", m_strName.GetBuffer(0));
GetQQWnd(szName,GetWnd,SendWnd,BtWnd);
/*char ch[100] = "测试";*/
::SendMessageA(SendWnd, 177, 0, (LPARAM)"-1");
::SendMessageA(SendWnd, 194, 1, (LPARAM)m_strChat.GetBuffer(0));
Sleep(5);// ???
::SendMessage(BtWnd,WM_LBUTTONDOWN,0,0);
::SendMessage(BtWnd,WM_LBUTTONUP,0,0);
}
CDialog::OnTimer(nIDEvent);
}