TestDlg.h
上传用户:easylife05
上传日期:2007-02-14
资源大小:393k
文件大小:1k
- // TestDlg.h : CTestDlg 的声明
- #pragma once
- #include "resource.h" // 主符号
- #include <atlhost.h>
- // CTestDlg
- class CTestDlg :
- public CAxDialogImpl<CTestDlg>
- {
- public:
- CTestDlg()
- {
- }
- ~CTestDlg()
- {
- }
- enum { IDD = IDD_TESTDLG };
- BEGIN_MSG_MAP(CTestDlg)
- MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
- COMMAND_HANDLER(IDOK, BN_CLICKED, OnClickedOK)
- COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnClickedCancel)
- CHAIN_MSG_MAP(CAxDialogImpl<CTestDlg>)
- END_MSG_MAP()
- // 处理程序原型:
- // LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- // LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
- // LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
- LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
- {
- CAxDialogImpl<CTestDlg>::OnInitDialog(uMsg, wParam, lParam, bHandled);
- return 1; // 使系统设置焦点
- }
- LRESULT OnClickedOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
- {
- ShowWindow(SW_HIDE);
- //EndDialog(wID);
- return 0;
- }
- LRESULT OnClickedCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
- {
- ShowWindow(SW_HIDE);
- return 0;
- }
- };