📄 workspacehelper.h
字号:
#if !defined(__WorkspaceHelper_H__)
#define __WorkspaceHelper_H__
/************************************************************************
*
* Resource ID Organiser Add-In
*
* (c) Copyright 2000 by Andy Metcalfe (andy.metcalfe@lineone.net)
* All rights reserved.
*
************************************************************************
*
* Filename : WorkspaceHelper.h
*
* Description : CWorkspaceHelper - Visual Studio COM interface wrapper 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/ResOrgAddIn/WorkspaceHelper.h $
* $Revision: 3 $
* $Date: 2/03/01 13:14 $
* $Author: Andy $
*
* $History: WorkspaceHelper.h $
*
* ***************** Version 3 *****************
* User: Andy Date: 2/03/01 Time: 13:14
* Updated in $/Projects/AddIns/ResOrg/ResOrgAddIn
* Removed CWorkspaceHelper::GetSymbolFileName() [now a global function in
* ResOrgUtils]
*
* ***************** Version 2 *****************
* User: Andy Date: 29/11/00 Time: 18:37
* Updated in $/Projects/AddIns/ResOrg/ResOrgAddIn
* 1. Moved Office2KDlg code to its own DLL
* 2. Added file banners
*
* $Nokeywords: $
*
************************************************************************/
// WorkspaceHelper.h : header file
//
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
typedef CTypedPtrArray<CPtrArray, IGenericProject*> CProjectArray;
typedef CTypedPtrArray<CPtrArray, IGenericDocument*> CDocumentArray;
/////////////////////////////////////////////////////////////////////////////
// CWorkspaceHelper command target
class CWorkspaceHelper : public CObject
{
public:
CWorkspaceHelper(IApplication* pApplication = NULL);
virtual ~CWorkspaceHelper(void);
// Attributes
protected:
IApplication* m_pApplication;
// Operations
public:
/////////////////////////////////////////////////////////////////////////////
// Application
IApplication* GetApplication(void) const
{ return m_pApplication; }
BOOL SetApplication(IApplication* pApplication);
/////////////////////////////////////////////////////////////////////////////
// Projects
int GetProjectCount(void) const;
int GetProjectNames(CStringArray& rarrayNames) const;
int GetProjects(CProjectArray& rarrayProjects) const;
IGenericProject* GetActiveProject(void) const;
IGenericProject* GetProject(const CString& sFullName) const;
static CString GetName(IGenericProject* pProject);
static CString GetFullName(IGenericProject* pProject);
BOOL SetActiveProject(IGenericProject* pActiveProject);
BOOL LoadProject(IGenericProject* pProject);
BOOL UnloadProject(IGenericProject* pProject);
/////////////////////////////////////////////////////////////////////////////
// Documents (open files)
int GetDocumentCount(void) const;
int GetDocumentNames(CStringArray& rarrayNames) const;
int GetDocuments(CDocumentArray& rarrayDocuments) const;
IGenericDocument* GetDocument(const CString& sFullName) const;
static CString GetName(IGenericDocument* pDocument);
static CString GetFullName(IGenericDocument* pDocument);
BOOL CloseDocument(const CString& sFileName);
/////////////////////////////////////////////////////////////////////////////
// Resource Files
CString GetResourceFileName(const CString& sProject) const;
BOOL CloseResourceFile(const CString& sFileName);
// Overrides
protected:
// Implementation
protected:
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(__WorkspaceHelper_H__)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -