FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Richedit enhancement
Posts: 30
Joined: Fri Oct 07, 2005 06:58 AM
Richedit enhancement
Posted: Tue Jun 10, 2008 05:15 PM

Hi Antonio,
are you thinking about implementing "PARAFORMAT" indenting in richedit control ?

Ciao
Gianni

Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Richedit enhancement
Posted: Wed Jun 11, 2008 07:38 AM

Gianni,

the structure PARAFORMAT is already supported, see method ::SetParaFormat ()

kind regards

Stefan
Posts: 30
Joined: Fri Oct 07, 2005 06:58 AM
Richedit enhancement
Posted: Wed Jun 11, 2008 07:50 AM

Stefan,

where is ::SetParaFormat () method?
I cannot found it in my Trichedi.prg
My version is FWH 8.05

Regards

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Richedit enhancement
Posted: Wed Jun 11, 2008 02:21 PM
Gianni,

Here you have an example of its use in Class TRichEdit:
METHOD SetAlign( nAlign ) CLASS TRichEdit

   DEFAULT nAlign := PFA_LEFT

   RESetParaFormat( ::hWnd, nAlign )

   ::Change()

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 30
Joined: Fri Oct 07, 2005 06:58 AM
Richedit enhancement
Posted: Wed Jun 11, 2008 03:12 PM
Thanks Antonio, but I already know this.
I'm not talking about "align" support, but "indenting" support; so I can implement a ruler like "WordPad".
At this time there is no support for "paraformat" member in bold:
typedef struct _paraformat {
UINT cbSize;
DWORD dwMask;
WORD wNumbering;
WORD wReserved;
LONG dxStartIndent;
LONG dxRightIndent;
LONG dxOffset;

WORD wAlignment;
SHORT cTabCount;
LONG rgxTabs[MAX_TAB_STOPS];

} PARAFORMAT;


Another question:
If I open, for example, fiveodbc.rtf included in folder samples, all grids are wrong. Have you this problem too?
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Richedit enhancement
Posted: Thu Jun 12, 2008 07:52 AM
Gianni wrote:Stefan,

where is ::SetParaFormat () method?
I cannot found it in my Trichedi.prg


Oops, should be ReSetParaFormat () as Antonbio said. Sorry.
kind regards

Stefan
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Richedit enhancement
Posted: Thu Jun 12, 2008 08:52 AM
Gianni,

Grids seem ok here:


You can easily modify RESETPARAFORMAT() to support those struct members:
HB_FUNC( RESETPARAFORMAT )
{
   PARAFORMAT pf;

   memset( ( char * ) &pf, 0, sizeof( pf ) );

   pf.cbSize = sizeof( pf );
   pf.dwMask = PFM_ALIGNMENT;
   pf.wAlignment |= hb_parnl( 2 );

   hb_retl( SendMessage( ( HWND ) hb_parnl( 1 ), EM_SETPARAFORMAT, 0,
                         ( LPARAM ) &pf ) );
}
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 30
Joined: Fri Oct 07, 2005 06:58 AM
Richedit enhancement
Posted: Thu Jun 12, 2008 10:03 AM
Antonio Linares wrote:Gianni,

Grids seem ok here:


this seems ok, but if you go a little forward (about half rtf) you can see another grid, with longer text inside, that don't resize its height to contain all text. Compare it opening same rtf with WordPad


Antonio Linares wrote:You can easily modify RESETPARAFORMAT() to support those struct members:
HB_FUNC( RESETPARAFORMAT )
{
   PARAFORMAT pf;

   memset( ( char * ) &pf, 0, sizeof( pf ) );

   pf.cbSize = sizeof( pf );
   pf.dwMask = PFM_ALIGNMENT;
   pf.wAlignment |= hb_parnl( 2 );

   hb_retl( SendMessage( ( HWND ) hb_parnl( 1 ), EM_SETPARAFORMAT, 0,
                         ( LPARAM ) &pf ) );
}

Thanks.
So, are you not implementing anything about this in near future?

Regards
Gianni
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Richedit enhancement
Posted: Thu Jun 12, 2008 10:30 AM

Gianni,

We are going to provide new enhancements for Class TRichEdit, and we will probably implement this too :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 30
Joined: Fri Oct 07, 2005 06:58 AM
Richedit enhancement
Posted: Thu Jun 12, 2008 11:32 AM

Great!!!
I will waiting for it.

Many thanks
Ciao
Gianni

Continue the discussion