一个关于响应CPropertySheet “OK”按钮(确认)按钮的方法试验

CSDN学院讲师招募,诚邀您加入!博客Markdown编辑器上线啦PMBOK第五版精讲视频教程火星人敏捷开发1001问

一个关于响应CPropertySheet “OK”按钮(确认)按钮的方法试验

分类:VC

1. Add this to the property sheet’s structure.: : // Generated message map functions: protected:: //{{AFX_MSG(CMyPropertySheet): // NOTE – the ClassWizard will add and remove member functions here.: afx_msg void OnOK();: //}}AFX_MSG: DECLARE_MESSAGE_MAP(): };: : : 2. Add a message map for the OnOK event handler in the property sheet’s *.cpp file.: : BEGIN_MESSAGE_MAP(CMyPropertySheet, CPropertySheet): //{{AFX_MSG_MAP(CMyPropertySheet): // NOTE – the ClassWizard will add and remove mapping macros here.: ON_COMMAND(IDOK, OnOK): //}}AFX_MSG_MAP: END_MESSAGE_MAP(): : : : 3. Now just add the event handler itself. This one just displays something.: : void CMyPropertySheet::OnOK(): {: AfxMessageBox("Hello World");: CPropertySheet::OnClose();: }: : : That last function should have looked like this:void CMyPropertySheet::OnOK(){AfxMessageBox("Hello World");CPropertySheet::EndDialog(IDOK);}

上一篇(摘抄)VC技术内幕笔记下一篇CSocket create 套接字失败,原因没有初始化套接字。

主题推荐猜你在找

查看评论

* 以上用户言论只代表其个人观点,,不代表CSDN网站的观点或立场

核心技术类目

不能接受失败,也意味太想去成功了,从心理学上解释,

一个关于响应CPropertySheet “OK”按钮(确认)按钮的方法试验

相关文章:

你感兴趣的文章:

标签云: