Extensions Reference

Extensions Reference > exDialogs


dlgFontDialogGetName

string dlgFontDialogGetName();

 

Retrieves the name of the selected font

The DLGFONTDIALOGGETNAME function returns the font name selected during the last call to dlgFontDialog, if the user clicked OK to dismiss the dialog. This function may only be called after dlgFontDialog has been successfully dismissed using the OK button.

You may use this function as a parameter directly inside the createfont language statement.

 

Parameters

None

 
 

Return Value

The name of the selected font.

 

Example Code

// Open the dialog with Arial 10pt non bold, italic selected
if(dlgFontDialog("Arial", 10, False, True) == True)
{
    // Use the new font selection in a createfont call
    createfont(MyFont, dlgFontDialogGetName(),
              
dlgFontDialogGetSize(), dlgFontDialogGetBold(),
               dlgFontDialogGetItalic());
}