Maybe you would like to look up the declaration of tagBITMAPFILEHEADER in wingdi.h, and pshpack2.h and poppack.h . Something is there!