PDA

View Full Version : Problem loading all images from the resource file


bkhe1
07-03-2002, 09:40 PM
Hi,
I try to load and draw 5 images from the resource file but for some reason it draw only 3 images. Any clue why this could be happening.

#define MAX_IMAGE 5


int ids[] = {
IDI_IMAGE1;
IDI_IMAGE2;
IDI_IMAGE3;
IDI_IMAGE4;
IDI_IMAGE5;
};

// load the image from the resource file
for(i=0; i<MAX_IMAGE;i++){

pMe->m_pImages[i] = ISHELL_LoadResImage(pMe->a.m_pIShell,szResFile,ids[i]);
if(pMe->m_pImages[i] ==NULL)
{
return FALSE;
}

}

//Draw the images
for(i=0;i<MAX_IMAGE;i++)
{
ypos = 20 + i*AVATAR_IMGHGT + 2;
IIMAGE_Draw(pMe->m_pImages[i],0,ypos);

}


cheers,
Bhavna

arunbangari
07-05-2002, 06:17 AM
Hi,
Just check if imges are being drawn out of the screen. I dunno the image height that you have used. I see in your code, you are manipulating the y cordinate of image to be drawn using - ypos = 20 + i*AVATAR_IMGHGT + 2; May be the ypos is exceeding 120?

Regards
Arun Bangari