Richedit

Post Reply
Frank Demont
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Richedit

Post 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
Frank Demont
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Post 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
User avatar
reinaldocrespo
Posts: 918
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Post 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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply