📄 resorgnetaddintoolwinformview.h
字号:
#pragma once
/************************************************************************
*
* Resource ID Organiser Add-In for Visual C++.NET
*
* (c) Copyright 2000-2004 by Anna-Jayne Metcalfe (resorg@annasplace.me.uk)
* All rights reserved.
*
************************************************************************
*
* Filename : ResOrgNETAddInToolWinFormView.h
*
* Description : CResOrgNETAddInToolWinFormView - ResOrg.NET Tool Window
* form view class
*
* Compiler : Microsoft Visual C++ .NET 2003
*
* Target
* Environment : Windows 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/ResOrgNETAddInToolWindows/ResOrgNETAddInToolWinFormView.h $
* $Revision: 8 $
* $Date: 30/08/04 0:45 $
* $Author: Anna $
*
* $History: ResOrgNETAddInToolWinFormView.h $
*
* ***************** Version 8 *****************
* User: Anna Date: 30/08/04 Time: 0:45
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddInToolWindows
* 1. CResOrgNETAddInToolWinFormView::Save() now checks that the file
* exists before attempting to check whether it is read only
* 2. Moved CResOrgNETAddInToolWinFormView::DoOverwritePrompt() to
* ResOrgCore_Globals.cpp/h
*
* ***************** Version 7 *****************
* User: Anna Date: 24/08/04 Time: 0:14
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddInToolWindows
* Added support for out of range symbols
*
* ***************** Version 6 *****************
* User: Anna Date: 2/01/03 Time: 0:31
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddInToolWindows
* Replaced CQhtmWnd controls with CNGHtmlStaticCtrl (QHTM is
* overspecified for what I need here)
*
* ***************** Version 5 *****************
* User: Anna Date: 25/11/02 Time: 16:50
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddInToolWindows
* Changed website address in banner
*
* ***************** Version 4 *****************
* User: Anna Date: 22/10/02 Time: 14:45
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddInToolWindows
* Changed name/email address (at last!)
*
* ***************** Version 3 *****************
* User: Andy Date: 8/08/02 Time: 20:42
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddInToolWindows
* 1. Added CResOrgNETAddInToolWinFormView::PreTranslateMessage() in a
* vain attempt to get the tooltips on the buttons working (this is
* driving me nuts, but it's probably something really dumb)
* 2. If no projects are loaded the expiry date warning is now shown (if
* a dev build) and the combobox is disabled
*
* ***************** Version 2 *****************
* User: Andy Date: 2/08/02 Time: 17:04
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddInToolWindows
* 1. Added file banners
* 2. Tidied up the code a little - removing unused capabilities
*
* $Nokeywords: $
*
************************************************************************/
/////////////////////////////////////////////////////////////////////////////
// CResOrgNETAddInToolWinFormView
#define CResOrgNETAddInToolWinFormView_BASE CFormView
class CResOrgNETAddInToolWinFormView : public CFormView
{
DECLARE_DYNCREATE(CResOrgNETAddInToolWinFormView)
public:
CResOrgNETAddInToolWinFormView(void);
virtual ~CResOrgNETAddInToolWinFormView(void);
public:
enum { IDD = IDD_TOOLWIN_FORM };
// Data Members
protected:
CCJFlatComboBox m_ctrlProjects;
CNGButton m_ctrlProperties;
CNGButton m_ctrlEdit;
CNGButton m_ctrlRenumber;
CNGHtmlStaticCtrl m_ctrlResourceRangeCaption;
CNGHtmlStaticCtrl m_ctrlResourceRange;
CNGHtmlStaticCtrl m_ctrlCommandRangeCaption;
CNGHtmlStaticCtrl m_ctrlCommandRange;
CNGHtmlStaticCtrl m_ctrlOutOfRangeSymbolsCaption;
CNGHtmlStaticCtrl m_ctrlOutOfRangeSymbols;
CNGHtmlStaticCtrl m_ctrlConflictsCaption;
CNGHtmlStaticCtrl m_ctrlConflicts;
CStatic m_ctrlWarningIcon;
CNGHtmlStaticCtrl m_ctrlWarningText;
CString m_sWorkspacePathName;
CString m_sResourceSymbolFile;
CString m_sResourceRange;
CString m_sCommandRange;
CString m_sOutOfRangeSymbolsCaption;
int m_nOutOfRangeSymbols;
CString m_sOutOfRangeSymbols;
CString m_sConflictsCaption;
int m_nConflicts;
CString m_sConflicts;
CString m_sWarningText;
CVc7AutomationHelper m_AutomationHelper;
CResourceSymbolManager* m_pSymbols;
CNGFileChangeMonitor m_FileChangeMonitor;
CNGResizeCtrl m_Resizer;
HWND m_hWndResOrg; // The (normlly hidden) main window of ResOrg
// Diagnostics
public:
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Operations
public:
bool Initialise( CComPtr<EnvDTE::_DTE> pDTE,
HWND hWndResOrg);
void Refresh(void);
// Virtual Overrides
protected:
virtual BOOL PreTranslateMessage(MSG* pMsg);
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void PostNcDestroy(void);
public:
virtual BOOL Create( LPCTSTR lpszClassName,
LPCTSTR lpszWindowName,
DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd,
UINT nID,
CCreateContext* pContext = NULL);
// Implementation
protected:
bool UpdateSymbolFilesCtrl(void);
bool ConfigureSymbolManager( CResourceSymbolManager* pSymbols,
const CString& sPathName) const;
bool UpdateSymbolPropertiesCtrls(void);
void SetAvailableControls(void);
CString GetFullPath(const CString& sRelativePath) const;
bool Save(CResourceSymbolManager* pSymbols);
#ifdef _RESORG_EXPIRY_DATE
void ShowExpiryWarning(void);
#endif
// Message Handlers
protected:
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg void OnCbnSelchangeResourceSymbolFile(void);
afx_msg void OnBnClickedToolwinRefresh();
afx_msg void OnBnClickedToolwinEdit(void);
afx_msg void OnBnClickedToolwinRenumber(void);
afx_msg void OnBnClickedToolwinProperties(void);
afx_msg LRESULT OnMsgResourceSymbolFileChanged(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
public:
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -