简体   繁体   English

如何使用视觉样式绘制任务栏按钮?

[英]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. 我已经创建了DeskBand工具栏,并希望在工具栏上显示具有视觉风格的按钮作为任务栏按钮。

In .NET you can use the VisualStyleRenderer to render the Taskbar BACKGROUND, but there's way to render a button. 在.NET中,您可以使用VisualStyleRenderer渲染任务栏背景,但是可以渲染按钮。

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? 是否可以使用Win32 API使用视觉样式来绘制按钮,而不是通过绘制路径或图像来模拟按钮的外观?

So far, I have only been able to find a solution that reportedly works on Vista according to the forum discussion linked. 到目前为止,根据链接的论坛讨论,我只能找到一种据称可在Vista上运行的解决方案 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. 似乎XP的UxTheme.dll不支持子类的检索,这将是可靠地获取当前主题的TaskBand按钮视觉样式元素所需要的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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