简体   繁体   中英

How to add an extra button to the window title bar, so it will be work as standard?

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!
在此输入图像描述

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:

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM