I have this problem.
The only TRichedit based program workink is testrich.prg
For instance enrico91.prg and other samples don't work
enrico91.prg
#include "Fivewin.ch"
#include "Richedit.ch"
FUNCTION MAIN()
LOCAL hDll := LOADLIBRARY( "RICHED20.DLL" )
LOCAL oDlg, oRich, cVar := ""
DEFINE DIALOG oDlg
@ 0, 0 RICHEDIT oRich VAR cVar
ACTIVATE DIALOG oDlg;
ON INIT oDlg:SetControl( oRich ) ;
CENTER
? cVar // nothink
FREELIBRARY( hDll )
RETURN NIL
this is created by me
FUNCTION CREANOTE( )
LOCAL oDlg
LOCAL oRich
LOCAL lNuovo := .F.
LOCAL aUtenti := {}
LOCAL oButSalva
LOCAL cLettore := SPACE(20)
LOCAL nBckColor := CLR_WHITE
local hRichDLL := LoadLibrary( "riched20.dll" )
DEFINE DIALOG oDlg RESOURCE "nota" TITLE "Nuova nota"
REDEFINE BUTTON oButSalva ID 201 OF oDlg ACTION oDlg:End( IDOK )
oRich = TRichEdit():Redefine( 101, { || "" }, oDlg )
oRich:lHighLight = .f.
ACTIVATE DIALOG oDlg CENTERED
IF oDlg:nResult = IDOK
? oRich:SaveAsRTF( oRich )
ENDIF
The question si
WHY?
marco
FreeLibrary( hRichDLL )
RETURN NIL