Riverblade - ResOrg FAQ


ResOrg FAQ

In this section you'll find answers to some common questions about ResOrg.

One small plea - since these are questions I've thought of myself, they may not cover all of the topics you'd like to see discussed. If you can think of any question you'd like to see included, please let me know, and I'll endeavour to add it. 

 

Which platforms does ResOrg support?

ResOrg has been tested on Windows 98 (Service Pack 1) , Windows NT 4.0 (Service Pack 6) and Windows 2000 (Service Pack 1), and Windows XP (both Home and Professional). It should run with no problems on Windows Me.

Since the Symbol Renumbering Wizard is implemented using the Wizard97 style, it does not (alas) display quite as intended on Windows 95 systems. Having said that, the display is quite readable and all features work as intended.

ResOrg.NET should run on any platform supported by Visual C++ .NET - namely Windows NT 4.0, Windows 2000, and Windows XP.

 

Which versions of Visual C++ is ResOrg compatible with?

The ResOrg add-in is compatible with Visual C++ 5.0 and 6.0, but not Visual C++ .NET, for which ResOrg.NET has been specifically developed. ResOrg.NET will work with  Visual C++ .NET 2002, Visual Studio .NET 2003 and Visual Studio 2005 (unfortunately the ResOrg.NET add-in is not compatible with Visual Studio 2008 as a result of it being built with Visual Studio .NET 2003).

Support for both Visual Studio 2008 and Visual Studio 2010 will be included in the forthcoming ResOrg 2.0 release. Please contact us if you are interested in acting as a beta tester for this version.The ResOrg application will run on any supported platform, irrespective of the version (if any) of Visual C++ installed.

In order to compile the ResOrg source code, Visual C++ 6.0 is required (Service Packs 3 and 4 are definitely OK; earlier versions we can't vouch for). This is mainly because ResOrg uses MFC classes (CPropertySheetEx and CPropertyPageEx) introduced with Visual C++ 6.0.

Compilation of the ResOrg.NET source (which is in the same distribution) requires Visual C++ .NET 2003.

 

Which additional system DLLs do ResOrg and ResOrg.NET require, and what versions?

In order to function correctly, ResOrg may require several system DLLs to be installed:

  • ComCtl32.dll version 5.80
  • Shlwapi.dll version 5.50
  • Mfc42.dll version 6.00.8665.0 (ResOrg) or Mfc70.dll version 7.0.9466.0 (ResOrg.NET)
  • Msvrt.dll version 6.00.8797.0 (ResOrg) or Msvcr70.dll version 7.0.9466.0 (ResOrg.NET)

Installation of the Visual C++ 5.0/6.0 version of ResOrg may require updated versions of mfc42.dll and msvcrt.dll to be installed in your system folder (these files are included in the installer), together with a consequential reboot if the files are locked (sorry about that). Because of this, I recommend that you perform a first installation of ResOrg on WinNT/2000/XP machines using a user account with administrative privileges.

ResOrg uses features introduced in the common controls updates shipped with Internet Explorer 5.0. Specifically, it requires version 5.80 of comctl32.dll to be installed. ResOrg will check the version of comctl32.dll upon start-up, and inform you if an update is necessary. You can download an installer (50comupd.exe) for the update from the Microsoft web site at http://www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp.

An appropriate version of Shlwapi.dll is included with Windows 98, NT 4.0 or later versions of Windows. If ResOrg is to be installed on a Windows 95 system which does not have this file, it can be installed by installing Internet Explorer 4 or later.

 

How do I configure Visual C++ 5.0 or 6.0 to load the ResOrg Add-In?

The ResOrg application will optionally set up the registry entries needed to configure Visual Studio to load the ResOrg add-in.

If however, you need to configure it to do so manually, follow the following steps:

  1. Copy the ResOrg DLLs to the location you want them to run from (the default location for add-ins is C:\Program Files\Microsoft Visual Studio\Common\SharedIDE\Add-Ins)
  2. Start Visual C++ and select the Customize command on the Tools menu
  3. Select the "Macros and Add-Ins" tab
  4. If the entry "Resource ID Organiser" does not appear in the list control, press the Browse button to find the directory containing the DLLs. Once you've done this, the entry should appear in the list control
  5. Check the box next to the name of the add-in to load it. You should see the ResOrg toolbar, which you can dock anywhere convenient:

 Image

How does ResOrg pick the ranges to use for symbols when renumbering them?

In order to pick sensible ranges, ResOrg prescans the symbols in the resource file, to determine what ranges to use. It does this by dividing symbols into two types: resources (menus, dialogs, controls etc.) and commands, and computing an average value for each, based on the symbol values found. The suggested base values are basically the highest multiple of 1000 below the average value.

In most cases this works well. If however, the existing values of the symbols are widely separated in value, it may pick a value in the middle, which may not be what you expect! If this happens don't worry - simple type in your own values. The next time the file is renumbered, the Wizard will use your new values as the basis of its calculations, and should give a more accurate answer!

 

What happens when I renumber the symbols in a project?

Once the symbol ranges have been calculated (see the previous question for details on how this is done), the following sequence of operations occur:

Firstly, the symbols in the file are sorted into alphabetical order (in memory; nothing is written to the resource symbol file yet!). ResOrg will then allocate a value for each symbol, using the base values determined by the Wizard or specified by the user.

Assuming that the user chooses to save the changes, things get (unnecessarily) interesting. ResOrg has too deal with two issues here:

  1. In some cases (notably bitmaps in dialogs) the symbol IDs are stored in the .RC file as literal values. Thus, changing the symbol value outside of the IDE can break the project
  2. When symbols are changed, Visual C++ may not rebuild the project correctly unless it is cleaned first.

The solutions to these problems are, respectively:

  1. Read and parse the .RC file and modify it. This isn't for the faint hearted, but fortunately the file format is well documented (one day...)
  2. Determine which projects are dependent upon the modified file and clean them. ResOrg doesn't yet do this, though we may include it one day.