I am loading all the images from a .RES file by ID number using:
At the moment I have the separate constant (NUM_RES_BMP ) defining the number bitmaps in the .RES.
Does anyone know how to get the number of files in a .RES file, so I can get rid of this separate constant?
OR
Do I have to resort to the alternative approach of reading the files in one at a time and catching the exception when there are no more files? (I don't like relying on exceptions as part of the normal program operation).
Many thanks
Bob
Code:
for I := 0 to NUM_RES_BMP - 1 do
FBmps[I].LoadFromResourceID(HInstance, I);
At the moment I have the separate constant (NUM_RES_BMP ) defining the number bitmaps in the .RES.
Does anyone know how to get the number of files in a .RES file, so I can get rid of this separate constant?
OR
Do I have to resort to the alternative approach of reading the files in one at a time and catching the exception when there are no more files? (I don't like relying on exceptions as part of the normal program operation).
Many thanks
Bob