When I execute the following code, the font is changed properly in the RichEdit control but the XPRINT CHR SIZE funtion returns the same values for CW and CH all the time. Why is that?
FontSize = I
IF hFont THEN DELETEOBJECT hFont
hFont = FF_MAKEFONTEX("Courier New", FontSize, 0, 0, 0, 0)
FF_CONTROL_SETFONT HWND_REPORTSFORM_RICHEDIT1, hFont
XPRINT ATTACH DEFAULT
XPRINT SET FONT hFont
XPRINT CHR SIZE TO CW, CH
If you are going to use XPRINT then use FONT NEW to create the font.
Okay. That works for the XPRINT function but now the RichEdit font is not set correctly. So I assume I need to create separate fonts for XPRINT and for the RichEdit control. Correct?
Correct. The new compilers have increased the great divide between SDK programmers and the ones that prefer to use PB proprietary built-in statements.