?
Solved

Using CPalette in Modeless Dialog Box

Posted on 2001-07-23
3
Medium Priority
?
316 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
[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
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

764 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