Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
4 Views

HTMLHelp/ Multiple Resources

I am currently working on a large application that has hundreds of dialog, string, menu icons and bitmap resources all contained within a single .rc file. I am adding HtmlHelp to the application and wish to incorporate context help to dialogs and control throughout the program. Consequently if I add a new control to a dialog, for example, the resource.fd file is modified and this requires virtually the whole applicationto be rebuilt and this can take a long time (1-2 hours). Is there a way of creating a second resource file that is restricted to a single module. When I tried to add a second resource I got a warning message saying that only one resource can be included in the build process.

Ideally my separate resource will include a string table containing Help Text for context help pop-up messages. I don't want to have to build the fully application everytime a add a new string. Perhaps a DLL could work.

I have have also noticed that some of the parametric constants required for HtmlHelp are missing from the dfwin declarations. One of these is HH_HELP_CONTEXT. The documentation does not mention this either as I had to dig around the Net to find it (xeffort.com, thanks Jugoslav!).

I'd appreciate any help on this.
0 Kudos
2 Replies
Highlighted
New Contributor III
4 Views

Re: HTMLHelp/ Multiple Resources

In Compaq Visual Fortran, which I use, it is possible to create a resource-only DLL. I presume IVF will permit this also. You should then be able to access your strings using Windows API functions LoadResource, LoadString or LoadStringResource, etc from the DLL. You will still have to insert these commands into your application, which necessarily will require recompiling some of it and rebuilding the executable.

0 Kudos
Highlighted
Valued Contributor II
4 Views

Re: HTMLHelp/ Multiple Resources

Quoting - anthonyrichards
In Compaq Visual Fortran, which I use, it is possible to create a resource-only DLL. I presume IVF will permit this also. You should then be able to access your strings using Windows API functions LoadResource, LoadString or LoadStringResource, etc from the DLL. You will still have to insert these commands into your application, which necessarily will require recompiling some of it and rebuilding the executable.


To clarify: you can break your resources into [multiple] resource-only dlls, and it will (at least partly) provide modularization. However, you will still have to INCLUDE the resulting "resource.h" files (you will have to rename them, obviously) within the main project. Loading resources from those dlls is not too complicated; IFLOGM provides DlgModalWithResourceHandle, and all Windows resource APIs accept HMODULE as an argument.

Since the project is that big, you could perhaps consider moving the code which handles those resources into those dlls. That will indeed give you "proper" modularization, where each dll handles a chunk of functionality. If the initial application design is good enough, the transition should be relatively easy. If not, well...

For a quicker & simpler solution, you can take a look at this MSDN article; I must confess that I didn't think of this:

Visual C++ and the Resource Compiler support multiple .RC files in the same project through #include's of one .RC file within another. Multiple nesting is allowed. There are various reasons to split your project's resources into multiple .RC files:

*It is easier to manage a large number of resources among multiple project team members if you split the resources into multiple .RC files. If you use a source control management package for checking out files and checking in changes, splitting the resources into multiple .RC files will give you finer control over managing changes to resources.

0 Kudos