Extensions Reference

Extensions Reference > exDialogs


dlgFontDialogGetSize

int dlgFontDialogGetSize();

 

Retrieves the size of the selected font

The DLGFONTDIALOGGETSIZE function returns the font size 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 size 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());
}