Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4188149
  • 博文数量: 776
  • 博客积分: 13014
  • 博客等级: 上将
  • 技术积分: 10391
  • 用 户 组: 普通用户
  • 注册时间: 2010-02-22 17:00
文章分类

全部博文(776)

文章存档

2015年(55)

2014年(43)

2013年(147)

2012年(20)

2011年(82)

2010年(429)

分类: LINUX

2013-08-18 16:37:28

cpp文件中添加:                                                                                                    
BEGIN_MESSAGE_MAP(CDlgImage, CDialog)
//{{AFX_MSG_MAP(CDlgImage)
ON_WM_TIMER()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

BOOL CDlgImage::OnInitDialog() 
{
    CDialog::OnInitDialog();

// TODO: Add extra initialization here
    m_timerID1 = this->SetTimer(24, 50, NULL);

    return TRUE;  // return TRUE unless you set the focus to a control
}


void CDlgImage::OnTimer(UINT nIDEvent) 
{
    ... ...
    CDialog::OnTimer(nIDEvent);
    KillTimer(m_timerID1);
}


头文件中添加:                                                                                                      
UINT m_timerID1;

// Generated message map functions
//{{AFX_MSG(CDlgImage)
virtual BOOL OnInitDialog();
virtual void OnOK();
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()



阅读(1438) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~