为什么小弟我的Ontimer始终无法执行

为什么我的Ontimer始终无法执行?
我要让ontimer实现的功能就是作为定时器,每100毫秒就让offset这个值增加5 
代码如下:求哪位大哥给与帮助撒!!!

SetTimer(1,1000,NULL);   


void CAboutDlg::OnTimer(UINT_PTR nIDEvent)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
offset+=5;
CDialogEx::OnTimer(nIDEvent);
//RedrawWindow();

}
c++,ontimer

------解决方案--------------------
你的SetTimer函数,是在CAboutDlg类内启动的吗?

------解决方案--------------------
你要在CAboutDlg中启动,放在OnInitDialog()中,如果没有就重载一个
------解决方案--------------------
别在OnPaint里启动定时器,在对应的对话框里启动定时器,响应WM_TIMER消息
------解决方案--------------------
定时器只需启动一次就行了,待不用的时候KillTimer(X)就行了。放到OnPaint()函数里面岂不是要狂刷定时器?
另外,很少在CAboutDlg类中使用Timer(),因为较少在此类中干活。
------解决方案--------------------
放到初始化函数里面啊,onpaint函数会被调用好几次
------解决方案--------------------
大神呢,CAboutDlg需要设置什么定时器啊。有效果吗?
CAboutDlg是关于界面。也就显示个版本信息而已啊为什么小弟我的Ontimer始终无法执行
------解决方案--------------------
在下面类似下面的地方添加定时器的消息说明 ON_WM_TIMER()

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
ON_WM_TIMER()
END_MESSAGE_MAP()
------解决方案--------------------
添加断点,看能进去不》
------解决方案--------------------

class CAboutDlg : public CDialog
{
public:
CAboutDlg();

// 对话框数据
enum { IDD = IDD_ABOUTBOX };
UINT m_Timer;
protected:
virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

// 实现
protected:
DECLARE_MESSAGE_MAP()

public:
virtual BOOL OnInitDialog();
afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg void OnBnClickedOk();
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
ON_WM_TIMER()
ON_BN_CLICKED(IDOK, &CAboutDlg::OnBnClickedOk)
END_MESSAGE_MAP()

int iInum = 0;
void CAboutDlg::OnTimer(UINT_PTR nIDEvent)
{
//响应消息
CString strPrint = _T("");
strPrint.Format(_T("%03.3d"), iInum++);
CClientDC dc(this);
dc.TextOut(0,0, strPrint);
CDialog::OnTimer(nIDEvent);
}

BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();
//启动计时器
m_Timer = SetTimer(1, 1000, 0);
return TRUE; 
}

void CAboutDlg::OnBnClickedOk()
{
//关闭计时器
KillTimer(m_Timer);
OnOK();
}

------解决方案--------------------