I have finished the custom button control and it seems to be working OK. I have attached a working demo that also has the documentation on how to use it at the top of the file.
It is now a library module with source provided and I need some feedback on how the control performs on different systems. I have built it to work on win95b upwards.
I am not sure if the DrawEdge function is optimum for the button appearance. It works OK but I could replace it with a function from the MASM32 library that does this type of framing with more control.
Any feedback will be welcome as I am going to put this control in the MASM32 library when I am satisfied with it.
Regards,
hutch@movsd.com
It is now a library module with source provided and I need some feedback on how the control performs on different systems. I have built it to work on win95b upwards.
I am not sure if the DrawEdge function is optimum for the button appearance. It works OK but I could replace it with a function from the MASM32 library that does this type of framing with more control.
Any feedback will be welcome as I am going to put this control in the MASM32 library when I am satisfied with it.
Regards,
hutch@movsd.com
The buttons work fine on Win98 SE.
Looks good on Win2k sp2 !
This is how it looks on WinXP with skins on. As you can see, it even keeps the custom button borders :)
Edit: The fuzzy text is just because I have ClearType enabled and JPEG compression doesn't seem to like that... on my screen it looked perfectly sharp.
Edit: The fuzzy text is just because I have ClearType enabled and JPEG compression doesn't seem to like that... on my screen it looked perfectly sharp.
works on win98se :) but it has a bug :(
NEMO,
Thanks for the bug report but the buttons being visible through the status bar is normal, it happens with the normal toolbar buttons as well.
Regards,
hutch@movsd.com
Thanks for the bug report but the buttons being visible through the status bar is normal, it happens with the normal toolbar buttons as well.
Regards,
hutch@movsd.com
NT 4.0 WS SP 4.
Works OK.
Works OK.
ooh, i didn't know that, thanx.
That's excellent hutch. :) Can't wait to see the code. Thanks for posting that other example (the one for Sudeer) as well.
I DID post the code. :) Its in the LIB directory that is created off the directory that has the example.
hutch@movsd.com
hutch@movsd.com
:grin:
Thanks hutch. You know me.....always looking for an opportunity to prove my ignorance. heheh (I was immensely tired when I looked at the example last night.)
Thanks hutch. You know me.....always looking for an opportunity to prove my ignorance. heheh (I was immensely tired when I looked at the example last night.)
Works fine in XP.
Did you subclass the system button catching the WM_PAINT messages, or did you reinvent the wheel for this one?
Did you subclass the system button catching the WM_PAINT messages, or did you reinvent the wheel for this one?
Iblis,
If you have a look at the code for it, its a completely new control that creates its own window and handles its own messages.
You have a lot more control that way and don't have to worry about defeating system default behaviour.
At least it sounds like it is working OK on a range of different systems.
Regards,
hutch@movsd.com
If you have a look at the code for it, its a completely new control that creates its own window and handles its own messages.
You have a lot more control that way and don't have to worry about defeating system default behaviour.
At least it sounds like it is working OK on a range of different systems.
Regards,
hutch@movsd.com
Yeah I have a bad habit of not looking at others' code, especially when I see a bazillion source files - call it laziness or just call it avoiding confusion. ;)
I've never really had any trouble with the system buttons. As long as I get a BN_CLICKED notification I'm happy :D
Nevertheless, good job on the custom button! I admire your patience and tenacity for creating it. I'm much too lazy to ever code my own controls. :x
I've never really had any trouble with the system buttons. As long as I get a BN_CLICKED notification I'm happy :D
Nevertheless, good job on the custom button! I admire your patience and tenacity for creating it. I'm much too lazy to ever code my own controls. :x
It works properly in 98se and looks very pretty!
Mike
Mike