Desktop Functions: Smart Device Functions:
|
LogFont (Structures)
C# Signature:
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)] VB .NET Signature:
TODO User-Defined Types:None. Notes:See this MSDN reference: Default Marshaling for Strings Tips & Tricks:Please add some! Sample Code:Please add some! Alternative Managed API:The .NET Framework class Font, has a method, Font::FromLogfont that takes an Object reference as it's method parameter. You must define a managed LOGFONT class using the same format as the C# signature above. When using the StructLayout attribute on the class definition, you must set the CharSet property to Auto (the default is Ansi, which will not work correctly). The only difficulty encountered is passing the string value (the designated Font Face Name) to the FromLogfont method; apparently, this must have the attribute: [MarshalAs(UnmanagedType::ByValTStr)] enum value for the method to work correctly. Then, when instantiating a new Font in your managed application, you must cast the LOGFONT class (with appropriate member values assigned) to a System::Object for the function to work without generating a runtime exception. Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed. |
|