ResOrg Benefits and Features

For each project within a solution, ResOrg allows the symbol definition file (it doesn't have to be called resource.h, incidentally) for one or more projects to be viewed or edited directly. If (as happens all too often) a symbol file has two or more symbols with the same value, they will be identified as conflicting symbols and displayed in red:

  Symbols Display

As you'd expect, individual symbols can be added, edited or removed (be careful with the latter!), but the real power of ResOrg is its ability to detect conflicts or out of range symbols and intelligently renumber them.

The Symbol Properties Dialog for a symbol whose value conflicts with another in the same resource symbol file will warn of the conflict, and provides a quick way to resolve it:

  Symbol Properties dialog

HTML Reports

In large projects the ability to identify problems can become critical. To that end, ResOrg provides facilities for generating HTML reports showing the symbols in a module - or just those which ResOrg has identified have a problem with their name or value:

Click on the image to view an example report

Although the two reports provided  (a full Symbols Report and a Problem Symbols Report) should meet most needs it is also possible to use an external XSLT stylesheet to produce custom reports. Riverblade would of course be pleased to assist customers with specific requirements in this area. Please do not hesitate to contact us if this is the case.

 

Symbol Renumbering Wizard

If bulk changes are required, the Resource Symbol Renumbering Wizard will guide you through the process of renumbering all of the symbols in a given resource file (click on a picture to see a larger image):

When run, the wizard will identify suitable ranges for the symbols, and renumber them appropriately. Conflicting symbol values can be quickly and easily eliminated by this process.

 

Exclusion of symbols from renumbering operations

Unfortunately, renumbering some symbols can cause problems. Although the Symbol Renumbering Wizard allows individual symbols to be excluded from renumbering operations, it can be convenient to globally exclude specific symbols (such as IDR_MAINFRAME) from automatic renumbering across any file.

The "Fixed Symbols" page* in the Options Dialog provides the ability to do this:

    * Available in ResOrg 1.6 and above

Any symbols listed in this page will not be automatically considered for renumbering by the Symbol Renumbering Wizard.

 

Keeping Users Informed

ResOrg is a fairly complex product, and we try to produce updates as often as we reasonably can. However, releasing new versions is all very well, but how do you let those using the software know that it's been updated?

ResOrg includes several mechanisms to make this process easier (and reduce the number of versions we have to support!):

  1. Access to the ResOrg website from the Help menu within the application/add-in itself.
     
  2. A prompt (displayed the first time ResOrg is run after installation) asking the user whether they want to subscribe to the ResOrg Mailing List, upon which version updates are announced as soon as they become available:

  1. An automated mechanism to check whether version updates are available. If so, a message is disabled giving details of the new version, and offering the option to visit the download page, from where you can download the new version if you choose:

    Note that the update check does not send any information to the server - it merely reads a small text file to determine the latest released product version, and compares that against the version which is currently running. If the running version is older than that reported by the server, the details of the new version will be displayed in the prompt above.

    By default this check occurs every 7 days. This interval can be changed - or version checking disabled entirely - from the "Updates" page of the Options Dialog:

Finally, although not a part of the product itself, the Riverblade Developers' Blog (Products, the Universe and Everything) is another way to find out what the current plans for ResOrg, and discuss forthcoming or requested features. An RSS feed is also included for convenience.

 

Additional Features in ResOrg.NET

ResOrg.NET is the ResOrg add-in for Visual C++ .NET. As well as a radically different development environment, Visual C++ .NET also introduces a new extensibility model, which allows add-ins much closer integration with the environment than previous versions.

Unfortunately, this comes at the price of backward compatibility, since the new extensibility model is not backward compatible to previous versions of Visual C++. For ResOrg, the new model and environment adds a whealth of possibilities which it is only just starting to exploit. Future versions are likely to offer much closer integration.

ResOrg.NET (the ResOrg add-in for Visual C++ . NET) has - with the exception of the lack of an "Add-In" tab in the Options dialog - exactly the same capabilities as the Visual C++ 5.0/6.0 version of ResOrg. It does however add one additional facility - a "Tool Window" which shows a summary of the properties of a selected resource symbol file:

Click to see a larger image

From the tool window you can quickly see whether a symbol file has ID conflicts or if its "Next Symbol" values are in use...and view/modify it's properties, Open the main ResOrg.NET user interface to do more in-depth editing, or even launch the Symbol Renumbering Wizard.

 

A Word of Warning

Please exercise caution when renumbering symbols using ResOrg. Under certain circumstances doing so can cause problems, which is the last thing we want to happen.

The issues we're aware of are:

  • If you have a dialog template which contains a bitmap resource, the Visual C++ Resource Editor stores the ID of the bitmap as a literal value, rather than an ID. Changing the value of the bitmap's ID will break this association, and you will have to re-enter the ID in the dialog editor or the bitmap will not be displayed.

  • The icon shown by the Windows shell for an application is that with the lowest ID. If you renumber the icons this may no longer be the case, and the wrong icon may be shown.

  • Visual C++ will not automatically rebuild implementation files as a result of resource symbol changes, since doing so would cause all dependent files (and there could be a lot of them) to be rebuilt every time a resource symbol was added or changed.

    Unfortunately, when you renumber symbols this is exactly what you want to happen - if you don't rebuild the right files, all sorts of strange behaviour can result! If in doubt, clean the affected projects before attempting to rebuild them.

    MFC Technical Note TN035: Using Multiple Resource Files and Header Files with Visual C++ discusses this subject.

Since ResOrg allows you to specify which symbols you want to renumber (and how to do it), you can exclude symbols which are likely to cause problems if their values are changed from the renumbering process.

A good version control system is invaluable here, since it provides a quick way to review (and throw away if necessary) any changes made. If you haven't got access to one, please back up your resource and resource symbol files before attempting to renumber symbols.

Ultimately, we hope to add the capability to read/write resource files directly. Once this is in place, ResOrg will be able to circumvent some of these issues.

 

Limitations

  • Since the Symbol Renumbering Wizard is implemented using the Wizard97 style, it does not display correctly on Windows 95 systems (having said that, it works fine).

  • Unicode is not yet supported (this is more down to the fact that I haven't got around to it than anything else...).

  • The source code does not support Visual C++ 5.0 (is mainly because of the use of CPropertySheetEx and CPropertyPageEx in the NGLibrary module)

  • After the ResOrg app has been used to configure Visual C++ 5.0 or 6.0 to load the add-in, multiple toolbars may be visible in the Visual Studio IDE if a previous version was installed. Unloading the add-in and reloading it through Visual Studio cures the problem.

  • If you have a dialog template which contains a bitmap resource, the Visual C++ Resource Editor stores the ID of the bitmap as a literal value, rather than an ID. Changing the value of the bitmap's ID will break this association, and you will have to re-enter the ID in the dialog editor or the bitmap will not be displayed.

  • The icon shown by the Windows shell for an application is that with the lowest ID. If you renumber the icons this may no longer be the case, and the wrong icon may be shown.

  • Visual C++ will not automatically rebuild implementation files as a result of resource symbol changes, since doing so would cause all dependent files (and there could be a lot of them) to be rebuilt every time a resource symbol was added or changed.

    Unfortunately, when you renumber symbols this is exactly what you want to happen - if you don't rebuild the right files, all sorts of strange behaviour can result! If in doubt, clean the affected projects before attempting to rebuild them.

    MFC Technical Note TN035: Using Multiple Resource Files and Header Files with Visual C++ discusses this subject.