LoadImage (newbie)
-
I have the structrue [code] struct Card{ char szFileName[MAX_PATH]; BYTE *lpImage; Cards CardType; };[/code] an array of this structure will store 52 images representing different cards. at the begining of my program i need to load all the images, and this is my effort for loading an image: [code] HBITMAP hbm = LoadImage(0, (LPCTSTR)"img.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE);[/code] hbm is of type HBITMAP, so how can i get it into the structure where theimage type is of BYTE? cheers
-
I have the structrue [code] struct Card{ char szFileName[MAX_PATH]; BYTE *lpImage; Cards CardType; };[/code] an array of this structure will store 52 images representing different cards. at the begining of my program i need to load all the images, and this is my effort for loading an image: [code] HBITMAP hbm = LoadImage(0, (LPCTSTR)"img.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE);[/code] hbm is of type HBITMAP, so how can i get it into the structure where theimage type is of BYTE? cheers
-
in your structure, why don't you just replace BYTE* by HBITMAP* ?
TOXCCT >>> GEII power
[toxcct][VisualCalc]