[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Getting 256 Color HPALLET

Posted on 2000-04-12
3
Medium Priority
?
217 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 219 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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…
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.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

649 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