BOOL CALLBACK SendQQ(HWND hwnd, LPARAM lParam)
{
TCHAR szQQClassName[MAXBYTE];
memset(szQQClassName, ‘0‘, sizeof(szQQClassName));
GetClassName(hwnd, szQQClassName, MAXBYTE);
if (0 == StrCmpW(szQQClassName, L"TXGuiFoundation"))
{
PostMessage(hwnd, WM_CHAR, 0x31, 0);
}
return TRUE;
}
void CQQSender2Dlg::OnBnClickedButton1()
{
// TODO: 在此添加控件通知处理程序代码
EnumWindows(SendQQ, 0);
}
时间: 2024-10-05 14:16:36