Page 1 of 1

bug FWH TRichEdit() Font unreleased

Posted: Sat Aug 10, 2013 12:02 pm
by lucasdebeltran
Hello Antonio,

There is a Font unreleased at TRichEdit class:

FONT,-1744171655,TRICHEDIT:REDEFINE(391)->MAIN(36)


This is a working simple:

Code: Select all | Expand

#Include "FiveWin.ch"
#include "richedit.ch"

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

Function Main()

   Local oDlg, oRich, cRtf := ""
   Local hRichDLL := LoadLibrary( "riched20.dll" )

   local lBold := .F., nPos := 0




   // Debug Checkres
   FErase("checkres.txt")
   SetResDebug( .T. )




   cRtf:="{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}}"+CRLF+;
            "{\colortbl ;\red0\green77\blue187;\red192\green80\blue77;}"+CRLF+;
            "{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\cf1\lang1031\f0\fs22 This is \b colored \b0 text\cf0 . \cf2 The background is color 1 and the foreground is color 2\cf0\par"+CRLF+CRLF+;
            "}"




   DEFINE DIALOG oDlg NAME "Test"




   REDEFINE RICHEDIT oRich VAR cRTF  OF oDlg  ID 100

   //oRich:lHighLight = .f.



   REDEFINE BUTTON ID 110 ACTION ( oRich:LoadFromRTFFile( cGetFile( "Archivo RTF (*.rtf) | *.rtf" ), oRich:SetFocus() ) )



   REDEFINE BUTTON ID 120  ACTION ( lBold := ! lBold, ;
                                    oRich:SetBold( lBold ), oDlg:Update(), oRich:SetFocus(), oDlg:cTitle := "IsBold "+cValtoChar(lBold) )


   oRich:SetText( cRtf )

   //oRich:bGotFocus = { || oRich:HideSel(), oRich:SetSel( nPos, nPos ) }
   //oRich:bLostFocus = { || nPos := oRich:GetPos() }


   ACTIVATE DIALOG oDlg CENTERED

   FreeLibrary( hRichDLL )



   /* CheckRes Recursos FWH*/
   CheckRes()
   WinExec("notepad checkres")



Return nil

 



Thank you.

Re: bug FWH TRichEdit() Font unreleased

Posted: Tue Aug 13, 2013 12:18 pm
by lucasdebeltran
Antonio,

Has been fixed it?.

Also, is the 64 build updated?.

Thanks.

Re: bug FWH TRichEdit() Font unreleased

Posted: Tue Aug 13, 2013 12:26 pm
by Antonio Linares
Lucas,

No, this one has not been fixed yet. This one, and whatever else may be pending, will be included in the next build.

FWH 64 has been updated.

Re: bug FWH TRichEdit() Font unreleased

Posted: Tue Aug 13, 2013 12:30 pm
by Antonio Linares
To temporarly solve it, simply do:

ACTIVATE DIALOG oDlg CENTERED

oRich:oFont:End()