Using DrawThemeTextEx in C#?

限于喜欢 提交于 2019-12-13 05:06:54

问题


I am creating a label control which can be used on Aero Glass and I want the text to glow "the Vista way". There is a WinAPI function called 'DrawThemeTextEx' but I don't know how to use it and searching didn't give many results.

I found this message but it doesn't tell you much : http://www.codeproject.com/Messages/3273238/Text-on-Aero-Glass-that-has-Painted-Layer-how.aspx

Does anyone know how to use 'DrawThemeTextEx' in .NET ?


回答1:


Right, so what's missing from the code in that link is the import statements for some native functions he calls like IsCompositionEnabled and SelectObject etc along with some constants etc.

The easiest way to find them is by looking them up on Platform Invoke

for instance the VistaApi.IsCompositionEnabled() stated there is just wrapping that native call.

insface C# Transparent GUI provides all of the code in c#.

Cheers, Phyx



来源:https://stackoverflow.com/questions/2298819/using-drawthemetextex-in-c

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