// CMyDlgBar dialog IMPLEMENT_DYNAMIC(CMyDlgBar, CDialogBar) CMyDlgBar::CMyDlgBar() : CDialogBar() , m_nData(0) { } CMyDlgBar::~CMyDlgBar() { } void CMyDlgBar::DoDataExchange(CDataExchange* pDX) { CDialogBar::DoDataExchange(pDX); } BEGIN_MESSAGE_MAP(CMyDlgBar, CDialogBar) ON_BN_CLICKED(IDOK, &CMyDlgBar::OnBnClickedOk) // ON_BN_CLICKED(IDC_BUTTON1, &CMyDlgBar::OnBnClickedButton1) ON_BN_CLICKED(IDC_BUTTON1, &CMyDlgBar::OnBnClickedButton1) ON_EN_CHANGE(IDC_EDIT1, &CMyDlgBar::OnEnChangeEdit1) ON_MESSAGE(WM_INITDIALOG,OnInitDialog) END_MESSAGE_MAP() LRESULT CMyDlgBar::OnInitDialog(UINT wParam,LONG lParam) { // TODO: Add extra initialization here BOOL bRet = HandleInitDialog(wParam,lParam); if (!UpdateData(FALSE)) { TRACE("InitCDataStatus Failed!"); } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } // CMyDlgBar message handlers BOOL CMyDlgBar::Create(CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID) { // TODO: Add your specialized code here and/or call the base class CDialogBar::Create(pParentWnd, nIDTemplate, nStyle, nID); UpdateData(FALSE); return TRUE; } void CMyDlgBar::OnBnClickedOk() { // TODO: Add your control notification handler code here } //void CMyDlgBar::OnBnClickedButton1() //{ //// TODO: Add your control notification handler code here //} void CMyDlgBar::OnBnClickedButton1() { // TODO: Add your control notification handler code here } void CMyDlgBar::OnEnChangeEdit1() { // TODO: If this is a RICHEDIT control, the control will not // send this notification unless you override the CDialogBar::OnInitDialog() // function and call CRichEditCtrl().SetEventMask() // with the ENM_CHANGE flag ORed into the mask. MessageBox(L"Changed"); // TODO: Add your control notification handler code here }