Desktop Functions: Smart Device Functions:
|
Search Results for "ChooseFont" in [All]comdlg321: ChooseFont
[DllImport("comdlg32.dll", CharSet = CharSet.Auto, EntryPoint = "ChooseFont", SetLastError=true)]
public extern static bool ChooseFont(IntPtr lpcf);
Declare Function ChooseFont Lib "comdlg32.dll" (TODO) As TODO
public struct CHOOSEFONT
public enum CHOOSEFONTFLAGS
CHOOSEFONT choosefont = new CHOOSEFONT();
choosefont.lStructSize = Marshal.SizeOf(choosefont);
choosefont.nSizeMin = 64;
choosefont.nSizeMax = 64;
choosefont.Flags = (int)CHOOSEFONTFLAGS.CF_SCREENFONTS
| (int)CHOOSEFONTFLAGS.CF_FORCEFONTEXIST
| (int)CHOOSEFONTFLAGS.CF_INACTIVEFONTS
| (int)CHOOSEFONTFLAGS.CF_INITTOLOGFONTSTRUCT
| (int)CHOOSEFONTFLAGS.CF_SCALABLEONLY
| (int)CHOOSEFONTFLAGS.CF_USESTYLE;
choosefont.lpLogFont = pLogfont;
IntPtr pChoosefont = Marshal.AllocHGlobal(Marshal.SizeOf(choosefont));
Marshal.StructureToPtr(choosefont, pChoosefont, false);
bool result = ChooseFont(pChoosefont);
Marshal.FreeHGlobal(pChoosefont); |