whisd@sersun1.essex.ac.uk (Whiteside S D B) (05/07/91)
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!
cms2839@isc.rit.edu (a.stranger) (05/08/91)
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? > >Is there any way of putting a bitmap on the standard windows buttons? you use a button of class owner_draw , and you'll need to respond to messages about repainting and state changes . it's all documented . -- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ "Imagination keeps the shadows away - Xymox @ @~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@ @ a.stranger - CMS2839@ritvax.isc.rit.edu @
bonneau@hyper.hyper.com (Paul Bonneau) (05/08/91)
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.