Article View: comp.windows.ms
Article #11536Re: Bitmaps on Buttons
From: Paul Bonneau
Date: Wed, 08 May 1991 16:29
Date: Wed, 08 May 1991 16:29
30 lines
1576 bytes
1576 bytes
In article <5105@servax0.essex.ac.uk> whisd@essex.ac.uk (Whiteside S D B) writes: >Can anyone suggest an easy way to get Bitmaps onto buttons, like the WhiteWater resource kit does? > >Petzold writes his own button but it would have do to its own flashing etc.. > >Is there any way of putting a bitmap on the standard windows buttons? > >Thanks! > Use the BS_OWNERDRAW style for the button (in the dialog template if it's in a dialog, or as an argument to CreateWindow(ex) if not). Then be prepared to handle the following messages to paint the button: BN_PAINT BN_HILITE BN_UNHILITE Unfortunately, these messages are missing from Chapter 6 of "Reference - Volume 1". If I remember correctly, BN_PAINT means perform an entire paint of the button, BN_HILITE is sent while the button is being depressed, and BN_UNHILITE after is has been released. I think wParam contains the hdc to paint into, but you should verify this (use the debugger and set a breakpoint of the parent's windowproc to take a look at the parameters). cheers - Paul Bonneau.
Technical Details
Message-ID:
<1991May8.162952.11780@hyper.hyper.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneauReferences:
<randy.672557353@s.ms.uky.edu> <1991Apr28.235508.29300@massey.ac.nz> <5105@servax0.essex.ac.uk>Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.ms,comp.sys.ibm.pc.misc,comp.windows.ms.programmer Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau From: bonneau@hyper.hyper.com (Paul Bonneau) Subject: Re: Bitmaps on Buttons Message-ID: <1991May8.162952.11780@hyper.hyper.com> Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,) Organization: HyperCube Inc. References: <randy.672557353@s.ms.uky.edu> <1991Apr28.235508.29300@massey.ac.nz> <5105@servax0.essex.ac.uk> Date: Wed, 8 May 1991 16:29:52 GMT