18 PALETTEENTRY logpalettedata
[8];
23 { 0x10, 0x20, 0x30, PC_NOCOLLAPSE
},
24 { 0x20, 0x30, 0x40, PC_NOCOLLAPSE
},
25 { 0x30, 0x40, 0x50, PC_NOCOLLAPSE
},
26 { 0x40, 0x50, 0x60, PC_NOCOLLAPSE
},
27 { 0x50, 0x60, 0x70, PC_NOCOLLAPSE
},
28 { 0x60, 0x70, 0x80, PC_NOCOLLAPSE
},
29 { 0x70, 0x80, 0x90, PC_NOCOLLAPSE
},
30 { 0x80, 0x90, 0xA0, PC_NOCOLLAPSE
},
37 {{sizeof(BITMAPINFOHEADER
), 4, -4, 1, 32, BI_RGB
, 0, 1, 1, 0, 0}};
39 {{sizeof(BITMAPINFOHEADER
), 4, -4, 1, 4, BI_RGB
, 0, 1, 1, 0, 0}};
41 ghdcDIB32
= CreateCompatibleDC(0);
42 ghdcDIB4
= CreateCompatibleDC(0);
44 ghbmpDIB32
= CreateDIBSection(ghdcDIB32
, &bmi32
, DIB_PAL_COLORS
, (PVOID
*)&pulDIB32Bits
, 0, 0 );
45 if (!ghbmpDIB32
) return FALSE
;
47 ghbmpDIB4
= CreateDIBSection(ghdcDIB4
, &bmi4
, DIB_PAL_COLORS
, (PVOID
*)&pulDIB4Bits
, 0, 0 );
48 if (!ghbmpDIB32
) return FALSE
;
50 SelectObject(ghdcDIB32
, ghbmpDIB32
);
52 /* Initialize a logical palette */
53 ghpal
= CreatePalette((LOGPALETTE
*)&gpal
);
56 printf("failed to create a palette \n");