以下是引用theblur在2006-9-8 3:27:42的发言:
不知道是不是按照你的意思改的……现在问题差不多:
---------------------------------
#include <windows.h>
#define timerID
//HWND hWnd;
void CNetworkRefresherDlg::OnButtonStart()
{
//::SetTimer(hWnd,timerID, 60000, NULL); //error 1
this->SetTimer(1, 60000, NULL);
}
void CNetworkRefresherDlg::OnButtonStop()
{
//::KillTimer(hWnd,timerID); //error 2
this->KillTimer(1);
}
void CWnd::OnTimer(UINT nIDEvent)
{
//CWnd * hWNCWnd = FindWindow(NULL, _T("Wireless Network Connection"));
static HWND hWNCWnd = ::FindWindow(NULL, _T("Wireless Network Connection"));
if(::IsWindow(hWNCWnd))
::SendMessage(hWNCWnd, WM_COMMAND, (WPARAM)0xA220, 0); //error 3
}
-----------------------------------------
报错:
Error 1 error C2059: syntax error : ','
Error 2 error C2059: syntax error : ')'
Error 3 error C2664: 'SendMessageW' : cannot convert parameter 1 from 'CWnd *' to 'HWND'
-----------------------------------------
或者您再说得具体些?
原來朋友仔感情再天真, 亦是我永遠也會愛惜的人, 明日愛他人, 也記住學會不要緊; 原來朋友比戀人更高分, 亦讓我開始懂得不記恨, 若大家都敏感, 我更要永遠記得拒絕再因小事怪人, 爲何沒有這條校訓...Twins-朋友仔 MCSD Training