Dominic Gallagher recently pointed out that you can use a custom resource name, which works with most compilers. In your .rc file, you could have, for example:
dialogswxr WXRDATA dialogs.wxr menuswxr WXRDATA menus.wxr wgthermdwxr WXRDATA wgthermd.wxr wgthermmwxr WXRDATA wgthermm.wxr cddialogswxr WXRDATA cddialogs.wxr cdmenuswxr WXRDATA cdmenus.wxr sgwmwxr WXRDATA ..\sgwx\sgwm.wxr sgwbwxr WXRDATA ..\sgwx\sgwb.wxr
There is nothing extra one needs to do to have a "user defined" resource - any unexpected resource type string, in this case WXRDATA, is automatically user-defined.
To read in the resources, you need code such as the following:
static char* resources[] = { "dialogswxr", "menuswxr", "wgthermdwxr", "wgthermmwxr", "cddialogswxr", "cdmenuswxr", "sgwmwxr", "sgwbwxr" }; for (int i = 0; i < 8; i++) { char *res = wxLoadUserResource(resources[i], "WXRDATA"); if (!wxResourceParseString(res)) wxMessageBox("Could not parse resource."); }
And that's it!