change a font on line

change a font on line

Postby Silvio.Falconi » Wed Feb 08, 2017 11:22 pm

I must change a font of a say on line

But I not Know How make it

I made a combo with all font

LOCAL hDC := GetDC( oWnd:hWnd )

aFonts := ASort( GetFontNames( hDC ) )

ReleaseDC( oWnd:hWnd, hDC )

@ .27, 1.8 COMBOBOX oFonts VAR cFont ITEMS aFonts ;
SIZE 170, 100 FONT oFont ;
MESSAGE "Changes the font of the selection" ;
OF oBar1

@ .38, 23.5 GET oSize VAR nSize OF oBar1 ;
FONT oFont SIZE 20, 19 ;
PICTURE "99" SPINNER MIN 6 MAX 99 ;
MESSAGE "Changes the font size of the selection"

oFonts:bChange := { || WndChild():SetFont( oFonts:varget() ), ;
WndChild():SetFocus() }


the WndChild() function return the oControl SAY active ( lactive) on dialog
it make error because not found hfont

how I can change the font ( cfontname and sizes ) of the say ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6768
Joined: Thu Oct 18, 2012 7:17 pm

Re: change a font on line

Postby Antonio Linares » Thu Feb 09, 2017 10:59 am

Silvio,

Please provide complete self contained PRGs as examples, not just portions of the code

so we can quickly copy and build them

thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: change a font on line

Postby ukoenig » Thu Feb 09, 2017 11:13 am

Antonio,

I think my tool, I created some times ago includes many solutions.
A fontselect can display the text on a window or say.
The fontstring can be saved / loaded to / from a dbf.
It doesn't matter if You load a font from a DBF, Combo or Fontselector.

Image

best regards
Uwe :?:
Last edited by ukoenig on Thu Feb 09, 2017 1:06 pm, edited 3 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: change a font on line

Postby Silvio.Falconi » Thu Feb 09, 2017 12:22 pm

perhaps it not is need for the moment , I found another solution ...seems
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6768
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Otto and 61 guests