Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Resource ID Organiser Add-In for Visual C++ 5.0/6.0/.NET

, 10 Jan 2005
An application/add-in to organise and renumber resource symbol IDs
resorg103.zip
resorg104.zip
resorgaddinsetup.zip
resorgaddin_executables.zip
resorgnetaddinsetup.zip
resorgnetaddin_executables.zip
resorgnet_executables.zip
ResOrgNET_executables
CJ609LibVc7.dll
NGLib103Vc7.dll
QHTMLight.dll
ResOrg.cnt
resorg.fts
ResOrg.hlp
ResOrgNETAddIn.dll
ResOrgNETAddInToolWindows.ocx
ResOrgNETCore.dll
resorg_demo.zip
resorg_executables.zip
resorg_src.zip
BXFileDialog
BXFileDialog.dsp
Lib
Release
Res
bitmap2.bmp
FileOpen.bmp
filesave.bmp
CJLibrary
CJLibrary
CJLibrary.def
CJLibrary.dsp
CJLibrary.dsw
CJLibrarydep.jpg
CJLibraryStatic.dsp
Debug_Unicode
Release
Release_Unicode
res
Include
res
btn_arro.bmp
btn_explorer.bmp
button_images.bmp
cj_logo.bmp
dragging.cur
handcur.cur
headerba.bmp
hsplitba.cur
icr_hand.cur
nodraggi.cur
PushPin.bmp
Toolbar.bmp
vsplitba.cur
Lib
NGLibrary
Bin
NGLibrary.def
NGLibrary.dsp
NGLibrary.dsw
Release
Res
Drives.bmp
Release
ResOrgAddIn
Release
Res
HtmlDoc.ico
ResOrg.ico
ResOrgDoc.ico
TBarLrge.bmp
TBarMedm.bmp
Toolbar.bmp
WorkspaceTabs.bmp
ResOrgAddIn.def
ResOrgAddIn.dsp
ResOrgAddIn.odl
ResOrgAddIn_Res.hm
ResOrgApp
Lint
Release
Res
HtmlDoc.ico
MAINFRAM.BMP
ResOrg.ico
ResOrgDoc.ico
TBarLrge.bmp
TBarMedm.bmp
Toolbar.bmp
workspace.ico
WorkspaceTabs.bmp
ResOrgApp.dsp
ResOrgApp_Res.hm
ResOrgApp_Res.resorg
ResOrgCore
Lint
Release
Res
Anna.bmp
BuildOptions.ico
ComCtl Version Prompt.rtf
File Reload Warning Ex.rtf
File Reload Warning.rtf
Global Next Symbol Value Warning Prompt.rtf
information.ico
Invalid Symbol Name.rtf
Mailing List Prompt.rtf
Next Symbol Value Warning Prompt.rtf
project context menu.bmp
project.ico
RenumWiz Completion.rtf
Report.ico
ResOrg Logo.bmp
ResOrg Updated.rtf
ResOrg.ico
resource file.ico
riverblade_logo.bmp
solution.ico
Symbol Delete Warning.rtf
Symbol Name Warning.rtf
Symbol Rename Warning.rtf
SymbolFile.ico
Symbols Delete Warning.rtf
sym_binary.ico
sym_bitmap.ico
sym_command.ico
sym_control.ico
sym_dialog.ico
sym_icon.ico
sym_menu.ico
sym_prompt.ico
sym_resource.ico
sym_string.ico
Toolbar.bmp
VcAddIn.ico
VersionCheck.ico
warning.ico
WizardHeader256.bmp
WizardWatermark256.bmp
ResOrgCore.def
ResOrgCore.dsp
ResOrgCore_Res.hm
ResOrgCore_Res.resorg
Xml
ProblemSymbolReportHtml.xsl
SymbolsReportHtml.xsl
ResOrgNETAddIn
AddIn.def
Release
Res
AddIn.rgs
HtmlDoc.ico
ResOrg.ico
ResOrgDoc.ico
Toolbar.bmp
WorkspaceTabs.bmp
ResOrgNETAddInSetup
Banner.jpg
Intro screen.jpg
Licence.rtf
ReadMe.rtf
Release
ResOrg.ico
ResOrgNETAddInSetup.vdproj
ResOrgNETAddInToolWindows
Release
Res
Edit.ico
Properties.ico
Renumber.ico
ResOrgNETAddInToolWindows.ico
ResOrgNETAddInToolWindowsCtrl.bmp
ResOrgNETAddInToolWindows.def
SatelliteDll
Release
res
AboutBoxCmd.bmp
OpenResOrgCmd.bmp
OptionsCmd.bmp
ViewMainToolWinCmd.bmp
/************************************************************************
 *
 *                 Resource ID Organiser Core Library
 *
 * (c) Copyright 2000-2003 by Anna-Jayne Metcalfe (resorg@annasplace.me.uk)
 *                         All rights reserved.
 *
 ************************************************************************
 *                                                                       
 *  Filename    : RenumWizBaseValuesPage.cpp
 *
 *  Description : CRenumWizBaseValuesPage - Symbol Renumbering Wizard
 *                "Base Values" 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/RenumWizBaseValuesPage.cpp $
 *   $Revision: 14 $
 *       $Date: 23/08/04 21:43 $
 *     $Author: Anna $
 *
 *    $History: RenumWizBaseValuesPage.cpp $
 * 
 * *****************  Version 14  *****************
 * User: Anna         Date: 23/08/04   Time: 21:43
 * Updated in $/Projects/AddIns/ResOrg/ResOrgCore
 * Added support for out of range symbols
 * 
 * *****************  Version 13  *****************
 * User: Anna         Date: 1/07/03    Time: 14:11
 * Updated in $/Projects/AddIns/ResOrg/ResOrgCore
 * Improved layout as per the Symbol File Properties Dialog Base Values
 * page
 * 
 * *****************  Version 12  *****************
 * User: Anna         Date: 24/06/03   Time: 14:29
 * Updated in $/Projects/AddIns/ResOrg/ResOrgCore
 * Symbol range validation now uses the #defined values from
 * ResourceSymbolTypes.h rather than hardcoded values
 * 
 * *****************  Version 11  *****************
 * User: Anna         Date: 15/04/03   Time: 20:51
 * Updated in $/Projects/AddIns/ResOrg/ResOrgCore
 * 1.  Knock on changes from CResourceSymbolManager
 * 2.  Removed unused command handler
 * 3.  Removed unnecessary file guards (#pragma once works well enough)
 * 
 * *****************  Version 10  *****************
 * User: Anna         Date: 25/11/02   Time: 15:10
 * Updated in $/Projects/AddIns/ResOrg/ResOrgCore
 * Changed website address in banner
 * 
 * *****************  Version 9  *****************
 * User: Anna         Date: 22/10/02   Time: 13:24
 * Updated in $/Projects/AddIns/ResOrg/ResOrgCore
 * Changed name/mail address (at last!)
 * 
 * *****************  Version 8  *****************
 * 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 7  *****************
 * User: Andy         Date: 27/05/02   Time: 17:07
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * Knock on changes from CResourceSymbolBuffer (now
 * CResourceSymbolManager)
 * 
 * *****************  Version 6  *****************
 * User: Andy         Date: 12/28/01   Time: 12:49a
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * Integrated a new "this is what the new values will be" page
 * 
 * *****************  Version 5  *****************
 * User: Andy         Date: 15/08/01   Time: 13:43
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * Removed commented out code
 * 
 * *****************  Version 4  *****************
 * User: Andy         Date: 4/05/01    Time: 22:37
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * Implemented resizing
 * 
 * *****************  Version 3  *****************
 * User: Andy         Date: 21/04/01   Time: 7:20
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 * 1.  Added a subtitle to the page
 * 2.  Integrated CRenumWizEngine
 * 3.  Integrated to "Options" and "Symbol Selection" pages
 * 
 * *****************  Version 2  *****************
 * User: Andy         Date: 29/11/00   Time: 18:37
 * Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
 *  Added file banners
 *
 * $Nokeywords: $
 *
 ************************************************************************/


