PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: RhodyRich on March 02, 2009, 06:29:45 PM

Title: XPRINT Question
Post by: RhodyRich on March 02, 2009, 06:29:45 PM
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
Title: Re: XPRINT Question
Post by: Jose Roca on March 02, 2009, 06:42:11 PM
If you are going to use XPRINT then use FONT NEW to create the font.
Title: Re: XPRINT Question
Post by: RhodyRich on March 02, 2009, 06:59:50 PM
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?
Title: Re: XPRINT Question
Post by: Jose Roca on March 02, 2009, 07:38:55 PM
Correct. The new compilers have increased the great divide between SDK programmers and the ones that prefer to use PB proprietary built-in statements.