Solved

Getting 256 Color HPALLET

Posted on 2000-04-12
3
211 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

860 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