SetFontName method


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

Prototype

SetFontName Proto hWnd:HWND, lpszFontName:LPSTR

Syntax

Invoke SetFontName, hWnd, lpszFontName

Function

Sets the font name for an object.

Parameters

hWnd

Handle to the object.

lpszFontName

Pointer to the effective address of a null-terminated string with the new font name.

Return value

Eax returns TRUE if succesful, or FALSE if not.


REMARKS: The SetFontName method expects lpszFontName to be a Unicode string if the application is running as Unicode, or an ANSI string if not (see the IsAppUnicode method). You can call SetFontNameA to set an ANSI font name in Unicode applications, or SetFontNameW to set a Unicode font name in ANSI applications.