[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Using CPalette in Modeless Dialog Box

Posted on 2001-07-23
3
Medium Priority
?
319 Views
Last Modified: 2012-06-27
I am trying to display some bitmaps in a modeless dialog box.  I only have 256 colors to work with.  Everything works fine, except when I switch to a different app that has an uncompatable palette.  I have it so that my main window works correctly all the time (I am displaying bitmaps in it as well).  Does anyone know of some sample code for updating the palette for a modeless dialog box or have any suggestion beside getting a better video card.  I have already looked at the DIBLook example, this was how I got my main app window to work correctly. Help, please.
0
Comment
Question by:jhurley
3 Comments
 
LVL 5

Accepted Solution

by:
FengYuan earned 800 total points
ID: 6311052
Basically, you have to handle palette changing messages properly. But these messages are only passed to top-level window.

If your dialog box is not top-level window, either you program your top-level window to pass the message to it; or you pass the palette handle to the top-level window, which handles palette changing message.

You can simply use the halftone palette in the top-level window.

www.fengyuan.com
0
 
LVL 11

Expert Comment

by:griessh
ID: 6833132
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to accept "FengYuan" comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points.
The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6853130
Per recommendation comment force/accepted by

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

872 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