Firstly I want mention that I have already read all articles on SO on subject, but still have no answer for my question. Also my question slightly different than others.
Today a I have a look on Skype window. There is one extra button on it's title bar. But this button acts as native system button. Just look on glowing, it spreads out of the window. So I have the reasonable question. According to that we can see on the picture below, there is standard way to add extra button on title bar. But all answers on subj leads to hooking of WM_NCPAINT
event and manual drawing of extra button. This approach is work but it could not yield such beautifull glowing as on the picture.
Does anybody knows the way to add standartized button on window's title bar?
Thanks in advance!
Title bars contain at least three small buttons that minimize, maximize or restore, and close the window associated with the title bar. Title bars also contain a context-sensitive Help button.
Adjusting the Title bar Text SizeClick the Cortana button on the taskbar and enter Control Panel in the search box to open it. Then click Display to open the options shown below. There you can customize the font sizes in Windows. Click the drop-down menu on the left and select Title bars.
The Control Menu button is the icon (picture) at the far left end of the title bar. The Control Menu button opens a menu that you can use to control the window. The Close button is at the far right end of the title bar.
In Vista and Windows 7 there is a new thing called the Desktop Window Manager. This is used to draw the "Aero glass" window titlebars, and do the glow effects. The old Windows XP approach of implementing WM_NCPAINT handlers doesn't work with this new system, so you have to use a whole new API.
I'm sure I've seen some articles on doing what you're asking about, but can't find them right now. Some pages that might give you some leads are:
http://msdn.microsoft.com/en-us/magazine/cc163435.aspx
http://msdn.microsoft.com/en-us/library/aa969540(v=VS.85).aspx
http://delphihaven.wordpress.com/2010/04/19/setting-up-a-custom-titlebar/
Yes, this can be (and undoubtedly is) done by hooking WM_NCPAINT and painting their button in response to it. The "glowing" is just a matter of picking the appropriate color and shading (and possibly doing a bit of alpha blending to have some "glow" show up close to the button).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With