Xref: utzoo comp.windows.ms:12399 comp.sys.ibm.pc.misc:9419 comp.windows.ms.programmer:2316 Newsgroups: comp.windows.ms,comp.sys.ibm.pc.misc,comp.windows.ms.programmer Path: 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: <1991Apr28.235508.29300@massey.ac.nz> <5105@servax0.essex.ac.uk> Date: Wed, 8 May 1991 16:29:52 GMT 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.