looking for Richedit enhancement

looking for Richedit enhancement

Postby StefanHaupt » Fri Jun 15, 2007 9:27 am

Hi all,

for a new project i need some additional functions for the richedit class. These are to subscript / superscript a char and to to insert numbers and bullets.

I don´t speak C, so i can´t code them myself.

I would be happy, if anyone wants to share these functions.

Many thanks

kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby StefanHaupt » Fri Jun 15, 2007 2:58 pm

I tried the following method, but it does not work

Code: Select all  Expand view
#define CFE_SUBSCRIPT      0x00010000     /* Superscript and subscript are */
#define CFE_SUPERSCRIPT    0x00020000     /*  mutually exclusive         */

#define CFM_SUBSCRIPT      CFE_SUBSCRIPT + CFE_SUPERSCRIPT
#define CFM_SUPERSCRIPT    CFM_SUBSCRIPT

//----------------------------------------------------------------------------//

METHOD SetAttribute2( lBold, lItalic, lUnderline, lStrikeOut, lSub, lSup, lOnOff ) CLASS TRichEdit

   local nMask, nEffects

   DEFAULT lBold      := .f., ;
           lItalic    := .f., ;
           lUnderline := .f., ;
           lStrikeOut := .f., ;
           lSub       := .f.,;
           lSup       := .f.,;
           lOnOff     := .t.

   nMask := nOR( If( lBold, CFM_BOLD, 0 ), If( lItalic, CFM_ITALIC, 0 ), ;
                 If( lUnderline, CFM_UNDERLINE, 0 ), ;
                 If( lStrikeOut, CFM_STRIKEOUT, 0 ),;
                 If( lSub, CFM_SUBSCRIPT,0),;
                 If( lSup, CFM_SUPERSCRIPT,0) )

   nEffects := nOR( If( lBold, CFE_BOLD, 0 ), If( lItalic, CFE_ITALIC, 0 ), ;
                    If( lUnderline, CFE_UNDERLINE, 0 ), ;
                    If( lStrikeOut, CFE_STRIKEOUT, 0 ),;
                    If( lSub, CFE_SUBSCRIPT,0),;
                    If( lSup, CFE_SUPERSCRIPT,0) )

   RESetAttribute( ::hWnd, nMask, nEffects, lOnOff )

   ::Change()

return nil


Any hints ?

Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby StefanHaupt » Wed Jun 27, 2007 8:41 pm

Nobody ? :(
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 45 guests