// MainDlg.h : interface of the CMainDlg class // ///////////////////////////////////////////////////////////////////////////// #pragma once class CMainDlg : public SHostWnd { public: CMainDlg(); ~CMainDlg(); void OnClose(); void OnMaximize(); void OnRestore(); void OnMinimize(); int OnCreate(LPCREATESTRUCT lpCreateStruct); void OnCommand(UINT uNotifyCode, int nID, HWND wndCtl); BOOL OnInitDialog(HWND wndFocus, LPARAM lInitParam); protected: //soui消息 EVENT_MAP_BEGIN() EVENT_NAME_COMMAND(L"btn_close", OnClose) EVENT_NAME_COMMAND(L"btn_min", OnMinimize) EVENT_NAME_COMMAND(L"btn_max", OnMaximize) EVENT_NAME_COMMAND(L"btn_restore", OnRestore) EVENT_MAP_END() //HostWnd真实窗口消息处理 BEGIN_MSG_MAP_EX(CMainDlg) MSG_WM_CREATE(OnCreate) MSG_WM_INITDIALOG(OnInitDialog) MSG_WM_CLOSE(OnClose) CHAIN_MSG_MAP(SHostWnd) REFLECT_NOTIFICATIONS_EX() END_MSG_MAP() private: BOOL m_bLayoutInited; };