Article View: comp.os.os2.programmer
Article #1791Overriding system colors (Using 256 distinct colors)
From: Peter Nielsen
Date: Sun, 08 Nov 1992 19:52
Date: Sun, 08 Nov 1992 19:52
24 lines
1379 bytes
1379 bytes
Subject: Using all colors in a 256-color palette (Overriding system colors) In OS/2 v1.3 I have used this code, which works well: GpiCreateLogColorTable (hpsMemory, LCOL_REALIZABLE, LCOLF_CONSECRGB, 0L, 256L, (PULONG)&pal[0]); GpiRealizeColorTable (hpsMemory); Since OS/2 v2.0 does not provide the GpiRealizeColorTable function I have tried to use the GpiCreatePalette function with the LCOL_OVERRIDE_DEFAULT_COLORS option. This option causes GpiCreatePalette to return the error message PMERR_INV_COLOR_OPTIONS. This is the v2.0 code: hpal = GpiCreatePalette (hab, LCOL_OVERRIDE_DEFAULT_COLORS, LCOLF_CONSECRGB, 256L, (PULONG)ppal); GpiSelectPalette (hpsMemory, hpal); WinRealizePalette (hwnd, hpsMemory, &numcol); What am I doing wrong ? I am grateful if someone could provide a solution to this problem. I use an XGA display adapter. Peter Nielsen EMAIL: pnielsen@ra.abo.fi
Technical Details
Message-ID:
<1992Nov8.195236.1537@abo.fi>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!aton.abo.fi!usenetShow Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!aton.abo.fi!usenet From: PNIELSEN@finabo.abo.fi (Peter Nielsen) Subject: Overriding system colors (Using 256 distinct colors) Message-ID: <1992Nov8.195236.1537@abo.fi> Sender: usenet@abo.fi (Usenet NEWS) Organization: Abo Akademi University, Finland Date: Sun, 8 Nov 1992 19:52:36 GMT X-News-Reader: VMS NEWS 1.23 Lines: 24