XPRINT Question

Started by RhodyRich, March 02, 2009, 06:29:45 PM

Previous topic - Next topic

RhodyRich

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

Jose Roca

If you are going to use XPRINT then use FONT NEW to create the font.

RhodyRich

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?

Jose Roca

Correct. The new compilers have increased the great divide between SDK programmers and the ones that prefer to use PB proprietary built-in statements.