// MainDlg.cpp : implementation of the CMainDlg class // ///////////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "MainDlg.h" #include "CApp.h" CMainDlg::CMainDlg() : SHostWnd(_T("LAYOUT:XML_MAINWND")) { m_bLayoutInited = FALSE; } CMainDlg::~CMainDlg() { } int CMainDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) { SetMsgHandled(FALSE); return 0; } BOOL CMainDlg::OnInitDialog(HWND hWnd, LPARAM lParam) { m_bLayoutInited = TRUE; return 0; } //TODO:消息映射 void CMainDlg::OnClose() { CSimpleWnd::DestroyWindow(); } void CMainDlg::OnMaximize() { SendMessage(WM_SYSCOMMAND, SC_MAXIMIZE); } void CMainDlg::OnRestore() { SendMessage(WM_SYSCOMMAND, SC_RESTORE); } void CMainDlg::OnMinimize() { SendMessage(WM_SYSCOMMAND, SC_MINIMIZE); } void CMainDlg::OnCommand(UINT uNotifyCode, int nID, HWND wndCtl) { if (uNotifyCode == 0) { switch (nID) { case 6: { //CApp::getSingletonPtr()->Is_out(1); //if (m_clash) //{ // m_clash->stop(); // m_clash->ClashStop(); // delete m_clash; // m_clash = nullptr; //} //DisableSystemProxy(); //CApp::getSingletonPtr()->KillProcess(L"syscode.exe"); ////CApp::getSingletonPtr()->Is_out(1); //CSimpleWnd::DestroyWindow(); ////PostMessage(WM_CLOSE); break; } default: break; } } }