How do you draw a Taskbar button using visual styles?

好久不见. 提交于 2019-12-06 15:44:58

问题


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?


回答1:


I know this topic is old but,...:

http://msdn.microsoft.com/en-us/library/system.windows.forms.visualstyles.visualstyleelement.taskband.flashbuttongroupmenu.aspx




回答2:


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.



来源:https://stackoverflow.com/questions/260386/how-do-you-draw-a-taskbar-button-using-visual-styles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!