by MdaSolution » Fri Apr 23, 2010 7:53 am
I use
oApp:oFont
where oFont is a data of TApplication class ( Main Window)
and on each dialog I use Dialog .... FONT oApp:oFont
on menu main I use
MENU
MENUITEM oItem[68] PROMPT "&Normal " ACTION Set_FontWin(1,oItem[68],oItem[69])
MENUITEM oItem[69] PROMPT "Ne&grita" ACTION Set_FontWin(2,oItem[68],oItem[69])
ENDMENU
STAT FUNC Set_FontWin(n,oItem1,oItem2)
LOCAL cIni:=GetWinDir()+"\"+cNSys+".Ini", hFont, lFWnd
hFont:=IF(n=1,"Normal","Bold")
WritePProstring(cNSys,"hFont",hFont,cIni)
lFWnd:=IF(n=1,.T.,.F.)
IF n=1
DEFINE FONT hFont NAME "MS Sans Serif" SIZE 0,-10
ELSE
DEFINE FONT hFont NAME "MS Sans Serif" SIZE 0,-10 BOLD
ENDIF
SET FONT OF oWnd TO hFont
oItem1:SetCheck(lFWnd)
oItem2:SetCheck(!lFWnd)
RETURN (NIL)
and save all fonts into Ini file
FWH .. BC582.. xharbour