加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
TurboMir.cpp 2.22 KB
一键复制 编辑 原始数据 按行查看 历史
Shaker 提交于 2014-08-18 11:30 . *可编译了
// TurboMir.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "TurboMir.h"
#include "MainFrm.h"
#include ".\turbomir.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CTurboMirApp
BEGIN_MESSAGE_MAP(CTurboMirApp, CWinApp)
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
END_MESSAGE_MAP()
// CTurboMirApp construction
CTurboMirApp::CTurboMirApp()
{
}
// The one and only CTurboMirApp object
CTurboMirApp theApp;
// CTurboMirApp initialization
BOOL CTurboMirApp::InitInstance()
{
// InitCommonControls() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles. Otherwise, any window creation will fail.
InitCommonControls();
CWinApp::InitInstance();
if (!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return FALSE;
}
// Initialize OLE libraries
if (!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return FALSE;
}
AfxEnableControlContainer();
CMFCButton::EnableWindowsTheming();
CMainFrame* pFrame = new CMainFrame;
m_pMainWnd = pFrame;
pFrame->LoadFrame(IDR_MAINFRAME, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, NULL);
pFrame->ShowWindow(SW_SHOWMAXIMIZED);
pFrame->UpdateWindow();
return TRUE;
}
// CTurboMirApp message handlers
int CTurboMirApp::ExitInstance()
{
return CWinApp::ExitInstance();
}
namespace UIExtended
{// CAboutDlg dialog used for App About
class CAboutDlg : public CDialogBase
{
public:
CAboutDlg();
// Dialog Data
enum { IDD = IDD_ABOUTBOX };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
// Implementation
protected:
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialogBase(CAboutDlg::IDD)
{
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogBase::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialogBase)
END_MESSAGE_MAP()
}
// App command to run the dialog
void CTurboMirApp::OnAppAbout()
{
UIExtended::CAboutDlg aboutDlg;
aboutDlg.DoModal();
}
// CTurboMirApp message handlers
void CTurboMirApp::PreLoadState ()
{
}
int CTurboMirApp::Run()
{
int retval=0;
try
{
retval=CWinApp::Run();
}
catch (char* e)
{
MessageBox(0,e,"쳣",0);
return retval;
}
return retval;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化