to Antonio : set attribute of richedit

to Antonio : set attribute of richedit

Postby Silvio.Falconi » Mon Apr 25, 2016 5:32 pm

on forum there is also a message of stephan Haupt
viewtopic.php?f=3&t=7283&hilit=richedit

he asked the same I ask now
the possibility to subscript or superscript and change uppercase smallcase on trichedit class
haupt tried to make a modify on setattribute method but it not run
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


can you help me ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6783
Joined: Thu Oct 18, 2012 7:17 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 14 guests