Hi Antonio,
are you thinking about implementing "PARAFORMAT" indenting in richedit control ?
Ciao
Gianni
METHOD SetAlign( nAlign ) CLASS TRichEdit
DEFAULT nAlign := PFA_LEFT
RESetParaFormat( ::hWnd, nAlign )
::Change()
return nil
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;
Gianni wrote:Stefan,
where is ::SetParaFormat () method?
I cannot found it in my Trichedi.prg
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 ) );
}
Antonio Linares wrote:You can easily modify RESETPARAFORMAT() to support those struct members:
- Code: Select all Expand view
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 ) );
}
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 55 guests