Re: RichEdit style to center text automatically?
- Posted by "Greg Haberek" <g.haberek at comcast.net> Oct 22, 2003
- 429 views
Here are some functions I wrote myself: (Derek, why not add these to Win32Lib?) include win32lib.ew global procedure setTextAlign( integer id, atom align ) -- align may be: PFA_LEFT, PFA_RIGHT or PFA_CENTER atom ptr ptr = allocate( SIZEOF_PARAFORMAT ) store( ptr, PARAFORMAT_cbSize, SIZEOF_PARAFORMAT ) store( ptr, PARAFORMAT_dwMask, PFM_ALIGNMENT ) store( ptr, PARAFORMAT_wAlignment, align ) VOID = sendMessage( id, EM_SETPARAFORMAT, 0, ptr ) free( ptr ) end procedure global function getTextAlign( integer id ) atom ptr, align ptr = allocate( SIZEOF_PARAFORMAT ) store( ptr, PARAFORMAT_cbSize, SIZEOF_PARAFORMAT ) store( ptr, PARAFORMAT_dwMask, PFM_ALIGNMENT ) VOID = sendMessage( id, EM_GETPARAFORMAT, 0, ptr ) align = fetch( ptr, PARAFORMAT_wAlignment ) free( ptr ) return align end function ----- Original Message ----- From: "Jonas Temple" <jtemple at yhti.net> To: <EUforum at topica.com> Sent: Wednesday, October 22, 2003 11:22 AM Subject: RichEdit style to center text automatically? > > > Does anyone know if it's possible to center text in a rich edit control > automatically (also adjusted when size of rich edit changes). > > I really thought there was something in Win32Lib to do this, but I can't > find it. Maybe I forgot...my age is catching up to me. I forgot to set > my morning alarm twice this week! > > Jonas > > > > TOPICA - Start your own email discussion group. FREE! > >