MainDlg.cpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // MainDlg.cpp : implementation of the CMainDlg class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "MainDlg.h"
  6. CMainDlg::CMainDlg() : SHostWnd(_T("LAYOUT:XML_MAINWND"))
  7. {
  8. m_bLayoutInited = FALSE;
  9. }
  10. CMainDlg::~CMainDlg()
  11. {
  12. }
  13. int CMainDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
  14. {
  15. SetMsgHandled(FALSE);
  16. return 0;
  17. }
  18. BOOL CMainDlg::OnInitDialog(HWND hWnd, LPARAM lParam)
  19. {
  20. m_bLayoutInited = TRUE;
  21. return 0;
  22. }
  23. //TODO:消息映射
  24. void CMainDlg::OnClose()
  25. {
  26. CSimpleWnd::DestroyWindow();
  27. }
  28. void CMainDlg::OnMaximize()
  29. {
  30. SendMessage(WM_SYSCOMMAND, SC_MAXIMIZE);
  31. }
  32. void CMainDlg::OnRestore()
  33. {
  34. SendMessage(WM_SYSCOMMAND, SC_RESTORE);
  35. }
  36. void CMainDlg::OnMinimize()
  37. {
  38. SendMessage(WM_SYSCOMMAND, SC_MINIMIZE);
  39. }