#pragma once #include #include #include #include "resource.h" class CMainDialog : public CDialogImpl { public: enum { IDD = IDD_DIALOG_MAIN }; BEGIN_MSG_MAP(CMainDialog) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) COMMAND_ID_HANDLER(IDOK, OnOK) COMMAND_ID_HANDLER(IDCANCEL, OnCancel) END_MSG_MAP() virtual BOOL PreTranslateMessage(MSG* pMsg) { return ::IsDialogMessage(m_hWnd, pMsg); } LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/); LRESULT OnOK(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/); LRESULT OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/); void CloseDialog(int nVal); };