#include "StdAfx.h"


#include "ResOrgCore_Priv.h"

#include "RenumWizCompletionPage.h"

#include "RenumWizBaseValuesPage.h"


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

/////////////////////////////////////////////////////////////////////////////
// CRenumWizBaseValuesPage dialog

CRenumWizBaseValuesPage::CRenumWizBaseValuesPage(void)
	: CRenumWizBaseValuesPage_BASE(	CRenumWizBaseValuesPage::IDD,
									IDS_RENUMWIZ,
									IDS_RENUMWIZ_BASE_VALUES_TITLE,
									IDS_RENUMWIZ_BASE_VALUES_SUBTITLE)
{
	//{{AFX_DATA_INIT(CRenumWizBaseValuesPage)
	m_sBaseResourceCaption	= _T("");
	m_sBaseControlCaption	= _T("");
	m_sBaseCommandCaption	= _T("");
	m_uBaseCommand			= 0;
	m_uBaseControl			= 0;
	m_uBaseResource			= 0;
	m_sResources			= _T("");
	m_sControls				= _T("");
	m_sCommands				= _T("");
	//}}AFX_DATA_INIT
}


void CRenumWizBaseValuesPage::DoDataExchange(CDataExchange* pDX)
{
	CRenumWizBaseValuesPage_BASE::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CRenumWizBaseValuesPage)
	DDX_Text(pDX,			IDC_SYM_BASE_RESOURCE_CAPTION,	m_sBaseResourceCaption);
	DDX_Text(pDX,			IDC_SYM_BASE_RESOURCE,			m_uBaseResource);
	DDX_Text(pDX,			IDC_SYM_BASE_CONTROLS_CAPTION,	m_sBaseControlCaption);
	DDV_MinMaxUInt(pDX,										m_uBaseResource,	SYM_RESOURCE_VALUE_MIN, SYM_RESOURCE_VALUE_MAX);
	DDX_Text(pDX,			IDC_SYM_BASE_CONTROLS,			m_uBaseControl);
	DDV_MinMaxUInt(pDX,										m_uBaseControl,		SYM_CONTROL_VALUE_MIN, SYM_CONTROL_VALUE_MAX);
	DDX_Text(pDX,			IDC_SYM_BASE_COMMANDS_CAPTION,	m_sBaseCommandCaption);
	DDX_Text(pDX,			IDC_SYM_BASE_COMMANDS,			m_uBaseCommand);
	DDV_MinMaxUInt(pDX,										m_uBaseCommand,		SYM_COMMAND_VALUE_MIN, SYM_COMMAND_VALUE_MAX);
	DDX_Text(pDX,			IDC_SYM_RESOURCES,				m_sResources);
	DDX_Text(pDX,			IDC_SYM_CONTROLS,				m_sControls);
	DDX_Text(pDX,			IDC_SYM_COMMANDS,				m_sCommands);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CRenumWizBaseValuesPage, CRenumWizBaseValuesPage_BASE)
	//{{AFX_MSG_MAP(CRenumWizBaseValuesPage)
	ON_BN_CLICKED(			IDC_RENUMWIZ_RESET,				OnClickedReset)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CRenumWizWafflePage overrides

