multimru.h

来自「C++教程的配套源码 C++教程的配套源码」· C头文件 代码 · 共 69 行

H
69
字号
// MultiMRU.h : main header file for the MULTIMRU application
//

#if !defined(AFX_MULTIMRU_H__04AC04DC_4231_11D4_A415_5254AB1BFD4D__INCLUDED_)
#define AFX_MULTIMRU_H__04AC04DC_4231_11D4_A415_5254AB1BFD4D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CMultiMRUApp:
// See MultiMRU.cpp for the implementation of this class
//

#define  NUM_FILTER 2  //定义文件类型种数;

class CMultiMRUApp : public CWinApp
{
protected:
    CString szExt[NUM_FILTER]; //扩展名数组;
	CRecentFileList* m_pRecentFileList[NUM_FILTER];//最近文件列表对象指针数组;
        //重载标准设置装载和保存函数;
	void LoadStdProfileSettings(UINT nMaxMRU = _AFX_MRU_COUNT); 
	//_AFX_MRU_COUNT已被MFC定义为4,即缺省最大表项数为4.
	void SaveStdProfileSettings();
        //函数返回指定索引的扩展名;
	CString GetExtension(int nIndex); 
public:
	CMultiMRUApp();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMultiMRUApp)
	public:
	virtual BOOL InitInstance();
	//重载下面两个虚拟函数;
	virtual void AddToRecentFileList(LPCTSTR lpszPathName);
	virtual int ExitInstance();
        //重载析构函数;
        virtual ~CMultiMRUApp();
	//}}AFX_VIRTUAL

// Implementation
	//{{AFX_MSG(CMultiMRUApp)
	afx_msg void OnAppAbout();
	//最近文件列表菜单响应函数;
	afx_msg void OnUpdateRecentBMPFileMenu(CCmdUI* pCmdUI);
        afx_msg void OnUpdateRecentJPGFileMenu(CCmdUI* pCmdUI);
        afx_msg BOOL OnOpenRecentBMPFile(UINT nID);
        afx_msg BOOL OnOpenRecentJPGFile(UINT nID);	
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MULTIMRU_H__04AC04DC_4231_11D4_A415_5254AB1BFD4D__INCLUDED_)

⌨️ 快捷键说明

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