217 const unsigned char *pal = _pal;
218 LOGPALETTE *pLogPal = ( LOGPALETTE * ) &
s_ipal;
229 for (
i = 0;
i < 256;
i++, pal += 4 )
231 colors[
i].rgbRed = pal[0];
232 colors[
i].rgbGreen = pal[1];
233 colors[
i].rgbBlue = pal[2];
234 colors[
i].rgbReserved = 0;
237 colors[0].rgbRed = 0;
238 colors[0].rgbGreen = 0;
239 colors[0].rgbBlue = 0;
241 colors[255].rgbRed = 0xff;
242 colors[255].rgbGreen = 0xff;
243 colors[255].rgbBlue = 0xff;
260 if ( SetSystemPaletteUse( hDC, SYSPAL_NOSTATIC ) == SYSPAL_ERROR )
278 pLogPal->palVersion = 0x300;
279 pLogPal->palNumEntries = 256;
281 for (
i = 0, pal = _pal;
i < 256;
i++, pal += 4 )
283 pLogPal->palPalEntry[
i].peRed = pal[0];
284 pLogPal->palPalEntry[
i].peGreen = pal[1];
285 pLogPal->palPalEntry[
i].peBlue = pal[2];
286 pLogPal->palPalEntry[
i].peFlags = PC_RESERVED | PC_NOCOLLAPSE;
288 pLogPal->palPalEntry[0].peRed = 0;
289 pLogPal->palPalEntry[0].peGreen = 0;
290 pLogPal->palPalEntry[0].peBlue = 0;
291 pLogPal->palPalEntry[0].peFlags = 0;
292 pLogPal->palPalEntry[255].peRed = 0xff;
293 pLogPal->palPalEntry[255].peGreen = 0xff;
294 pLogPal->palPalEntry[255].peBlue = 0xff;
295 pLogPal->palPalEntry[255].peFlags = 0;
310 if ( ( ret = RealizePalette( hDC ) ) != pLogPal->palNumEntries )