Solved

Getting 256 Color HPALLET

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand data scrubbing tool 13 32
matchUp  challenge 9 94
Thin secure Windows 10 5 76
Bartender label printing - switch on and off graphics 3 17
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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…
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

863 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

24 Experts available now in Live!

Get 1:1 Help Now