Corrigido, porque faltava parêntesis e adicionados mais.
#include "hbclass.ch"
CREATE CLASS SCIClass
VAR hWnd INIT NIL
METHOD SendEditor( nMsg, nParam, xValue ) INLINE ;
iif( ValType( xValue ) == "C", ;
wapi_SendMessageString( hWnd, nMsg, hb_Default( nParam, 0 ), xValue ), ;
wapi_SendMessage( hWnd, nMsg, hb_Default( nParam, 0 ), hb_Default( nParam, 0 ), xValue ) )
METHOD SendEditor( nMsg, nParam, xValue )
IF ValType( xValue) == "C"
xReturn := wapi_SendMessageString( ::hWnd, nMsg, nParam, xValue )
ELSE
xReturn := wapi_SendMesage( ::hWnd, nMsg, nParam, xValue )
ENDIF
RETURN xReturn
METHOD AddText( nLen, cText ) INLINE ::SendEditor( 2001, nLen, cText )
METHOD GetCurPos() INLINE ::SendEditor( SCI_GETCURRENTPOS )
METHOD CharAtPos( nPos ) INLINE ::SendEditor( SCI_GET_CHARAT, nPos )
//METHOD SetSelText( cText ) INLINE ReplaceSel( ::cText )
METHOD AddStyledText( nLen ) INLINE ::SendEditor( 2002, nLen )
METHOD InsertText( nPos, cText ) INLINE ::SendEditor( 2003, nPos, cText )
METHOD ClearAll() INLINE ::SendEditor( 2004 )
METHOD ClearDocumentStyle() INLINE ::SendEditor( 2005 )
METHOD GetLength() INLINE ::SendEditor( 2006 )
METHOD GetCharAt( nPos ) INLINE ::SendEditor( 2007, nPos )
METHOD GetStyleAt( nPos ) INLINE ::SendEditor( 2010, nPos )
METHOD Redo() INLINE ::SendEditor( 2011 )
METHOD SetUndoCollection( lCollectUndo ) INLINE ::SendEditor( 2012, lCollectUndo )
METHOD SelectAll() INLINE ::SendEditor( 2013 )
METHOD SetSaveProint() INLINE ::SendEditor( 2014 )
METHOD GetStyledText() INLINE ::SendEditor( 2015 )
METHOD CanRedo() INLINE ::SendEditor( 2016 )
METHOD MarkerLineFromHandle( nHandle ) INLINE ::SendEditor( 2017, nHandle )
METHOD MarkerDeleteHandle( nHandle ) INLINE ::SendEditor( 2018 )
METHOD GetUndoCollection() INLINE ::SendEditor( 2019 )
METHOD GetViewWs() INLINE ::SendEditor( 2020 )
//METHOD SetViewWs( nViewWs ) INLINE SetViewWs( 2021 )
METHOD GotoLine( nValue ) INLINE ::SendEditor( 2024, nValue )
METHOD GotoPos( nValue ) INLINE ::SendEditor( 2025, nValue )
METHOD SetAnchor( nPos ) INLINE ::SendEditor( 2026, nValue )
METHOD GetCurLine( nLen, cText ) INLINE ::SendEditor( 2027, nLen, cText )
METHOD ConvertEOLs( lEOLMode ) INLINE ::SendEditor( 2029, lEOLMode )
METHOD StartStyling( nPos, nMask ) INLINE ::SendEditor( 2032, nPos, nMask )
METHOD SetStyling( nLen, nStyle ) INLINE ::SendEditor( 2033, nLen, nStyle )
METHOD GetBufferedDraw() INLINE ::SendEditor( 2034 )
METHOD SetBufferedDraw( lBuffered ) INLINE ::SendEditor( 2035, lBuffered )
METHOD SetTabWidth( nTabWidth ) INLINE ::SendEditor( 2036, nTabWidth )
METHOD GetTabWidth() INLINE ::SendEditor( 2121 )
METHOD SetCodepage( nCodepage ) INLINE ::SendEditor( 2037, nCodePage )
METHOD SetUsePalette( lUsePalette ) INLINE ::SendEditor( 2039, lUsePalette )
METHOD MarkerDefine( nMarkerNumber, nSymbol ) INLINE ::SendEditor( 2040, nMarkerNumber, nSymbol )
METHOD MarkerSetFore( nMarkerNumber, nFore ) INLINE ::SendEditor( 2041, nMarkerNumber, nFore )
METHOD MarkerSetBack( nMarkerNumber, nBack ) INLINE ::SendEditor( 2042, nMarkerNumber, nBack )
METHOD MarkerAdd( nLine, nMarkerNumber ) INLINE ::SendEditor( 2043, nLine, nMarkerNumber )
METHOD MarkerDelete( nLine, nMarkerNumber ) INLINE ::SendEditor( 2044, nMarkerNumber )
METHOD MarkerDeleteAll( nMarkerNumber ) INLINE ::SendEditor( 2045, nMarkerNumber )
METHOD MarkerGet( nLine ) INLINE ::SendEditor( 2046, nLine )
METHOD MarkerNext( nLineStart, nMarkerMask ) INLINE ::SendEditor( 2047, nLineStart, nMarkerMask )
METHOD MarkerPrevious( nLineStart, nMarkerMask ) INLINE ::SendEditor( 2048, nLineStart, nMarkerMask )
METHOD MarkerDefinePixMap( nMarkerNumber, cPixMap ) INLINE ::SendEditor( 2049, nMarkerNumber, cPixMap )
METHOD MarkerAddSet( nLine, nSets ) INLINE ::SendEditor( 2466, nLine, nSets )
METHOD SetMarginTypeN( nMargin, nMarginType ) INLINE ::SendEditor( 2240, nMargin, nMarginType )
METHOD GetMarginTypeN( nMargin ) INLINE ::SendEditor( 2241, nMargin )
METHOD SetMarginWidthN( nMargin, nPixelWidth) INLINE ::SendEditor( 2242, nMargin, nPixelWidth )
END CLASS
Tem uma parte muito interessante nisso:
Usa as mensagens do Windows, mas não os códigos do Windows.
Talvez esse tipo de coisa tivesse alguma utilidade para as LIBs: um controle não preso a códigos do Windows.