MainDlg.cpp 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // MainDlg.cpp : implementation of the CMainDlg class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "MainDlg.h"
  6. #include "CApp.h"
  7. CMainDlg::CMainDlg() : SHostWnd(_T("LAYOUT:XML_MAINWND"))
  8. {
  9. m_bLayoutInited = FALSE;
  10. }
  11. CMainDlg::~CMainDlg()
  12. {
  13. }
  14. int CMainDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
  15. {
  16. SetMsgHandled(FALSE);
  17. return 0;
  18. }
  19. BOOL CMainDlg::OnInitDialog(HWND hWnd, LPARAM lParam)
  20. {
  21. m_bLayoutInited = TRUE;
  22. return 0;
  23. }
  24. //TODO:消息映射
  25. void CMainDlg::OnClose()
  26. {
  27. CSimpleWnd::DestroyWindow();
  28. }
  29. void CMainDlg::OnMaximize()
  30. {
  31. SendMessage(WM_SYSCOMMAND, SC_MAXIMIZE);
  32. }
  33. void CMainDlg::OnRestore()
  34. {
  35. SendMessage(WM_SYSCOMMAND, SC_RESTORE);
  36. }
  37. void CMainDlg::OnMinimize()
  38. {
  39. SendMessage(WM_SYSCOMMAND, SC_MINIMIZE);
  40. }
  41. void CMainDlg::OnCommand(UINT uNotifyCode, int nID, HWND wndCtl) {
  42. if (uNotifyCode == 0)
  43. {
  44. switch (nID)
  45. {
  46. case 6:
  47. {
  48. //CApp::getSingletonPtr()->Is_out(1);
  49. //if (m_clash)
  50. //{
  51. // m_clash->stop();
  52. // m_clash->ClashStop();
  53. // delete m_clash;
  54. // m_clash = nullptr;
  55. //}
  56. //DisableSystemProxy();
  57. //CApp::getSingletonPtr()->KillProcess(L"syscode.exe");
  58. ////CApp::getSingletonPtr()->Is_out(1);
  59. //CSimpleWnd::DestroyWindow();
  60. ////PostMessage(WM_CLOSE);
  61. break;
  62. }
  63. default:
  64. break;
  65. }
  66. }
  67. }