⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resorgnetaddintoolwindows.cpp

📁 ResOrg 图形化管理Vc项目的资源ID的工具的源代码。 ResOrg - Manage and Renumber Resource Symbol IDs Introduction The
💻 CPP
字号:
/************************************************************************
 *
 *            Resource ID Organiser Add-In for Visual C++.NET
 *
 * (c) Copyright 2000-2002 by Anna-Jayne Metcalfe (resorg@annasplace.me.uk)
 *                         All rights reserved.
 *
 ************************************************************************
 *                                                                       
 *  Filename    : ResOrgNETAddInToolWindows.cpp
 *
 *  Description : Implementation of CResOrgNETAddInToolWindowsApp and
 *                DLL registration.
 *
 *  Compiler    : Microsoft Visual C++ 7.0
 *                                                                       
 *  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/ResOrgNETAddInToolWindows.cpp $
 *   $Revision: 4 $
 *       $Date: 25/11/02 16:50 $
 *     $Author: Anna $
 *
 *    $History: ResOrgNETAddInToolWindows.cpp $
 * 
 * *****************  Version 4  *****************
 * User: Anna         Date: 25/11/02   Time: 16:50
 * Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddInToolWindows
 * Changed website address in banner
 * 
 * *****************  Version 3  *****************
 * User: Anna         Date: 22/10/02   Time: 14:45
 * Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddInToolWindows
 * Changed name/email address (at last!)
 * 
 * *****************  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: $
 *
 ************************************************************************/

#include "StdAfx.h"
#include "ResOrgNETAddInToolWindows.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


CResOrgNETAddInToolWindowsApp NEAR theApp;

const GUID CDECL BASED_CODE _tlid =
		{ 0x5C5774F7, 0xAD56, 0x4CDF, { 0xBC, 0xE0, 0xF9, 0xDC, 0x53, 0x96, 0x64, 0x91 } };
const WORD _wVerMajor = 1;
const WORD _wVerMinor = 0;



// CResOrgNETAddInToolWindowsApp::InitInstance - DLL initialization

BOOL CResOrgNETAddInToolWindowsApp::InitInstance(void)
{
	BOOL bInit = COleControlModule::InitInstance();

	if (bInit)
	{
		// Create CDynLinkLibrary objects for each of the
		// extension DLLs we use.
		//
		// This is only necessary because DevStudio add-ins are usually
		// implemented as Regular DLLs, rather than extension DLLs.
		//
		// Without this code, the resources in the extension DLLs
		// would be unavailable (much badness, in fact)...
		InitCJLibrary();
		InitNGLibrary();

		#if _MSC_VER < 1300		// BXFileDialog doesn't work with VC7 yet
			InitBXFileDialogDll();
		#endif

		InitResOrgCore();

		// Change the name of the application (only needed for message boxes!)
		// The CWinApp destructor will free the memory for us
		free((void*)m_pszAppName);

		CString sAppTitle;
		sAppTitle.LoadString(AFX_IDS_APP_TITLE);

		m_pszAppName = _tcsdup(sAppTitle);

		::AfxGetModuleState()->m_lpszCurrentAppName = m_pszAppName;
	}

	return bInit;
}



// CResOrgNETAddInToolWindowsApp::ExitInstance - DLL termination
int CResOrgNETAddInToolWindowsApp::ExitInstance(void)
{
	// TODO: Add your own module termination code here.

	return COleControlModule::ExitInstance();
}



// DllRegisterServer - Adds entries to the system registry
STDAPI DllRegisterServer(void)
{
	AFX_MANAGE_STATE(_afxModuleAddrThis);

	if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
		return ResultFromScode(SELFREG_E_TYPELIB);

	if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
		return ResultFromScode(SELFREG_E_CLASS);

	return NOERROR;
}



// DllUnregisterServer - Removes entries from the system registry
STDAPI DllUnregisterServer(void)
{
	AFX_MANAGE_STATE(_afxModuleAddrThis);

	if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
		return ResultFromScode(SELFREG_E_TYPELIB);

	if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
		return ResultFromScode(SELFREG_E_CLASS);

	return NOERROR;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -