非常感谢,我将程序稍作变动,具体化了,但有错,请帮忙看看,环境VS2005:
-------------------------------
#include <windows.h>
#define timerID
HWND hWnd;
void CNetworkRefresherDlg::OnButtonStart()
{
this->SetTimer(hWnd,timerID, 60000, NULL); //Error 1
}
void CNetworkRefresherDlg::OnButtonStop()
{
KillTimer(hWnd,timerID); //Error 2
}
void CWnd::OnTimer(UINT nIDEvent)
{
CWnd * hWNCWnd = FindWindow(NULL, _T("Wireless Network Connection"));
SendMessage(hWNCWnd, WM_COMMAND, (WPARAM)0xA220, 0); //Error 3
}
---------------------------------
报错:
Error 1 error C2059: syntax error : ','
Error 2 error C2059: syntax error : ')'
Error 3 error C2660: 'CWnd::SendMessageW' : function does not take 4 arguments
---------------------------------
我对那个hWnd变量的使用还是不明白,它肯定有错误。谢谢!!