Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!news.cs.indiana.edu!maytag!csg.uwaterloo.ca!markb From: markb@csg.uwaterloo.ca (Mark Brezina) Newsgroups: comp.windows.ms.programmer Subject: Reading System Palette Message-ID: <1991Jun4.154955.16447@maytag.waterloo.edu> Date: 4 Jun 91 15:49:55 GMT Article-I.D.: maytag.1991Jun4.154955.16447 Sender: news@maytag.waterloo.edu (News Owner) Organization: University of Waterloo Lines: 17 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?