首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

请教有关在对话框中定时器的有关问题

2012-03-24 
请问各位高手有关在对话框中定时器的问题小弟我在MFC中新建一个基于对话框的程序,然后在Dlg类InitialDlg中

请问各位高手有关在对话框中定时器的问题
小弟我在MFC中新建一个基于对话框的程序,然后在Dlg类InitialDlg中设置定时器:函数如下SetTimer(4,10000,TimerProc);然后我在Dlg类中添加了TimerProc函数如下:void   CALLBACK   EXPORT   CJiayanshengDlg::TimerProc(
      HWND   hWnd,             //   handle   of   CWnd   that   called   SetTimer
      UINT   nMsg,             //   WM_TIMER
      UINT   nIDEvent,       //   timer   identification
      DWORD   dwTime         //   system   time
){;//处理程序}
可是编译总是出现如下问题:error   C2664:   'SetTimer '   :   cannot   convert   parameter   3   from   'void   (struct   HWND__   *,unsigned   int,unsigned   int,unsigned   long) '   to   'void   (__stdcall   *)(struct   HWN
D__   *,unsigned   int,unsigned   int,unsigned   long) '
                None   of   the   functions   with   this   name   in   scope   match   the   target   type
Error   executing   cl.exe.
请问各位高手这是怎么回事,怎样解决???(不用自带的Ontimer函数)

[解决办法]
void CALLBACK EXPORT CJiayanshengDlg::TimerProc(...
==》
void CALLBACK CJiayanshengDlg::TimerProc(...

热点排行