📄 stdafx.h
字号:
/************************************************************************
*
* Resource ID Organiser Add-In for Visual C++ .NET
*
* (c) Copyright 2000-2005 by Riverblade Limited (UK). All rights reserved.
*
************************************************************************
*
* Description : Include file for standard system include files,
* or project specific include files that are used
* frequently, but are changed infrequently
*
* Compiler : Microsoft Visual C++.NET 2003
*
* Target
* Environment : Windows 2000/XP
*
* NOTE:
*
* This software is provided "as is". All title and copyrights in and
* to the software, including but not limited to any images, text etc.
* etc. incorporated into it, are the property of Anna-Jayne Metcalfe
* and Riverblade Limited, except where acknowledged otherwise.
*
* Your may freely use this code in your own products, PROVIDED
* this notice is not removed or modified.
*
* Please visit http://www.riverblade.co.uk/products/resorg or email
* support@riverblade.co.uk for latest updates and product support
*
************************************************************************
*
* MODIFICATION HISTORY:
*
* This is a controlled document. See project configuration
* control tool for latest version and full version history.
*
* $Archive: /Projects/AddIns/ResOrg/ResOrgNETAddIn/stdafx.h $
* $Revision: 9 $
* $Date: 22/10/05 16:42 $
* $Author: Anna $
*
* $History: stdafx.h $
*
* ***************** Version 9 *****************
* User: Anna Date: 22/10/05 Time: 16:42
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddIn
* Integrated ATL CMainToolWindowCtrl, which replaces the original MFC OLE
* Control [IMS ID 125]
*
* ***************** Version 8 *****************
* User: Anna Date: 17/10/05 Time: 20:20
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddIn
* Started integrating CAddInCommandHandler classes
*
* ***************** Version 7 *****************
* User: Anna Date: 13/10/05 Time: 12:46
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddIn
* Modified #imports for DTE and MSO to import smart pointer interfaces as
* well as raw ones. Also included lint directives so PC-Lint can identify
* the .tlh and .tli files for interfaces imported by LIBID.
*
* ***************** Version 6 *****************
* User: Anna Date: 28/12/04 Time: 9:28
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddIn
* 1. Added satellite DLL
* 2. Updated banner
*
* ***************** Version 5 *****************
* User: Anna Date: 25/11/02 Time: 15:28
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddIn
* Changed website address in banner
*
* ***************** Version 4 *****************
* User: Anna Date: 22/10/02 Time: 14:15
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddIn
* Changed name/email address (at last!)
*
* ***************** Version 3 *****************
* User: Andy Date: 1/08/02 Time: 16:44
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddIn
* Further development of ResOrg.NET - particularly the tool window
*
* ***************** Version 2 *****************
* User: Andy Date: 7/06/02 Time: 22:37
* Updated in $/Projects/AddIns/ResOrg/ResOrgAddInVc7
* Initial integration
*
* ***************** Version 1 *****************
* User: Andy Date: 3/06/02 Time: 16:53
* Created in $/Projects/AddIns/ResOrg/ResOrgAddInVc7
*
*
* $Nokeywords: $
*
************************************************************************/
#pragma once
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxcview.h>
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include "..\CJLibrary\Include\CJLibrary.h"
#include "..\NGLibrary\NGLibrary.h"
#include "..\ResOrgCore\ResOrgCore.h"
#include <map>
#include <vector>
#ifndef STRICT
#define STRICT
#endif
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0510 // Change this to the appropriate value to target Windows 2000 or later.
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0510 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
#endif
//#define _ATL_APARTMENT_THREADED
#define _ATL_NO_AUTOMATIC_NAMESPACE
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
// turns off ATL's hiding of some common and often safely ignored warning messages
#define _ATL_ALL_WARNINGS
#include "ResOrgNETAddIn_Res.h"
#include "..\SatelliteDll\SatelliteDll_Res.h"
#include <atlbase.h>
#include <atlcom.h>
#pragma warning( disable : 4278 )
#pragma warning( disable : 4146 )
// The following #import imports the IDTExtensibility2 interface based on it's LIBID
#ifdef _lint
//lint +libh(Debug\msaddndr.tlh)
#include "Debug\msaddndr.tlh"
#else
#import "libid:AC0714F2-3D04-11D1-AE7D-00A0C90F26F4" version("1.0") lcid("0") raw_interfaces_only named_guids
#endif
//The following #import imports MSO based on it's LIBID
#ifdef _lint
//lint +libh(Debug\mso.tlh)
//lint +libh(Debug\mso.tli)
#include "Debug\mso.tlh"
#else
#import "libid:2DF8D04C-5BFA-101B-BDE5-00AA0044DE52" version("2.2") lcid("0") named_guids
#endif
//The following #import imports DTE based on it's LIBID
#ifdef _lint
//lint +libh(Debug\dte.tlh)
//lint +libh(Debug\dte.tli)
#include "Debug\dte.tlh"
#else
#import "libid:80cc9f66-e7d8-4ddd-85b6-d9e6cd0e93e2" version("7.0") lcid("0") named_guids
#endif
#pragma warning( default : 4146 )
#pragma warning( default : 4278 )
#define IfFailGo(x) { hr=(x); if (FAILED(hr)) goto Error; }
#define IfFailGoCheck(x, p) { hr=(x); if (FAILED(hr)) goto Error; if(!p) {hr = E_FAIL; goto Error; } }
class DECLSPEC_UUID("48E87F3E-7E87-4D98-A4D0-04885E5F45E1") ResOrgNETAddInLib;
using namespace ATL;
class CAddInModule : public CAtlDllModuleT< CAddInModule >
{
public:
CAddInModule()
{
m_hInstance = NULL;
}
DECLARE_LIBID(__uuidof(ResOrgNETAddInLib))
inline HINSTANCE GetResourceInstance()
{
return m_hInstance;
}
inline void SetResourceInstance(HINSTANCE hInstance)
{
m_hInstance = hInstance;
}
// Use with care - this will fail if Visual Studio is not the active window
HWND FindVisualStudioMainWnd(void) const
{
HWND hWndDevStudio = NULL;
HWND hWndDesktop = ::GetDesktopWindow();
HWND hWnd = ::GetActiveWindow();
while ( (NULL != hWnd) && (hWnd != hWndDesktop) )
{
hWndDevStudio = hWnd;
hWnd = ::GetParent(hWnd);
}
return hWndDevStudio;
}
private:
HINSTANCE m_hInstance;
};
extern CAddInModule _Module;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -