













property:


type: Icon
Image: IDI_ICON1

add class

add resource head file
#include "resource.h"

private:
CButton m_btnAbout;
CRect rt;
rt.top = 10;
rt.left = 150;
rt.right = 250;
rt.bottom = 30;
m_btnAbout.Create(_T("About"),
WS_CHILD | WS_VISIBLE,
rt,
this,
ID_ABOUT); // #define ID_ABOUT 1101
public:
afx_msg void OnBtnClick();
afx_msg void CMainWindow::OnBtnClick()
{
CAboutDlg dlgAbout; // #include "AboutDlg.h"
dlgAbout.DoModal();
}
DECLARE_MESSAGE_MAP()
BEGIN_MESSAGE_MAP(CMainWindow, CFrameWnd)
ON_COMMAND(ID_ABOUT, OnBtnClick)
END_MESSAGE_MAP()
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。