Solved

Using CPalette in Modeless Dialog Box

Posted on 2001-07-23
3
314 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 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

733 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