⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 doc.cpp

📁 全屏显示的VC++源代码,简单实用。代码用VC++6.0编写。
💻 CPP
字号:
/////////////////////////////////////////////////////////////////////////////
// Project:MYIMGAPP 
// Author:NorthTibet
// Date:星期四, 九月 26, 2002
// Description:通过定制的C++类在MFC框架中轻松显示多种格式的图象
//
/////////////////////////////////////////////////////////////////////////////
// Doc.cpp : implementation of the CPictureDoc class
//
#include "StdAfx.h"
#include "resource.h"

#include <afxdisp.h>
#include <afxpriv2.h>
#include "Doc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

IMPLEMENT_DYNCREATE(CPictureDoc, CDocument)

BEGIN_MESSAGE_MAP(CPictureDoc, CDocument)
END_MESSAGE_MAP()

CPictureDoc::CPictureDoc()
{
}

CPictureDoc::~CPictureDoc()
{
}

/*
void CPictureDoc::Serialize(CArchive& ar)
{
	if (ar.IsLoading()) {
		VERIFY(m_pict.Load(ar));
	} else {
		
	}
}
*/
//////////////////
// Load document from file. Bypass MFC serialization stuff.
//
BOOL CPictureDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
	return m_pict.Load(lpszPathName);
}

//////////////////
// Load initial picture from resource
//
BOOL CPictureDoc::OnNewDocument()
{
	m_pict.Load(IDR_MAINFRAME);
	return TRUE;
}
/*
////////////////////////////////////////////////////////////////
// MSDN Magazine -- March 2002
// If this code works, it was written by Paul DiLascia.
// If not, I don't know who wrote it.
// Compiles with Visual C++ 6.0 for Windows XP and probably Windows 2000 too.
// Set tabsize = 3 in your editor.
//
#include "StdAfx.h"
#include "resource.h"

#include <afxdisp.h>
#include <afxpriv2.h>
#include "Doc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

IMPLEMENT_DYNCREATE(CPictureDoc, CDocument)

BEGIN_MESSAGE_MAP(CPictureDoc, CDocument)
END_MESSAGE_MAP()

CPictureDoc::CPictureDoc()
{
}

CPictureDoc::~CPictureDoc()
{
}

//////////////////
// Load document from file. Bypass MFC serialization stuff.
//
BOOL CPictureDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
	return m_pict.Load(lpszPathName);
}

//////////////////
// Load initial picture from resource
//
BOOL CPictureDoc::OnNewDocument()
{
	m_pict.Load(IDR_MAINFRAME);
	return TRUE;
}
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -