From the win32.hlp:

When displaying a DIB or a DDB created from a DIB on a palette device, you can improve the speed at which the image is drawn by arranging the logical palette to match the layout of the system palette. To do this, call GetDeviceCaps with the NUMRESERVED value to get the number of reserved colors in the system. Then call GetSystemPaletteEntries and fill in the first and last NUMRESERVED/2 entries of the logical palette with the corresponding system colors.

What do they mean by NUMRESERVED/2

Whats the /2 mean? Meaning 2 entries or divide by 2?
Posted on 2002-09-08 15:47:35 by IwasTitan

From the win32.hlp:
Then call GetSystemPaletteEntries and fill in the first and last NUMRESERVED/2 entries of the logical palette with the corresponding system colors.


First Half of NUMRESERVED/2 + Second Half of NUMRESERVED/2 = NUMRESERVED

This is how im reading it anyways ;)

In short it says "Get the system colors, and use them as your palette"

Enjoy
:alright:
NaN
Posted on 2002-09-08 18:59:20 by NaN