FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour bug FWH TRichEdit() Font unreleased
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
bug FWH TRichEdit() Font unreleased
Posted: Sat Aug 10, 2013 12:02 PM
Hello Antonio,

There is a Font unreleased at TRichEdit class:

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


This is a working simple:

Code (fw): Select all Collapse
#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.
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: bug FWH TRichEdit() Font unreleased
Posted: Tue Aug 13, 2013 12:18 PM

Antonio,

Has been fixed it?.

Also, is the 64 build updated?.

Thanks.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: bug FWH TRichEdit() Font unreleased
Posted: Tue Aug 13, 2013 12:26 PM

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.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: bug FWH TRichEdit() Font unreleased
Posted: Tue Aug 13, 2013 12:30 PM

To temporarly solve it, simply do:

ACTIVATE DIALOG oDlg CENTERED

oRich:oFont:End()

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion