June 22, 2024, 09:02:12 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Message Hooks

Started by Zen, January 05, 2006, 06:52:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zen

January 05, 2006, 06:52:09 AM Last Edit: January 05, 2006, 06:55:18 AM by Lewis
Hello. Ive had a look throught the Platform SDK about using hooks. Im not sure what type of hook i need and which messages i need to listen to...

Im trying to listen for when a button is created, destroyed, mouse over, mouse out. I have to use hooks rather than normal sub-classing. Does anyone know which type of hook and the message constants i need?

Thanks
Lewis

Edit: I want to be able to re-draw the button (background border etc)

Parker

If drawing the button is the only thing you want, override the OnDrawButton or whatever it's called, providing the ABS_OWNERDRAW flag when you create it. Then you'll have to handle all the nice wonderful stuff that windows gives you :). And all those messages can be listened for with subclassing, and possibly changes to the window's (button's) style.

Are you trying to make a nice XP-ish looking button ;)?

Zen

Well im trying to make it so that i can manipulate every button of a certain kind throughout my application without having to sub-class directly. i want to be able to call the function from a static lib to automaticly modify the buttons when they are created.

Lewis