简体   繁体   中英

How do you draw a Taskbar button using visual styles?

I've created a DeskBand toolbar and I want to display a button on the toolbar that has the style visual style as a taskbar button.

In .NET you can use the VisualStyleRenderer to render the Taskbar BACKGROUND, but there's way to render a button.

Are there any Win32 API's I can use to draw the button using Visual Styles rather than emulating the look of the button via drawing paths or images?

So far, I have only been able to find a solution that reportedly works on Vista according to the forum discussion linked. It would seem that the UxTheme.dll for XP does not support the retrieval of subclasses, which is what you require to reliably obtain the TaskBand button visual style elements for the current theme, it would appear.

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