|
/************************************************************************
*
* Resource ID Organiser Core Library
*
* (c) Copyright 2000-2004 by Anna-Jayne Metcalfe (resorg@annasplace.me.uk)
* All rights reserved.
*
************************************************************************
*
* Filename : SymbolPropertiesGeneralPage.h
*
* Description : CSymbolPropertiesGeneralPage - property page class
*
* Compiler : Microsoft Visual C++ 6.0, Service Pack 3 or later
* Microsoft Visual C++ .NET 2002
*
* Target
* Environment : Windows 98/NT/2000/XP
*
* 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 Anna-Jayne 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.annasplace.me.uk/resorg 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/ResOrgCore/SymbolPropertiesGeneralPage.h $
* $Revision: 19 $
* $Date: 11/07/04 16:13 $
* $Author: Anna $
*
* $History: SymbolPropertiesGeneralPage.h $
*
* ***************** Version 19 *****************
* User: Anna Date: 11/07/04 Time: 16:13
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Added support for detection of out of range symbols
*
* ***************** Version 18 *****************
* User: Anna Date: 15/04/03 Time: 19:14
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Removed unnecessary header file guards
*
* ***************** Version 17 *****************
* User: Anna Date: 25/02/03 Time: 21:25
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Symbol conflict checking now handles inter-file conflicts better
*
* ***************** Version 16 *****************
* User: Anna Date: 2/01/03 Time: 0:10
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Added a "File Name" control
*
* ***************** Version 15 *****************
* User: Anna Date: 3/12/02 Time: 20:17
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Replaced the rich edit control with an HTML static control
*
* ***************** Version 14 *****************
* User: Anna Date: 25/11/02 Time: 15:19
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Changed website address in banner
*
* ***************** Version 13 *****************
* User: Anna Date: 22/10/02 Time: 13:24
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Changed name/mail address (at last!)
*
* ***************** Version 12 *****************
* User: Andy Date: 7/06/02 Time: 17:04
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Renamed the ResOrgUtils module to ResOrgCore. Updated file banners
* accordingly
*
* ***************** Version 11 *****************
* User: Andy Date: 27/05/02 Time: 13:37
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Knock on changes from CResourceSymbolBuffer (now
* CResourceSymbolManager)
*
* ***************** Version 10 *****************
* User: Andy Date: 12/27/01 Time: 10:39p
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added an option to allow editing of the value but not the name
*
* ***************** 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: $
*
************************************************************************/
#pragma once
#include "ResourceSymbolManager.h"
/////////////////////////////////////////////////////////////////////////////
// CSymbolPropertiesGeneralPage property page
#define CSymbolPropertiesGeneralPage_BASE CNGPropertyPage
class RESORGCORE_EXT_CLASS CSymbolPropertiesGeneralPage : public CNGPropertyPage
{
// Construction
public:
CSymbolPropertiesGeneralPage(void);
virtual ~CSymbolPropertiesGeneralPage(void);
// Data members
protected:
enum { IDD = IDD_SYM_GENERAL_PAGE };
CStatic m_ctrlIcon;
CStatic m_ctrlWarningIcon;
CNGHtmlStaticCtrl m_ctrlWarning;
CNGHtmlStaticCtrl m_ctrlReadOnlyWarning;
CString m_sName;
CString m_sType;
UINT m_uIconID;
UINT m_uValue;
CString m_sFileName;
BOOL m_bEditValueOnly;
BOOL m_bReadOnly;
CString m_sSavedName;
BOOL m_bWarnOnSymbolChanges;
CResourceSymbolManager* m_pSymbols;
CResourceSymbol* m_pSymbol;
// Virtual Overrides
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual BOOL OnInitDialog(void);
virtual BOOL OnKillActive(void);
virtual void OnOK(void);
// Operations
public:
bool Initialise( CResourceSymbolManager* pSymbols,
CResourceSymbol* pSymbol,
bool bEditValueOnly = false);
void DisableSymbolChangeWarnings(void);
CString GetName(void) const
{ return m_sName; }
UINT GetValue(void) const
{ return m_uValue; }
BOOL IsReadOnly(void) const
{ return m_bReadOnly; }
// 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,
bool bCheckSameFileOnly) const;
bool IsValueUnique( CResourceSymbol* pSymbol,
UINT uValue,
bool bCheckSameFileOnly) const;
bool SetTypeIcon( UINT uIconID);
bool SetWarningText( const CString& sWarning,
LPCTSTR pszIconID = NULL);
bool AreSymbolsInSameFile(
CResourceSymbol* pSymbol1,
CResourceSymbol* pSymbol2) const;
void CheckNameAndValue(void);
// Message handlers
protected:
afx_msg void OnCmdSymbolName(void);
afx_msg void OnCmdSymbolValue(void);
afx_msg void OnCmdReadOnly(void);
afx_msg void OnClickedFixValue(void);
DECLARE_MESSAGE_MAP()
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I haven't always written software for a living. When I graduated from Surrey University in 1989, it was with an Electronic Engineering degree, but unfortunately that never really gave me the opportunity to do anything particularly interesting (with the possible exception of designing
Darth Vader's Codpiece * for the UK Army in 1990).
* Also known as the Standard Army Bootswitch. But that's another story...
Since the opportunity arose to lead a software team developing C++ software for
Avionic Test Systems in 1996, I've not looked back. More recently I've been involved in the development of subsea acoustic navigation systems, digital TV broadcast systems, port security/tracking systems, and most recently software development tools with my own company,
Riverblade Ltd.
One of my personal specialities is IDE plug-in development.
ResOrg was my first attempt at a plug-in, but my day to day work is with
Visual Lint, an interactive code analysis tool environment with works within the Visual Studio and Eclipse IDEs or on build servers.
I love lots of things, but particularly music, photography and anything connected with history or engineering. I
despise ignorant, intolerant and obstructive people - and it shows...I can be a bolshy cow if you wind me up the wrong way...
I'm currently based 15 minutes walk from the beach in Bournemouth on the south coast of England. Since I moved here I've grown to love the place - even if it is full of grockles in Summer!