Importing resource files (all project type)

Available through the File->Import resource-definition file menu.

Easy Code can import resource-definition files (scripts), that is, text files with extension .RC. The resource keywords accepted by the IDE are the following:

ACCELERATORS An accelerator table
BITMAP A file containing a bitmap
DIALOG A dialog box
DIALOGEX An extended dialog box
ICON A file containing an icon
MENU A menu definition
RCDATA A binary data definition (raw data)
RT_FILEDATA A file containing binary data (Easy Code defined)
STRINGTABLE A string table
CURSOR A file containing a cursor
VERSIONINFO A version definition

All other resource types will be ignored. The .RC file must match the resource compiler syntax, that is, it must compile without errors in order to be properly imported. With this new option, you can define all your resources in the IDE (recommended) and importing those belonging to old projects from its corresponding .RC file. Doing so, you will able to easily convert all your assembly projects to Easy Code.

It is recommended the Resource editor to be empty (no resources created) when importing a resource-definition file, so that the imported resources do not conflict with existing ones, even though Easy Code performs some checking (see REMARKS). In order to keep imported resources as much unchanged as possible, the IDC_STATIC, IDOK and IDCANCEL IDentifiers for child controls (-1, 1 and 2 respectively) always remain unchanged, even though multiple controls have one of these ID's. This can cause problems in visual projects as they use the control name or ID for several operations (i.e. to name the window procedure), so it is highly recommended to change all matching ID's to any other name.

IMPORTANT: As said before, visual projects have their own dialog boxes: the DialogBox object. So, when importing .RC files in visual projects, dialog boxes will be imported as DialogBox objects and the dialog class (if any) will be ignored. On the other hand, and in order to avoid problems, if two or more of the imported controls have the same ID, change all the necessary names until each control has a unique ID.

REMARKS: While importing .RC files, the imported resource ID's are compared with existing ones. If any of them matches (except for the ones said before), it is renamed and listed in the importing window list. The only exception is for the ID's of accelerator tables, which remain unchanged as they refer to menu items.