[comp.windows.ms.programmer] Reading System Palette

markb@csg.uwaterloo.ca (Mark Brezina) (06/04/91)

	Hi.  I'm trying to read the system palette as a series of RGB values.   But no entries are retrieved when I use the following piece of code:

	LPPALETTEENTRY	SystemPalette;
	PALETTEENTRY	LogPaletteEntries[256];
	HDC		hDC;
	int		nEntries;

	hDC = GetDC( hWnd );
	SystemPalette = LogPaletteEntries;
	nEntries = GetSystemPaletteEntries( hDC, 0, 16, (LPPALETTEENTRY) System
					    Palette );
	ReleaseDC( hWnd, hDC );


I'm using a 256 color VGA monitor and a 16 color screen.  Has anyone got this
function to work?