GetFontName method

Available for all objects except Image, HScroll, VScroll, ToolBar, ProgressBar, Slider, UpDown and Animate.


GetFontName Proto hWnd:HWND, lpszBuffer:LPSTR


Invoke GetFontName, hWnd, lpszBuffer


Gets the font name (font face) for an object.



Handle to the object.


Pointer to a buffer to receive the font name for the object.

Return value

Eax returns the length, in characters, for the font name of the object./font>

REMARKS: The GetFontName method fills lpszBuffer with a Unicode string if the application is running as Unicode, or with an ANSI string if not (see the IsAppUnicode method). You can call GetFontNameA to get the font name in an ANSI string for Unicode applications, or GetFontNameW to get the font name in a Unicode string for ANSI applications.