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

Developer

Forums

Forums:

Please help me for --
I used following code for loading image
IImage * pImage;
int16 rid =3;
IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);
pImage = ISHELL_LoadResImage(pMe->a.m_pIShell, BREWNEWAPP_RES_FILE, rid);
if(pImage)
{
IIMAGE_Draw(pImage, 0, 0);
IIMAGE_Release(pImage);
}
IDISPLAY_Update(pMe->a.m_pIDisplay);

But it shows pImage NULL. Image is not loaded..

san wrote:
IImage * pImage;
int16 rid =3;
pImage = ISHELL_LoadResImage(pMe->a.m_pIShell, BREWNEWAPP_RES_FILE, rid);
if(pImage)
{
IIMAGE_Draw(pImage, 0, 0);
IIMAGE_Release(pImage);
}
IDISPLAY_Update(pMe->a.m_pIDisplay);
I hope you have given the correct resource file name and the ID of which the image has to be loaded.

san wrote:
IImage * pImage;
int16 rid =3;
pImage = ISHELL_LoadResImage(pMe->a.m_pIShell, BREWNEWAPP_RES_FILE, rid);
if(pImage)
{
IIMAGE_Draw(pImage, 0, 0);
IIMAGE_Release(pImage);
}
IDISPLAY_Update(pMe->a.m_pIDisplay);
I hope you have given the correct resource file name and the ID of which the image has to be loaded.

akshay1384 wrote:I hope you have given the correct resource file name and the ID of which the image has to be loaded.
HI Akshay ,
I have given correct file name...but not sure id..I have id in res.h for image is 5001,
how to get that rid..
Is any problem for recourse editor version ..I have used it 2.0.1.for loading image..

akshay1384 wrote:I hope you have given the correct resource file name and the ID of which the image has to be loaded.
HI Akshay ,
I have given correct file name...but not sure id..I have id in res.h for image is 5001,
how to get that rid..
Is any problem for recourse editor version ..I have used it 2.0.1.for loading image..

san wrote:HI Akshay ,
I have given correct file name...but not sure id..I have id in res.h for image is 5001,
how to get that rid..
Is any problem for recourse editor version ..I have used it 2.0.1.for loading image..
Well then here lies your error....give in the last parameter of LoadResImage - 5001 or the name that you gave that image. Ex ID_SPLASH, IMG_SPLASH (this is just an example - give the name that is in your resourse file).
This will solve your problem.

san wrote:HI Akshay ,
I have given correct file name...but not sure id..I have id in res.h for image is 5001,
how to get that rid..
Is any problem for recourse editor version ..I have used it 2.0.1.for loading image..
Well then here lies your error....give in the last parameter of LoadResImage - 5001 or the name that you gave that image. Ex ID_SPLASH, IMG_SPLASH (this is just an example - give the name that is in your resourse file).
This will solve your problem.

akshay1384 wrote:Well then here lies your error....give in the last parameter of LoadResImage - 5001 or the name that you gave that image. Ex ID_SPLASH, IMG_SPLASH (this is just an example - give the name that is in your resourse file).
This will solve your problem.
Thanks alot!!!!!!!!!!!!!!!!!!!!
I solved that problem to give the name of image ..
But i want to load the image as per the res id how i get the res ID??

akshay1384 wrote:Well then here lies your error....give in the last parameter of LoadResImage - 5001 or the name that you gave that image. Ex ID_SPLASH, IMG_SPLASH (this is just an example - give the name that is in your resourse file).
This will solve your problem.
Thanks alot!!!!!!!!!!!!!!!!!!!!
I solved that problem to give the name of image ..
But i want to load the image as per the res id how i get the res ID??

san wrote:Thanks alot!!!!!!!!!!!!!!!!!!!!
I solved that problem to give the name of image ..
But i want to load the image as per the res id how i get the res ID??
Resource id is the ID that you gave in the resource file.
Open Resource file(abcd.brx) - Go to Object tab on the left side (here you must have loaded the image), check the name of the Resource that you loaded here.
That's it!!!!

san wrote:Thanks alot!!!!!!!!!!!!!!!!!!!!
I solved that problem to give the name of image ..
But i want to load the image as per the res id how i get the res ID??
Resource id is the ID that you gave in the resource file.
Open Resource file(abcd.brx) - Go to Object tab on the left side (here you must have loaded the image), check the name of the Resource that you loaded here.
That's it!!!!

san wrote:
But i want to load the image as per the res id how i get the res ID??
Hi,
you can get the resource id from your resource file or just open your resourcefile.brh file and check the #define value for your image name (object name)
eg.
#define IDI_SPLASHIMAGE1 5002
Hope this will help you :)

san wrote:
But i want to load the image as per the res id how i get the res ID??
Hi,
you can get the resource id from your resource file or just open your resourcefile.brh file and check the #define value for your image name (object name)
eg.
#define IDI_SPLASHIMAGE1 5002
Hope this will help you :)

akshay1384 wrote:Resource id is the ID that you gave in the resource file.
Open Resource file(abcd.brx) - Go to Object tab on the left side (here you must have loaded the image), check the name of the Resource that you loaded here.
That's it!!!!
Thank's akshay.....

akshay1384 wrote:Resource id is the ID that you gave in the resource file.
Open Resource file(abcd.brx) - Go to Object tab on the left side (here you must have loaded the image), check the name of the Resource that you loaded here.
That's it!!!!
Thank's akshay.....