BOOL UpdateResource(
HANDLE hUpdate, // update-file handle
LPCTSTR lpType, // resource type
LPCTSTR lpName, // resource name
WORD wLanguage, // language identifier
LPVOID lpData, // resource data
DWORD cbData // length of resource data
);
What format should the resource data pointed to by lpData be in?
Apparently this is a completely bizzare thing to want to do, as the
Microsoft docs give no clue, as far as I can see. (The page on
resource file formats gives details on pretty much everything except
bitmaps.)
Thanks for reading
Buster
May be it is a little outdated information but it seems
explain BMP resource:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/msdn_hierlist.asp
http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b67883
Vladimir.
Thank you! I'll check it out.
Thanks Vlad. Your link contained the very useful
"NOTE: The BITMAPFILEHEADER structure is NOT present in the packed
DIB; however, it is present in a DIB read from disk".
Combining this with (from "Bitmap Storage" in the Platform SDK docs:
not in the index, and ranked 20th in a search for "bitmap storage"):
"Bitmaps should be saved in a file that uses the established bitmap
file format and assigned a name with the three-character .bmp
extension. The established bitmap file format consists of a
BITMAPFILEHEADER structure followed by a BITMAPINFOHEADER,
BITMAPV4HEADER, or BITMAPV5HEADER structure. An array of RGBQUAD
structures (also called a color table) follows the bitmap information
header structure. The color table is followed by a second array of
indexes into the color table (the actual bitmap data)."
and (for example, from the description of the lbHatch field in the
LOGPALLETE struct)
"A packed DIB consists of a BITMAPINFO structure immediately followed
by the array of bytes that define the pixels of the bitmap.",
as soon as I guessed that an RT_BITMAP resource is just a packed DIB I
was away. Literally hours of fun, and all thanks to MS!
Buster