BOOL CRenumWizBaseValuesPage::OnInitDialog(void) 
{
	CRenumWizBaseValuesPage_BASE::OnInitDialog();
	
	if (IsResizeable())
	{
		m_Resizer.Add( IDC_RENUMWIZ_CAPTION,			0, 0, 100, 0);
		m_Resizer.Add( IDC_SYM_BASE_RESOURCE_CAPTION,	50, 20, 0, 0);
		m_Resizer.Add( IDC_SYM_BASE_RESOURCE,			50, 20, 0, 0);
		m_Resizer.Add( IDC_SYM_RESOURCES,				50, 20, 0, 0);
		m_Resizer.Add( IDC_SYM_BASE_CONTROLS_CAPTION,	50, 40, 0, 0);
		m_Resizer.Add( IDC_SYM_BASE_CONTROLS,			50, 40, 0, 0);
		m_Resizer.Add( IDC_SYM_CONTROLS,				50, 40, 0, 0);
		m_Resizer.Add( IDC_SYM_BASE_COMMANDS_CAPTION,	50, 60, 0, 0);
		m_Resizer.Add( IDC_SYM_BASE_COMMANDS,			50, 60, 0, 0);
		m_Resizer.Add( IDC_SYM_COMMANDS,				50, 60, 0, 0);
		m_Resizer.Add( IDC_RENUMWIZ_RESET_CAPTION,		50, 80, 0, 0);
		m_Resizer.Add( IDC_RENUMWIZ_RESET,				50, 80, 0, 0);
		m_Resizer.Add( IDC_RENUMWIZ_RESET_CAPTION2,		50, 80, 0, 0);
	}

	m_sBaseResourceCaption.Format(	IDC_SYM_BASE_RESOURCE_CAPTION,	SYM_RESOURCE_VALUE_MIN, SYM_RESOURCE_VALUE_MAX);
	m_sBaseControlCaption.Format(	IDC_SYM_BASE_CONTROL_CAPTION,	SYM_CONTROL_VALUE_MIN, SYM_CONTROL_VALUE_MAX);
	m_sBaseCommandCaption.Format(	IDC_SYM_BASE_COMMAND_CAPTION,	SYM_COMMAND_VALUE_MIN, SYM_COMMAND_VALUE_MAX);


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


LRESULT CRenumWizBaseValuesPage::OnWizardBack(void) 
{
	LRESULT lPageID = -1;
	switch (m_pEngine->m_eSymbolSelection)
	{
		case RENUMWIZ_ALL_SYMBOLS:		// All symbols
		case RENUMWIZ_PROBLEM_SYMBOLS:
			lPageID = IDD_RENUMWIZ_OPTIONS_PAGE;
			break;

		case RENUMWIZ_SELECTED_SYMBOLS:		// Selected symbols
			lPageID = IDD_RENUMWIZ_SELECT_SYMBOLS_PAGE;
			break;

		default:
			ASSERT(FALSE);
			break;
	}
	return lPageID;
}


BOOL CRenumWizBaseValuesPage::OnSetActive(void)
{
	if (!IsInitialising() )
	{
		if (NULL != m_pEngine)
		{
			m_uBaseCommand	= m_pEngine->m_uBaseCommand;
			m_uBaseControl	= m_pEngine->m_uBaseControl;
			m_uBaseResource	= m_pEngine->m_uBaseResource;

			CResourceSymbolCounts Info;
			m_pEngine->m_pSymbolManager->GetSymbolCount(Info);

			// Update summary text
			m_sResources.Format(IDS_SYM_RESOURCES,	Info.m_nResources);
			m_sControls.Format(IDS_SYM_CONTROLS,	Info.m_nControls);
			m_sCommands.Format(IDS_SYM_COMMANDS,	Info.m_nCommands);

			UpdateData(FALSE);
		}
		if (0 == m_uBaseCommand)
		{
			OnClickedReset();
		}
	}
	return TRUE;
}


BOOL CRenumWizBaseValuesPage::OnKillActive(void)
{
	return TRUE;
}


LRESULT CRenumWizBaseValuesPage::OnWizardNext(void) 
{
	if (NULL != m_pEngine)
	{
		m_pEngine->m_uBaseCommand	= m_uBaseCommand;
		m_pEngine->m_uBaseControl	= m_uBaseControl;
		m_pEngine->m_uBaseResource	= m_uBaseResource;

		m_pEngine->Renumber();
	}
	return IDD_RENUMWIZ_NEW_SYM_VALUES_PAGE;
}


/////////////////////////////////////////////////////////////////////////////
// CRenumWizBaseValuesPage message handlers

void CRenumWizBaseValuesPage::OnClickedReset(void)
{
	if ( (NULL != m_pEngine) && (NULL != m_pEngine->m_pSymbolManager) )
	{
		m_pEngine->m_pSymbolManager->CalculateBaseValues(	m_uBaseResource,
															m_uBaseCommand,
															m_uBaseControl);
		UpdateData(FALSE);
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Anna-Jayne Metcalfe
Founder Riverblade Limited
United Kingdom United Kingdom
I haven't always written software for a living. When I graduated from Surrey University in 1989, it was with an Electronic Engineering degree, but unfortunately that never really gave me the opportunity to do anything particularly interesting (with the possible exception of designing Darth Vader's Codpiece * for the UK Army in 1990).
    * Also known as the Standard Army Bootswitch. But that's another story...
Since the opportunity arose to lead a software team developing C++ software for Avionic Test Systems in 1996, I've not looked back. More recently I've been involved in the development of subsea acoustic navigation systems, digital TV broadcast systems, port security/tracking systems, and most recently software development tools with my own company, Riverblade Ltd.
 
One of my personal specialities is IDE plug-in development. ResOrg was my first attempt at a plug-in, but my day to day work is with Visual Lint, an interactive code analysis tool environment with works within the Visual Studio and Eclipse IDEs or on build servers.
 
I love lots of things, but particularly music, photography and anything connected with history or engineering. I despise ignorant, intolerant and obstructive people - and it shows...I can be a bolshy cow if you wind me up the wrong way...Laugh | :laugh:
 
I'm currently based 15 minutes walk from the beach in Bournemouth on the south coast of England. Since I moved here I've grown to love the place - even if it is full of grockles in Summer!
Follow on   Twitter

| Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 10 Jan 2005
Article Copyright 2001 by Anna-Jayne Metcalfe
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid