📄 resorgsymbolsdoc.h
字号:
/************************************************************************
*
* Resource ID Organiser Utility Library
*
* (c) Copyright 2000 by Andy Metcalfe (andy.metcalfe@lineone.net)
* All rights reserved.
*
************************************************************************
*
* Filename : ResOrgSymbolsDoc.h
*
* Description : CResOrgSymbolsDoc - document class for a resource
* symbol file
*
* 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/ResOrgSymbolsDoc.h $
* $Revision: 6 $
* $Date: 22/06/01 9:49 $
* $Author: Andy $
*
* $History: ResOrgSymbolsDoc.h $
*
* ***************** Version 6 *****************
* User: Andy Date: 22/06/01 Time: 9:49
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Made class declaration "Rose friendly"
*
* ***************** Version 5 *****************
* User: Andy Date: 2/04/01 Time: 17:04
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added GetSymbolBuffer() access method; made attributes protected
*
* ***************** Version 4 *****************
* User: Andy Date: 17/02/01 Time: 6:57
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* 1. Knock-on changes from renaming of CResOrgSymbolsView to
* CResOrgSymbolsListView
* 2. Added wrappers around commonly used CResourceSymbolBuffer methods
* [e.g. Set()] to remove the need for views to raise view hints
*
* ***************** Version 3 *****************
* User: Andy Date: 29/11/00 Time: 18:38
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added file banners
*
* $Nokeywords: $
*
************************************************************************/
// ResOrgSymbolsDoc.h : interface of the CResOrgSymbolsDoc class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(__ResOrgSymbolsDoc_H__)
#define __ResOrgSymbolsDoc_H__
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __ResourceSymbolBuffer_H__
#include "ResourceSymbolBuffer.h"
#endif
enum
{
SYM_REFRESH = 0,
SYM_ADDED,
SYM_CHANGED,
SYM_DELETED
};
#define CResOrgSymbolsDoc_BASE CDocument
class RESORGUTILS_EXT_CLASS CResOrgSymbolsDoc : public CDocument
{
DECLARE_DYNCREATE(CResOrgSymbolsDoc)
protected: // create from serialization only
CResOrgSymbolsDoc(void);
public:
virtual ~CResOrgSymbolsDoc(void);
// Attributes
protected:
CResourceSymbolBuffer m_ResourceSymbolBuffer;
CNGFileChangeMonitor m_FileChangeMonitor;
// Operations
public:
CResourceSymbolBuffer* GetSymbolBuffer(void)
{ return &m_ResourceSymbolBuffer; }
CResourceSymbol* Add( const CString& sSymbolName,
UINT uSymbolValue,
int nLineNo);
BOOL Set( CResourceSymbol* pSymbol,
const CString& sName,
UINT uValue,
BOOL bReadOnly = FALSE);
BOOL Remove( CResourceSymbol* pSymbol);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CResOrgSymbolsDoc)
public:
virtual BOOL OnNewDocument(void);
virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
virtual void OnCloseDocument(void);
virtual void Serialize(CArchive& ar);
virtual void DeleteContents(void);
//}}AFX_VIRTUAL
// Implementation
protected:
public:
#ifdef _DEBUG
virtual void AssertValid(void) const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
BOOL StartFileChangeMonitor(const CString& sPathName);
BOOL StopFileChangeMonitor(void);
// Generated message map functions
protected:
//{{AFX_MSG(CResOrgSymbolsDoc)
afx_msg void OnCmdFileChanged(void);
afx_msg void OnFileSave(void);
afx_msg void OnFileSaveAs(void);
afx_msg void OnCmdFileProperties(void);
afx_msg void OnCmdRenumberSymbols(void);
afx_msg void OnUpdateRenumberSymbols(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(__ResOrgSymbolsDoc_H__)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -