|
-
November 19th, 2008, 08:56 AM
#1
Owner-draw button
I've just started out with owner-drawn buttons. When I create a owner-drawn button the button rectangle gets painted with the same color as a dialog's background.
I've successfully painted over this handling the WM_DRAWITEM message.
I'm trying to figure out where this dialog-color painting is coming from (e.g. during what message is the window painted) since I want to make use of transparency effects on my button and thus need the dialog-colored block removed.
For what is is worth, I've noticed that the normal push button also includes the dialog-colored "background" at its outer edges (please see attached image).
I know how to remove the dialog-colored background from a static image by handling WM_CTLCOLORSTATIC, but I'm a bit lost with this button.
Any ideas please?
Last edited by links; November 26th, 2008 at 07:01 AM.
-
November 19th, 2008, 12:31 PM
#2
Re: Owner-draw button
There are dozens of examples ou there of owner-drawn buttons and transparent background buttons. Look at http://www.codeguru.com/cpp/controls/buttonctrl/ for some solutions
Mike
-
November 19th, 2008, 02:28 PM
#3
Re: Owner-draw button
Thanks for the link. I've looked at the examples but most of them use MFC which I know nothing about and find it difficult to figure out exactly whats going on.
I've figured out that I need to handle the WM_CTLCOLORBTN message. Everything is not perfect yet, but it works better.
-
November 19th, 2008, 10:15 PM
#4
Re: Owner-draw button
See rather the dozens of MS samples in C in MSDN, PSDK, KB, etc
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|