Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Hi,

I need help creating a resource file (for an Image) and am unable to extract it from the available tutorials:https://developer.brewmp.com/resources/tech-guides/programming-model/bre...It doesn't mention how to make the resource header files and what to add in them. Neither which one to use .car or .bar.I'd appreciate if someone can explicitly describe how to draw an Image (from the start, i.e. from the creation of the pImage Object) with the help of an example.Many Thanks-Zeshan-

Creating resource file (CAR/BAR):
1. Start Resource Manager from Brew MP SDK/Tools installation
2. Select File->New resource file (.car)
3. Add resources using Insert menu. To add image, select Insert->New Object and fill details like ID, Name, Source, Filename if source is file.
4. Save file (will be saved as CAR)
5. Compile (Build->Compile) CAR to generate BAR/.H files.
 
Using resources (loading image from BAR and drawing it):
IResFile *piResFile = NULL;
IImage *pImg = NULL;

ISHELL_CreateInstance(me->piShell, AEECLSID_ResFile, (void**)&piResFile);
IResFile_Open(piResFile , CMENU_RES_FILE);

IResFile_GetObject(piResFile, (uint32)nResId, AEECLSID_VIEW, (void**)&pImg);
IImage_Draw(pImg , x, y);
IDISPLAY_Update(pDisplay);

Creating resource file (CAR/BAR):
1. Start Resource Manager from Brew MP SDK/Tools installation
2. Select File->New resource file (.car)
3. Add resources using Insert menu. To add image, select Insert->New Object and fill details like ID, Name, Source, Filename if source is file.
4. Save file (will be saved as CAR)
5. Compile (Build->Compile) CAR to generate BAR/.H files.
 
Using resources (loading image from BAR and drawing it):
IResFile *piResFile = NULL;
IImage *pImg = NULL;

ISHELL_CreateInstance(me->piShell, AEECLSID_ResFile, (void**)&piResFile);
IResFile_Open(piResFile , CMENU_RES_FILE);

IResFile_GetObject(piResFile, (uint32)nResId, AEECLSID_VIEW, (void**)&pImg);
IImage_Draw(pImg , x, y);
IDISPLAY_Update(pDisplay);