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

📄 resorgoptionsaddinpage.cpp

📁 ResOrg 图形化管理Vc项目的资源ID的工具的源代码。 ResOrg - Manage and Renumber Resource Symbol IDs Introduction The
💻 CPP
字号:
/************************************************************************
 *
 *                 Resource ID Organiser Core Library
 *
 * (c) Copyright 2000-2003 by Anna-Jayne Metcalfe (resorg@annasplace.me.uk)
 *                         All rights reserved.
 *
 ************************************************************************
 *                                                                       
 *  Filename    : ResOrgOptionsAddInPage.cpp
 *
 *  Description : CResOrgOptionsAddInPage - property page class
 *
 *  Compiler    : Microsoft Visual C++ 6.0, Service Pack 3 or later
 *                Microsoft Visual C++ .NET 2002
 *                                                                       
 *  Target                                                               
 *  Environment : Windows 98/NT/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/ResOrgCore/ResOrgOptionsAddInPage.cpp $
 *   $Revision: 9 $
 *       $Date: 15/04/03 20:37 $
 *     $Author: Anna $
 *
 *    $History: ResOrgOptionsAddInPage.cpp $
 * 
 * *****************  Version 9  *****************
 * User: Anna         Date: 15/04/03   Time: 20:37
 * Updated in $/Projects/AddIns/ResOrg/ResOrgCore
 * 1.  Removed unnecessary file guards (#pragma once works well enough)
 * 2.  Updated file banners
 * 
 * *****************  Version 8  *****************
 * User: Anna         Date: 15/02/03   Time: 20:43
 * Updated in $/Projects/AddIns/ResOrg/ResOrgCore
 * Changed big BOOLs into little bools
 * 
 * *****************  Version 7  *****************
 * User: Anna         Date: 25/11/02   Time: 15:14
 * Updated in $/Projects/AddIns/ResOrg/ResOrgCore
 * Changed website address in banner
 * 
 * *****************  Version 6  *****************
 * User: Anna         Date: 22/10/02   Time: 13:24
 * Updated in $/Projects/AddIns/ResOrg/ResOrgCore
 * Changed name/mail address (at last!)
 * 
 * *****************  Version 5  *****************
 * User: Andy         Date: 7/06/02    Time: 17:04
 * Updated in $/Projects/AddIns/ResOrg/ResOrgCore
 * Renamed the ResOrgUtils module to ResOrgCore. Updated file banners
 * accordingly
 * 
 * *****************  Version 4  *****************
 * User: Andy         Date: 12/05/01   Time: 6:48
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * Disable controls if DevfStudio isn't available
 * 
 * *****************  Version 3  *****************
 * User: Andy         Date: 17/02/01   Time: 7:14
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * When checking the path to the add-in on startup, the path used will be
 * that of the app (this should ensure that the right version of the
 * add-in is loaded)
 * 
 * *****************  Version 2  *****************
 * User: Andy         Date: 3/12/00    Time: 8:33
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * 1.  Added banner
 * 2.  Implemented the rest of it...
 * 
 *
 * $Nokeywords: $
 *
 ************************************************************************/

#include "StdAfx.h"
#include "ResOrgCore_Priv.h"

#include "DSAddInLoader.h"

#include "ResOrgOptionsAddInPage.h"



#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CResOrgOptionsAddInPage property page

IMPLEMENT_DYNCREATE(CResOrgOptionsAddInPage, CResOrgOptionsAddInPage_BASE)

CResOrgOptionsAddInPage::CResOrgOptionsAddInPage(void)
	: CResOrgOptionsAddInPage_BASE(CResOrgOptionsAddInPage::IDD)
{
	//{{AFX_DATA_INIT(CResOrgOptionsAddInPage)
	m_sFileName			= _T("");
	m_bLoad				= FALSE;
	m_bAskAboutLoading	= FALSE;
	//}}AFX_DATA_INIT

	m_sDescription.LoadString(IDS_RESORG_DESCRIPTION);
}


CResOrgOptionsAddInPage::~CResOrgOptionsAddInPage(void)
{
}


void CResOrgOptionsAddInPage::DoDataExchange(CDataExchange* pDX)
{
	CResOrgOptionsAddInPage_BASE::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CResOrgOptionsAddInPage)
	DDX_Text(pDX,	IDC_RESORG_DESC,				m_sDescription);
	DDX_Text(pDX,	IDC_RESORG_FILENAME,			m_sFileName);
	DDX_Check(pDX,	IDC_RESORG_LOAD,				m_bLoad);
	DDX_Check(pDX,	IDC_RESORG_LOAD_QUERY,			m_bAskAboutLoading);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CResOrgOptionsAddInPage, CResOrgOptionsAddInPage_BASE)
	//{{AFX_MSG_MAP(CResOrgOptionsAddInPage)
	ON_COMMAND(		IDC_RESORG_DESC,				OnCmdDescription)
	ON_BN_CLICKED(	IDC_RESORG_DESC_RESET,			OnClickedResetDescription)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CResOrgOptionsAddInPage virtual overrides

BOOL CResOrgOptionsAddInPage::OnInitDialog(void) 
{
	CResOrgOptionsAddInPage_BASE::OnInitDialog();
	
	CString sAddInName;
	sAddInName.LoadString(IDS_RESORG_LONGNAME);

	CDSAddInLoader loader(sAddInName);
	BOOL bAvailable = loader.CanLoad();
	if (bAvailable)
	{
		m_sDescription	= loader.GetDescription();
		m_sFileName		= loader.GetPathName();
		m_bLoad			= loader.IsLoaded();

		CNGSplitPath split(AfxGetApp()->m_pszHelpFilePath);

		m_sFileName = split.GetDrive() +
					split.GetDirectory() +
					_T("ResOrgAddIn.dll");

		if (!::FileExists(m_sFileName) )
		{
			m_sFileName = _T("");
		}
		if (m_sDescription.IsEmpty())
		{
			m_sDescription.LoadString(IDS_RESORG_DESCRIPTION);
		}
		if (m_sFileName.IsEmpty() )
		{
			bAvailable = FALSE;
		}
	}
	if (!bAvailable)
	{
		EnableDlgControl(IDC_RESORG_DESC,			FALSE);
		EnableDlgControl(IDC_RESORG_FILENAME,		FALSE);
		EnableDlgControl(IDC_RESORG_LOAD,			FALSE);
		EnableDlgControl(IDC_RESORG_DESC_RESET,		FALSE);
	}
	UpdateData(FALSE);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}


void CResOrgOptionsAddInPage::OnOK(void)
{
	if (!m_sFileName.IsEmpty())
	{
		CString sAddInName;
		sAddInName.LoadString(IDS_RESORG_LONGNAME);

		CDSAddInLoader loader(sAddInName);

		loader.SetDescription(m_sDescription);
		loader.SetPathName(m_sFileName);
		loader.Load( (FALSE != m_bLoad) );
	}
	CResOrgOptionsAddInPage_BASE::OnOK();
}


/////////////////////////////////////////////////////////////////////////////
// CResOrgOptionsAddInPage message handlers

void CResOrgOptionsAddInPage::OnCmdDescription(void)
{
	// The Description CANNOT be blank
	
}


void CResOrgOptionsAddInPage::OnClickedResetDescription(void) 
{
	m_sDescription.LoadString(IDS_RESORG_DESCRIPTION);
	UpdateData(FALSE);
}


⌨️ 快捷键说明

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