Hi,
I think yes. For some reason I could not make "Wingdings" working, but maybe I am just too tired
Try this working sample for Courier and Arial Black:
uses "UI"
DIM hDlg AS DWORD
dim Msg, wparam,lparam as dword
DIALOG NEW 0, "Sample dialog with multiple fonts", -1, -1, 150, 100, _
%WS_DLGFRAME OR %DS_CENTER OR %WS_CAPTION OR %WS_SYSMENU OR %WS_OVERLAPPEDWINDOW, _
0 TO hDlg
' Two test labels
CONTROL ADD LABEL, hDlg, 1001,"Courier", 5, 5, 150, 20
CONTROL ADD LABEL, hDlg, 1002,"Arial Black", 5,25, 150, 20
' This way of handle declaration assures automatic resource deletion on end of program
DIM hFont1 AS DWORD resource = Font_Create("Courier New", 9)
DIM hFont2 AS DWORD resource = Font_Create("Arial Black", 12)
' Useful messages for setting the font
CONTROL SEND hDlg, 1001, %WM_SETFONT, hFont1, 0
CONTROL SEND hDlg, 1002, %WM_SETFONT, hFont2, 0
DIALOG SHOW modeless hDlg
while isWindow(hDlg)
Msg = GetMessage(hDlg, wParam, lParam)
select case Msg
CASE %WM_SYSCOMMAND
SELECT CASE wParam
CASE %SC_CLOSE
EXIT WHILE
END SELECT
END SELECT
wend
DIALOG END hDlg
Bye,
Petr
Bookmarks