Syntax
| DlgSetFont(SuppValue, hWndDlgItem, hFont)
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Description
| Apply the previously created font to the specified dialog item.
This instruction/function must be called directly or indirectly from a dialogfunc.
| ||||||||
See Also
| |||||||||
Example
| Dim hFont As Long
Sub Main
Begin Dialog UserDialog 400,203,"FontTest",.userFunction ' %GRID:10,7,1,1
Text 30,14,100,35,"Text1",.Text1
TextBox 150,14,110,35,.TextBox1
OKButton 90,70,90,21
End Dialog
Dim dlg As UserDialog
hFont = DlgCreateFont("FixedSys")
Dialog dlg
DlgDeleteFont hFont
End Sub
Private Function userFunction(DlgItem$, Action%, SuppValue&) As Boolean
Select Case Action%
Case 1 ' Dialog box initialization
DlgSetFont SuppValue, DlgControlId("Text1"), hFont
Case 2 ' Value changing or button pressed
Case 3 ' TextBox or ComboBox text changed
Case 4 ' Focus changed
Case 5 ' Idle
Case 6 ' Function key
End Select
End Function
|