Solved

Using CPalette in Modeless Dialog Box

Posted on 2001-07-23
3
309 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
Comment Utility
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
Comment Utility
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
Comment Utility
Per recommendation comment force/accepted by

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
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 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.

772 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

10 Experts available now in Live!

Get 1:1 Help Now