Technote PT 19 | April 1985 |
Since these owned resources are renumbered, your code will need to calculate the resource ID of any owned resource it uses. For example, if your desk accessory has an owned `DLOG' resource, and calls GetNewDialog with the ID you assigned to it originally, the Resource Manager will not find it. The solution is that every time your desk accessory references an owned resource, it must figure out (at execution time) the ID of the resource according to the current driver resource ID.
When the Font/DA Mover renumbers, it does its best to keep resources pointing to each other properly. This means that it tries to renumber resource IDs embedded in other resources as well as the resources themselves. For example, the reference to a `DITL' within a `DLOG' or `ALRT' resource gets changed automatically. Font/DA Mover knows about the standard embedded resource IDs in most of the standard resources, but if you define your own, the Font/DA Mover won't be able to renumber them for you. The embedded resource IDs which the Font/DA Mover knows about are listed below.
Note that certain resources can never be owned, because their resource IDs are restricted to a certain range. One such example is a WDEF. Since the ID of a WDEF is specified along with a four bit variation code, the range of WDEF IDs that can be used is 0-16363. Since none of this falls within the owned resource ID range, WDEFs cannot be owned. For the same reason, MDEFs, CDEFs, and MBDFs can't be owned either.
As a rule of thumb, before you ship a desk accessory, move it to a disk with another desk accessory of the same ID. This will cause the Font/DA Mover to renumber your desk accessory. If the moved copy doesn't work, then there is probably something wrong with the way you are handling your owned resources.
These are all true for Font/DA Mover 3.3 and newer:
* references to `DITL' resources in `DLOG'/`ALRT' resources
* references to `ICON', `PICT', `CTRL' in `DITL' resources
* references to `MENU' resources inside the resources themselves (menuID field)
* references to `MENU' resources in `MBAR' resources
Anything not on this list has to be fixed by the desk accessory.
Before Font/DA Mover, desk accessories could have an ID in the range 12 to 31. Now, and in the future, desk accessories can only have IDs in the range 12 to 26, because Font/DA Mover will only assign numbers in this range. Numbers 27 thru 31 are reserved.
Further Reference: