Antonio /Everyone;
Hi.
Does the method GetLineFromChar( nChar ) on the richtext class returns the position of the given nchar in centemeters or inches or what?
It does not seem to be working properly. Does anybody know?
Best,
Reinaldo.
Richtext
- reinaldocrespo
- Posts: 918
- Joined: Thu Nov 17, 2005 5:49 pm
- Location: Fort Lauderdale, FL
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Richtext
From the MSDN:
EMGThis message returns the zero-based index of the line.
- reinaldocrespo
- Posts: 918
- Joined: Thu Nov 17, 2005 5:49 pm
- Location: Fort Lauderdale, FL
Enrico;
Then what I need is to find out where on the page did that last line printed vertically. This is so that I can go on printing other stuff on the next line after that.
So if I print with:
Then with:
I know the last line from the richtext that printed. But how can I find out where in inches or centemeters on the page did it print?
RC.
Then what I need is to find out where on the page did that last line printed vertically. This is so that I can go on printing other stuff on the next line after that.
So if I print with:
Code: Select all
nFrom := REPrintBox( oRtf:hWnd, ::oPrn:hDCOut, .t., nTop, nLeft, nBottom, nRight, nFrom )
Code: Select all
oRtf:GetLineFromChar( nFrom )
RC.
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- reinaldocrespo
- Posts: 918
- Joined: Thu Nov 17, 2005 5:49 pm
- Location: Fort Lauderdale, FL
Enrico;
I sort of have a solution:
Where nTmp is the line index into the richtext that printed at the first line of the page.
It seems to be working...
RC.
I sort of have a solution:
Code: Select all
::nLastLine := ( ( aoRtf[i]:GetLineFromChar( nFrom ) - nTmp ) * ::oprn:Pix2Inch( aortf[i]:oFont:nHEIGHT, 0 )[1] ) + nTOPOffset
::nlastline += 0.32 //couple of blank lines
It seems to be working...
RC.