Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FontDialog

Status
Not open for further replies.

lokper

Programmer
Apr 14, 2010
6
0
0
MX
I try used fontdialog for read the name font selected but clarion display the next error:

"Syntaxis error: No Matching prototype avaible"

Code:

IF FONTDIALOG('Choose Font',Typeface,FontSize,FontColor,FontStyle)
SETFONT(0,Typeface,FontSize,FontColor,FontStyle) !Set window font
ELSE
SETFONT(0,'Arial',12) !Set default font
END


Why display error?
Thank's
 
Hi!

Instead of 0 use the window name i.e.

SETFONT(Window, ...

Regards
 
I comment the follow lines:

IF FONTDIALOG('Choose Font',Typeface,FontSize,FontColor,FontStyle)
!SETFONT(0,Typeface,FontSize,FontColor,FontStyle) !Set window font
!ELSE
!SETFONT(0,'Arial',12) !Set default font
END

The error is the same.
"Syntaxis error: No Matching prototype avaible"

I have Clarion 6.3.
Thank's
 
Hi!

If you look at the prototype in BuiltIns.clw ::

Code:
SETFONT(WINDOW,<STRING>, SIGNED=0, LONG=COLOR:None, UNSIGNED=-1, BYTE=CHARSET:Default),NAME('Cla$SETFONTEX')

it requires the ::

TypeFace to be STRING
FontSize to be SIGNED or LONG
FontColor to be LONG
FontStyle to UNSIGNED or LONG

Is it defined as such?

Regards


 
Thank's ShankarJ.

I need read the true type font of windows system and i need set a string with this font.

I try use the fontdialog for display the dialog of fonts of windows system but i get the error before showed.

How can i do this?

Sorry my english is bad...
 
Hi!

I do not know what your problem is but the following works on my computer ::

Data Section ::

Code:
MyFontName                    STRING(30)
MyFontSize                    USHORT
MyFontColor                   LONG
MyFontStyle                   USHORT

Code Section ::

Code:
IF FONTDIALOG('Choose your Preferred Font', MyFontName, MyFontSize, MyFontColor, MyFontStyle)
  DISPLAY
END

Regards
 
I going to try it...

Regards and thank's.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top