问题
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