📄 imageviewerclient.cpp
字号:
// ImageViewerClient.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "ImageViewerClient.h"
#include "About.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "ImageViewerClientDoc.h"
#include "ImageViewerClientView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CImageViewerClientApp
BEGIN_MESSAGE_MAP(CImageViewerClientApp, CWinApp)
//{{AFX_MSG_MAP(CImageViewerClientApp)
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CImageViewerClientApp construction
CImageViewerClientApp::CImageViewerClientApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
m_pImageViewer = new CImageViewer();
}
CImageViewerClientApp::~CImageViewerClientApp()
{
delete m_pImageViewer;
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CImageViewerClientApp object
CImageViewerClientApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CImageViewerClientApp initialization
BOOL CImageViewerClientApp::InitInstance()
{
Enable3dControls();
LoadStdProfileSettings();
CMainFrame* pMainFrame = new CMainFrame;
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
return FALSE;
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();
m_pMainWnd = pMainFrame;
ASSERT(m_pImageViewer != NULL);
m_pImageViewer->Init();
return TRUE;
}
// App command to run the dialog
void CImageViewerClientApp::OnAppAbout()
{
CAboutDlg aboutDlg;
aboutDlg.DoModal();
}
/////////////////////////////////////////////////////////////////////////////
// CImageViewerClientApp message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -