Solved

Getting 256 Color HPALLET

Posted on 2000-04-12
3
205 Views
Last Modified: 2013-11-20
I use CreateDC( NULL ) -- The screen DC,
in order to get the HPALLET of the screen.
I use GetDeviceCaps to determine if the HDC supports HPALLET entries, but it doesnt.
Is there any problem with NT (4.0) or any settings that should be done to the DC in order to get that pallet?

Is there any other way to prepare a 256 color pallete? (Most preffered)

0
Comment
Question by:shaig
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 73 total points
ID: 2709252
It is most likely that your display setting is set to more than 256 colors, such as 16-bit, 24-bit. In these cases, there is no palette support. You may use the CPalette::CreateHalftonePalette
function to create a halftone palette.
0
 
LVL 3

Author Comment

by:shaig
ID: 2710755
Is there a way to create a pallete wit no device dependency?
0
 
LVL 23

Expert Comment

by:chensu
ID: 2712550
What do you mean? You can create a palette that contains any colors you want. Have a look at my article at CodeGuru.

Paint a gradient color background
http://www.codeguru.com/bitmap/gradient_palette.shtml
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now