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

📄 ngrecentitemcombobox.h

📁 ResOrg 图形化管理Vc项目的资源ID的工具的源代码。 ResOrg - Manage and Renumber Resource Symbol IDs Introduction The
💻 H
字号:
#if !defined(__NGRecentItemComboBox_H__)
#define __NGRecentItemComboBox_H__
/////////////////////////////////////////////////////////////////////////////
//
// MRUCombo.h: Header file for the CNGRecentItemComboBox class.
//
// Written by Michael Dunn <mdunn at inreach dot com>
//
// Modified by Anna-Jane Metcalfe to use CNGRecentItemList instead of CRecentFileList

//
/////////////////////////////////////////////////////////////////////////////
//
// Revision history:
//
//  9/9/1998: First release.
//
/////////////////////////////////////////////////////////////////////////////



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


#ifndef __NGRecentItemList_H__
	#include "NGRecentItemList.h"                    // for CRecentItemList
#endif


/////////////////////////////////////////////////////////////////////////////
// CNGRecentItemComboBox window

class NGLIB_EXT_CLASS CNGRecentItemComboBox : public CComboBox
{
// Construction
public:
	CNGRecentItemComboBox();

// Attributes & accessor functions
public:
    void           SetMRURegKey ( LPCTSTR szRegKey );
    const CString& GetMRURegKey() const;

    BOOL           SetMRUValueFormat ( LPCTSTR szValueFormat );
    const CString& GetMRUValueFormat() const;

    int            SetMaxMRUSize ( int nMaxSize );
    int            GetMaxMRUSize() const;

    BOOL SetAutoSaveOnDestroy   ( BOOL bAutoSave );
    BOOL SetAutoSaveAfterAdd    ( BOOL bAutoSave );
    BOOL SetAutoRefreshAfterAdd ( BOOL bAutoRefresh );

protected:
    CNGRecentItemList*	m_pMRU;
    CString             m_cstrRegKey;
    CString             m_cstrRegValueFormat;
    int                 m_nMaxMRUSize;
    BOOL                m_bSaveOnDestroy;
    BOOL                m_bSaveAfterAdd;
    BOOL                m_bRefreshAfterAdd;

// Operations
public:
    BOOL AddToMRU ( LPCTSTR szNewItem );
    BOOL RemoveFromMRU(int nItem);
    void EmptyMRU();

    void RefreshCtrl();

    BOOL LoadMRU();
    BOOL SaveMRU();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNGRecentItemComboBox)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CNGRecentItemComboBox();

protected:
    BOOL AllocNewMRU();
    BOOL VerifyMRUParams() const;

    BOOL m_bParamsChanged;

	// Generated message map functions
protected:
	//{{AFX_MSG(CNGRecentItemComboBox)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};


/////////////////////////////////////////////////////////////////////////////
// CNGRecentFileComboBox class

class NGLIB_EXT_CLASS CNGRecentFileComboBox : public CNGRecentItemComboBox
{
// Construction/destruction
public:
			CNGRecentFileComboBox(void);

	virtual	~CNGRecentFileComboBox(void);


// Virtual overrides
public:
	virtual void					DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	virtual void					MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);

protected:
	virtual void					PreSubclassWindow(void);


// Message handlers
protected:

	DECLARE_MESSAGE_MAP();
};



//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(__NGRecentItemComboBox_H__)

⌨️ 快捷键说明

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