Richedit( ) function problems
- TimStone
- Posts: 2963
- Joined: Fri Oct 07, 2005 1:45 pm
- Location: Trabuco Canyon, CA USA
- Has thanked: 25 times
- Been thanked: 2 times
- Contact:
Re: Richedit( ) function problems
So if I want to use the PRINTER class, what control would I use to send the output ?
Will it display properly in the Preview of a print document ?
What are the RichText controls for a resource file ?
Thank you.
Will it display properly in the Preview of a print document ?
What are the RichText controls for a resource file ?
Thank you.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
- Antonio Linares
- Site Admin
- Posts: 42655
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 67 times
- Been thanked: 96 times
- Contact:
Re: Richedit( ) function problems
Tim,
For your third question, please review FWH\samples\testrich.rc
For your third question, please review FWH\samples\testrich.rc
- Antonio Linares
- Site Admin
- Posts: 42655
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 67 times
- Been thanked: 96 times
- Contact:
Re: Richedit( ) function problems
Tim,
In FWH\samples\testrtf.prg function PrintBox( lPreview ) you have an example to preview or print a richedit
In FWH\samples\testrtf.prg function PrintBox( lPreview ) you have an example to preview or print a richedit
Code: Select all | Expand
static function PrintBox( lPreview ) local oPrn local aRTF := { 100, 1000 } // { nFrom, nTop } DEFAULT lPreview := .f. if lPreview PRINT oPrn NAME "FWH RICHEDIT FILE" PREVIEW else PRINT oPrn NAME "FWH RICHEDIT FILE" endif if Empty( oPrn:hDC ) MsgStop( "Printer not ready!" ) return nil endif PAGE CursorWait() oPrn:Box( aRTF[ 2 ], 500, aRTF[ 2 ] + 1000, 1500 ) aRTF := REPrintBox( oRTF:hWnd, If( lPreview, oPrn:hDCOut, oPrn:hDC ), ; oRTF:IsSelection(), ; aRTF[ 2 ] + 10, 510, 1490, aRTF[ 2 ] + 990, aRTF[ 1 ] ) oPrn:Box( aRTF[ 2 ], 500, aRTF[ 2 ] + 1000, 1500 ) aRTF := REPrintBox( oRTF:hWnd, If( lPreview, oPrn:hDCOut, oPrn:hDC ), ; oRTF:IsSelection(), ; aRTF[ 2 ] + 10, 510, 1490, aRTF[ 2 ] + 990, aRTF[ 1 ] ) oPrn:Box( aRTF[ 2 ], 500, aRTF[ 2 ] + 1000, 1500 ) aRTF := REPrintBox( oRTF:hWnd, If( lPreview, oPrn:hDCOut, oPrn:hDC ), ; oRTF:IsSelection(), ; aRTF[ 2 ] + 10, 510, 1490, aRTF[ 2 ] + 990, aRTF[ 1 ] ) CursorArrow() ENDPAGE ENDPRINTreturn nil
- Silvio.Falconi
- Posts: 7187
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 9 times
Re: Richedit( ) function problems
Antonio,
How I can make to show with Lines dotted the margins of Rtf document on rPreview ?
Good can be the possibility to drag and drop this lines and move the margins directly on rpreview
Regards
How I can make to show with Lines dotted the margins of Rtf document on rPreview ?
Good can be the possibility to drag and drop this lines and move the margins directly on rpreview
Regards
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Antonio Linares
- Site Admin
- Posts: 42655
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 67 times
- Been thanked: 96 times
- Contact:
Re: Richedit( ) function problems
Silvio,
The preview uses metafiles. We can't interact with them.
A complete new preview engine would have to be built
The preview uses metafiles. We can't interact with them.
A complete new preview engine would have to be built
- TimStone
- Posts: 2963
- Joined: Fri Oct 07, 2005 1:45 pm
- Location: Trabuco Canyon, CA USA
- Has thanked: 25 times
- Been thanked: 2 times
- Contact:
Re: Richedit( ) function problems
Thank you. I will work with this. It is an enhancement so I don't need to have it working today.
Is there documentation somewhere that explains using RTF. I've looked at those samples, but I like to understand how something works and samples don't always explain that.
Tim
Is there documentation somewhere that explains using RTF. I've looked at those samples, but I like to understand how something works and samples don't always explain that.
Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
- Antonio Linares
- Site Admin
- Posts: 42655
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 67 times
- Been thanked: 96 times
- Contact:
Re: Richedit( ) function problems
Tim,
FWH RichEdit is just a wrapper (more or less) to Windows RichEdit:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb787873(v=vs.85).aspx
FWH RichEdit is just a wrapper (more or less) to Windows RichEdit:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb787873(v=vs.85).aspx
- Silvio.Falconi
- Posts: 7187
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 9 times
Re: Richedit( ) function problems
Antonio Linares wrote:Silvio,
The preview uses metafiles. We can't interact with them.
A complete new preview engine would have to be built
Antonio,
I think it can be made adding commands to Tmetafile class
When I tried to make Vrd I used a class Tpaper it was Tmetafile with mousemove commands and then there was Items as lines and boxes
I not remember where I put the sources...
On Informes.prg (C5ide.zop) we can found :
CLASS TRptItem
CLASS TRptLineItem FROM TRptItem
CLASS TSoporte or Tbanda is as tmetafile class
perhaps we have all
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Antonio Linares
- Site Admin
- Posts: 42655
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 67 times
- Been thanked: 96 times
- Contact:
Re: Richedit( ) function problems
> there was Items as lines and boxes
on top of it ?
Or do you mean modifying the metafile at runtime ?
on top of it ?
Or do you mean modifying the metafile at runtime ?
- Silvio.Falconi
- Posts: 7187
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 9 times
Re: Richedit( ) function problems
I cannot search my source because I cannot open my pcPortable I'm waiting new power supply from Usa from 20days ( I'm usinf the pc at work
)
but I saw on delphi it make a line and with the mouse move this line and move the margins
but you say it is impossible ok

but I saw on delphi it make a line and with the mouse move this line and move the margins
but you say it is impossible ok
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Antonio Linares
- Site Admin
- Posts: 42655
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 67 times
- Been thanked: 96 times
- Contact:
- Silvio.Falconi
- Posts: 7187
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 9 times
Re: Richedit( ) function problems
ok
but for a sample ...MyRpt use TPreview() class ( this class use hmetafile)
and u can insert a box into and move it ....with the mouse ...
I think it can be insert two vertical lines and two horizontal line to set the margins
but for a sample ...MyRpt use TPreview() class ( this class use hmetafile)
and u can insert a box into and move it ....with the mouse ...
I think it can be insert two vertical lines and two horizontal line to set the margins
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- cnavarro
- Posts: 6572
- Joined: Wed Feb 15, 2012 8:25 pm
- Location: España
- Has thanked: 4 times
- Been thanked: 6 times
Re: Richedit( ) function problems
TimStone wrote:So if I want to use the PRINTER class, what control would I use to send the output ?
Will it display properly in the Preview of a print document ?
What are the RichText controls for a resource file ?
Thank you.
If you wants to create a report with the contents of the memo field with rich text, look at this example
Download Exe, prg, and database file in
https://bitbucket.org/fivetech/fivewin- ... eprich.zip

Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces