Page 1 of 1

Richedit

Posted: Fri Oct 20, 2006 4:24 pm
by Frank Demont
Hello,

Code: Select all


nFrom := oRtf:Printbox(If( oPrn:lMeta , oPrn:hDCOut, oPrn:hDC ) , Rij*Rijstap , LeftMarge, nWidth - 100 , (Rij + 1)*Rijstap , nFrom) //4590


METHOD PrintBox( hDC, nTop, nLeft, nRight, nBottom, nFrom ) CLASS TRichEdit

   DEFAULT nFrom := 0

   if hDC != 0
      nFrom := REPrintBox( ::hWnd, hDC, ::IsSelection(), ;
                           nTop, nLeft, nRight, nBottom, nFrom )
   endif

return nFrom
When this method is called , a array is returned.

Something changed in 2.8 ?????

I have code that works in 2.7 , not anymore in 2.8

Posted: Sat Oct 21, 2006 1:12 pm
by Frank Demont
I have tested testrtf-file ,

static function PrintBox( lPreview )

...................................................

oPrn:Box( 1000, 500, 2500, 3000 )

? REPrintBox( oRTF:hWnd, If( lPreview, oPrn:hDCOut, oPrn:hDC ), ;
oRTF:IsSelection(), 1020, 510, 2990, 2490 )



With fwh2.7 : returns 399

With fw2.8 : returns array ,{ 399 , 2424,17 }

It seems that the first element is nFrom , the second ????

Where is this change documented ???????????

It is impossible for us after a upgrade from fw to test ALL modules from a big fw-aplication. Onfurtunately , this error was found by the custumer

Frank

This behaviour make all programs which used the nfrom clause from reprintbox

Posted: Sat Oct 21, 2006 6:32 pm
by reinaldocrespo
Frank;

It is better now. Now the function also returns the exact place in the page where it finished printing in pixels. This was a very much needed feature. Suppose you are printing a series of rtfs. How do you know where in the current page the last rtf finished printing so you know where to start printing the next? That's exactly what comes back on the 2nd element that reprintbox returns ({ nFrom, nBottom }).

I think the feature was document on what's new.

I'm currently using it with very much success. I hope my comment helps.

Reinaldo.

Posted: Sat Oct 21, 2006 6:51 pm
by Antonio Linares
Frank,

We try to keep backwards compatibility as much as possible. Sometimes a change is required and usually we report it in whatsnew.txt