The Borland and Microsoft resource file formats differ in two important ways:
The Microsoft format does not support these features. See Resource Compiler in the MSDN Library for the details of the Microsoft resource file syntax.
A key difference between the Borland and Microsoft resource script (RC) formats is that the Borland format allows bitmaps, cursors and icons to be embedded within the file, encoded as a hexadecimal stream, whereas in the Microsoft format the script references external files in which the bitmaps must reside.
For example, an icon may be in-lined in a Borland resource script as follows:
IDI_TUTORIAL ICON
{
'00 00 01 00 01 00 20 20 10 00 00 00 00 00 E8 02'
'00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
...
'00 FF FF 80 01 FF FF C0 03 FF FF E0 07 FF FF F8'
'1F FF FF FF FF FF FF FF FF FF FF FF FF FF'
}
The same icon will be represented by an external reference in the Microsoft format:
IDI_TUTORIAL ICON "tutorial.ico"
A function for extracting in-lined bitmaps from Borland RC files is incorporated in OWLMaker. For more information see the OWLMaker documentation.
RCConvertor is a command-line tool written by Boris Vidolov that performs bitmap extraction. This command tool has been superseded by the built-in function in OWLMaker, hence we now recommend that OWLMaker is used for resource file conversion.
Another difference in the Borland and Microsoft formats, and the one that may demand most work to convert, is that the Microsoft resource format does not allow an arithmetic expression as the identifier for a resource. For example, the following ID definition will not work:
#define IDD_MYDIALOG (IDD_BASE + 1)
IDD_MYDIALOG DIALOG ...
BEGIN
...
END
The resource ID needs to be converted to either a number or a string. For example,
#define IDD_MYDIALOG 1001
IDD_MYDIALOG DIALOG ...
BEGIN
...
END
Note that this does not apply to control or string identifiers within a resource (IDC_*; IDS_*). Here an arithmetic expression is allowed. For example, this works fine:
#define IDC_INPUT (IDC_BASE + 1)
IDD_MYDIALOG DIALOG ...
BEGIN
EDITTEXT IDC_INPUT, ...
...
END
#define IDS_PROMPT (IDS_BASE + 1)
STRINGTABLE
BEGIN
IDS_PROMPT "Hello"
END
Discussion: Which editor for gui design
Wiki: Knowledge_Base
Wiki: Migrating_from_BC_to_VC
Wiki: OWLMaker
Wiki: OWLMaker_3175
Wiki: Supported_Compilers
Wiki: Upgrading_from_OWL