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

📄 readme.wzd

📁 《Visual C++ MFC编程实例》配套代码,如果大家正在学习此教程
💻 WZD
字号:
/////////////////////////////////////////////////////////////////////
// Modify any class...
/////////////////////////////////////////////////////////////////////

// 1) this creates a CMemFile class object and opens the file too
	CMemFile file;

	char buffer[]={"This is my disk data."};

// 2) write to file
	file.Write(buffer,sizeof(buffer));

// 3) get file length
	UINT nBytes = file.GetLength();

// 4) seek to beginning, end and in the middle
	file.SeekToEnd();
	file.Seek(20,CFile::begin); //also CFile::end and CFile::current
	file.SeekToBegin();

// 5) read file
	while (nBytes=file.Read(buffer,sizeof(buffer)))
	{
	}

// 6) delete file (sets to zero length)
//    (file is actually closed when class object is destroyed)
	file.SetLength(0);


/////////////////////////////////////////////////////////////////////
// From: Visual C++ MFC Programming by Example by John E. Swanke
// Copyright (C) 1998 jeswanke. All rights reserved.
/////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

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