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

📄 symbolpropertiesgeneralpage.h

📁 一个vc中管理资源文件ID的插件
💻 H
字号:
#if !defined(__SymbolPropertiesGeneralPage_H__)
#define __SymbolPropertiesGeneralPage_H__
/************************************************************************
 *
 *                 Resource ID Organiser Utility Library
 *
 *       (c) Copyright 2000 by Andy Metcalfe (andy.metcalfe@lineone.net)
 *                         All rights reserved.
 *
 ************************************************************************
 *                                                                       
 *  Filename    : SymbolPropertiesGeneralPage.h
 *
 *  Description : CSymbolPropertiesGeneralPage - property page class
 *                
 *  Compiler    : Microsoft Visual C++ 6.0, Service Pack 3 or 4
 *                                                                       
 *  Target                                                               
 *  Environment : Windows 98/NT
 *
 *  NOTE:
 *
 *    This software is provided "as is" free for personal use. All
 *    title and copyrights in and to the software, including but not
 *    limited to any images, text, etc. incorporated into it, are
 *    owned by Andy Metcalfe, except where acknowledged otherwise.
 *
 *    Your may freely to use this code in your own products, PROVIDED
 *    this notice is not removed or modified.
 *
 *
 *    Visit http://www.resorg.co.uk for latest updates
 *
 ************************************************************************
 *
 *   MODIFICATION HISTORY:
 *
 *           This is a controlled document. See project configuration
 *           control tool for latest version and full version history.
 *
 *    $Archive: /Projects/AddIns/ResOrg/ResOrgUtils/SymbolPropertiesGeneralPage.h $
 *   $Revision: 9 $
 *       $Date: 22/06/01 9:53 $
 *     $Author: Andy $
 *
 *    $History: SymbolPropertiesGeneralPage.h $
 * 
 * *****************  Version 9  *****************
 * User: Andy         Date: 22/06/01   Time: 9:53
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * Made class declaration "Rose friendly"
 * 
 * *****************  Version 8  *****************
 * User: Andy         Date: 23/04/01   Time: 21:15
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * 1.  Added "Fix Conflict" button
 * 2.  A warning message is now displayed when a symbol is made read-only
 * 
 * *****************  Version 7  *****************
 * User: Andy         Date: 2/04/01    Time: 17:26
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * 1.  Added a rich edit control (and associated icon) to warn of symbol
 * name/value conflicts
 * 2.  Improved validation routines and messages
 * 
 * *****************  Version 6  *****************
 * User: Andy         Date: 27/03/01   Time: 15:22
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * 1.  Added validation of symbol names
 * 2.  When the symbol value changes, the parent property sheet is
 * notified to update the "Conflicts" page
 * 
 * *****************  Version 5  *****************
 * User: Andy         Date: 9/03/01    Time: 7:06
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * Make the warning prompt when a symbol name is changed optional, so it
 * can be disabled when the dialog is used to edit the properties of a
 * symbol being added
 * 
 * *****************  Version 4  *****************
 * User: Andy         Date: 17/02/01   Time: 7:05
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * 1.  Converted to proeprty page
 * 2.  Added "type" icon
 * 3.  Added support for read only symbols
 * 4.  The "type" control is now set automatically when the symbol name is
 * changed
 * 
 * *****************  Version 3  *****************
 * User: Andy         Date: 29/11/00   Time: 18:38
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 *  Added file banners
 *
 * $Nokeywords: $
 *
 ************************************************************************/

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SymbolPropertiesGeneralPage.h : header file
//

#ifndef __ResourceSymbolBuffer_H__
	#include "ResourceSymbolBuffer.h"
#endif


/////////////////////////////////////////////////////////////////////////////
// CSymbolPropertiesGeneralPage property page

#define CSymbolPropertiesGeneralPage_BASE							CNGPropertyPage

class RESORGUTILS_EXT_CLASS	CSymbolPropertiesGeneralPage : public	CNGPropertyPage
{
// Construction
public:
			CSymbolPropertiesGeneralPage(void);   // standard constructor

	virtual	~CSymbolPropertiesGeneralPage(void);

// Dialog Data
	//{{AFX_DATA(CSymbolPropertiesGeneralPage)
	enum { IDD = IDD_SYM_GENERAL_PAGE };
			CStatic					m_ctrlIcon;
			CStatic					m_ctrlWarningIcon;
			CNGAutoRichEditCtrl		m_ctrlWarning;
			CString					m_sName;
			CString					m_sType;
			UINT					m_uValue;
			BOOL					m_bReadOnly;
	//}}AFX_DATA

			CString					m_sSavedName;
			BOOL					m_bWarnOnSymbolChanges;

			UINT					m_uIconID;

			CResourceSymbolBuffer*	m_pSymbols;
			CResourceSymbol*		m_pSymbol;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSymbolPropertiesGeneralPage)
	protected:
	virtual void					DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual	BOOL					OnInitDialog(void);
	virtual	BOOL					OnKillActive(void);
	virtual	void					OnOK(void);
	//}}AFX_VIRTUAL
	
// Operations
public:
			BOOL					Initialise(CResourceSymbolBuffer* pSymbols);

			BOOL					SetSymbol(CResourceSymbol* pSymbol);

// Implementation
protected:
			void					DDX_SymbolName(	CDataExchange* pDX,
													UINT uIDC,
													CString& rsSymbolName);

			void					DDV_SymbolName(	CDataExchange* pDX,
													CString& rsSymbolName);

			BOOL					IsNameUnique(	CResourceSymbol* pSymbol,
													const CString& sName) const;

			BOOL					IsValueUnique(	CResourceSymbol* pSymbol,
													 UINT uValue) const;

			BOOL					SetTypeIcon(	UINT uIconID);

			BOOL					SetWarningText(	const CString& sWarning,
													LPCTSTR pszIconID = NULL);

			void					CheckForConflicts(void);

	// Generated message map functions
	//{{AFX_MSG(CSymbolPropertiesGeneralPage)
	afx_msg	void					OnCmdSymbolName(void);
	afx_msg	void					OnCmdSymbolValue(void);
	afx_msg	void					OnCmdReadOnly(void);
	afx_msg	void					OnClickedFixConflict(void);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(__SymbolPropertiesGeneralPage_H__)

⌨️ 快捷键说明

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