MainDlg.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // MainDlg.h : interface of the CMainDlg class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #pragma once
  5. class CMainDlg : public SHostWnd
  6. {
  7. public:
  8. CMainDlg();
  9. ~CMainDlg();
  10. void OnClose();
  11. void OnMaximize();
  12. void OnRestore();
  13. void OnMinimize();
  14. int OnCreate(LPCREATESTRUCT lpCreateStruct);
  15. BOOL OnInitDialog(HWND wndFocus, LPARAM lInitParam);
  16. protected:
  17. //soui消息
  18. EVENT_MAP_BEGIN()
  19. EVENT_NAME_COMMAND(L"btn_close", OnClose)
  20. EVENT_NAME_COMMAND(L"btn_min", OnMinimize)
  21. EVENT_NAME_COMMAND(L"btn_max", OnMaximize)
  22. EVENT_NAME_COMMAND(L"btn_restore", OnRestore)
  23. EVENT_MAP_END()
  24. //HostWnd真实窗口消息处理
  25. BEGIN_MSG_MAP_EX(CMainDlg)
  26. MSG_WM_CREATE(OnCreate)
  27. MSG_WM_INITDIALOG(OnInitDialog)
  28. MSG_WM_CLOSE(OnClose)
  29. CHAIN_MSG_MAP(SHostWnd)
  30. REFLECT_NOTIFICATIONS_EX()
  31. END_MSG_MAP()
  32. private:
  33. BOOL m_bLayoutInited;
  34. };