SETTIMER
火星种萝卜 2008-11-24 09:59:17 请问各位大侠:我在一个多文档的应用程序中,在BOOL CMfcexp4_1App::InitInstance()中调用了SETTIMER()函数,但是但是编译时,却说“error C2660: 'SetTimer' : function does not take 3 parameters” 查阅发现原因是此时我的SETTIMER()用在了全局函数中,而不是在CWnd类中或者是派生类中调用的,我又查了一下SetTimer()的定义,
The SetTimer function creates a timer with the specified time-out value.
1. UINT SetTimer(
HWND hWnd, // handle of window for timer messages
UINT nIDEvent, // timer identifier
UINT uElapse, // time-out value
TIMERPROC lpTimerFunc // address of timer procedure
);
2.
CWnd::SetTimer
UINT SetTimer( UINT nIDEvent, UINT nElapse, void (CALLBACK EXPORT* lpfnTimer)(HWND, UINT, UINT, DWORD) );
我若在CMfcexp4_1App::InitInstance() 中调用SetTimer()应属于第一种情况,但是第一个参数我有点不知道应该为什么,我知道这个窗口的句柄应为CMfc4_1View的句柄,但是我应该在哪里找呢?请各位大侠帮我看看。