To install the extended objects, you have to call the RsrcXtype() function. There are two case :
RsrcXtype( 1, NULL, 0);This call installs the extended objects,
First case : external ressource
#include <windom.h> #include "myrsc.h" void main(void) { ApplInit(); /* WinDom version of rsrc_load() */ RsrcLoad( "myrsc.rsc"); /* Extended type are installed : */ RsrcXtype( 1, /* Install the new types */ NULL, /* Work on the external ressource */ 0); /* idem */ /* body of program */ /* End of program */ /* Uninstall the extended objects */ RsrcXtype( 0, NULL, 0); /* Free up the memory and AES */ RsrcFree(); ApplExit(); }Second case : integrated ressource
#include <windom.h> #include "myrsc.h" #include "myrsc.rh" #include "myrsc.rsh" void main( void) { int dum; XRSRCFIX fix; /* Used by RsrcFixCicon() and * RsrcFreeCicon() */ ApplInit(); /* Fixe the oject coordinate to the screen resolution */ for( dum=0; dum<NUM_OBS; dum++) rsrc_obfix( rs_object, dum); /* Install the extended objects */ RsrcXtype( 1, /* Install */ rs_trindex, /* address of tree objects */ NUM_TREE); /* Number of tree objects */ /* Note : you can use simultaneously severals intern ressources and an extern ressource */ /* If the ressource contains color icons, fix it to * the current screen resolution */ RsrcFixCicon( rs_object, /* address of objects */ NUM_OBS, /* number of objects */ NUM_CIB, /* number of color icons */ NULL, /* an optional color palet */ &fix); /* Used later by RsrcFreeCicon() */ /* body of program */ /* Free up memory used by the color icons */ RsrcFreeCicon( &fix); /* Free zup memory and AES */ RsrcXtype( 0, rs_trindex, NUM_TREE); ApplExit(); }