Bug in TRichEdit

Post Reply
User avatar
Enrico Maria Giordano
Posts: 8761
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 5 times
Contact:

Bug in TRichEdit

Post by Enrico Maria Giordano »

This is the sample. Try to hit any alphabetic key. It will be rejected:

Code: Select all | Expand

#include "Fivewin.ch"
#include "Richedit.ch"


FUNCTION MAIN()

    LOCAL hDll := LOADLIBRARY( "RICHED20.DLL" )

    LOCAL oDlg

    LOCAL oRich, cVar := ""

    DEFINE DIALOG oDlg

    @ 0, 0 RICHEDIT oRich VAR cVar

    ACTIVATE DIALOG oDlg;
             ON INIT oDlg:SetControl( oRich );
             CENTER

    FREELIBRARY( hDll )

    RETURN NIL


EMG
User avatar
Antonio Linares
Site Admin
Posts: 42582
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 36 times
Been thanked: 86 times
Contact:

Post by Antonio Linares »

Enrico,

Quite curious. On a window it works ok. And on a dialog only accepts numbers... :shock:
regards, saludos

Antonio Linares
www.fivetechsoft.com
chiaiese
Posts: 85
Joined: Wed Feb 08, 2006 10:32 pm
Location: Roma, Italia
Contact:

Post by chiaiese »

The sample found in FWH (2.5) TestRich.prg works on a dialog (resource).
It accepts characters too
but if I try to open an existing file it returns the error:
"unrecoverable error 9010: hb_xfree() invalid pointer 004ec06e select the file"

regards
Roberto Chiaiese
User avatar
Antonio Linares
Site Admin
Posts: 42582
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 36 times
Been thanked: 86 times
Contact:

Post by Antonio Linares »

Roberto,

Yes, and TestRich.prg keeps working ok in FWH 2.7. It looks as it works ok from resources, but not from source code on a dialog.

With the current Harbour and xharbour versions the error you describe (hb_xfree()) no longer happens.

We keep searching,
regards, saludos

Antonio Linares
www.fivetechsoft.com
chiaiese
Posts: 85
Joined: Wed Feb 08, 2006 10:32 pm
Location: Roma, Italia
Contact:

Post by chiaiese »

The Richedit control does not show bitmaps also.
I'm able to open an rtf file from disk only if I pass its name as a parameter (not trough the button on the sample dialog)
However the control only shows text, not embedded or linked bitmaps

Roberto
chiaiese
Posts: 85
Joined: Wed Feb 08, 2006 10:32 pm
Location: Roma, Italia
Contact:

Post by chiaiese »

I found two dll in my windows directory riched20.dll and riched32.dll
anyone knows the difference ?
I tried both but without any difference, same bugs

Roberto
User avatar
Enrico Maria Giordano
Posts: 8761
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 5 times
Contact:

Post by Enrico Maria Giordano »

chiaiese wrote:I found two dll in my windows directory riched20.dll and riched32.dll
anyone knows the difference ?
I tried both but without any difference, same bugs

Roberto


The second is only a wrapper to the first (note the small size).

EMG
User avatar
Antonio Linares
Site Admin
Posts: 42582
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 36 times
Been thanked: 86 times
Contact:

Post by Antonio Linares »

Enrico,

Fixed the problem in dialogs! :)

We are going to re-publish the March build in a few minutes with the new changes and enhancements on Class TRichEdit.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 8761
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 5 times
Contact:

Post by Enrico Maria Giordano »

Great! But get ready for more bug reports in this class. :-)

EMG
User avatar
Antonio Linares
Site Admin
Posts: 42582
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 36 times
Been thanked: 86 times
Contact:

Post by Antonio Linares »

Enrico,

No problem, your feedback is always welcome :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
chiaiese
Posts: 85
Joined: Wed Feb 08, 2006 10:32 pm
Location: Roma, Italia
Contact:

Post by chiaiese »

Antonio,
Objects like bitmaps are also shown now ?

Roberto
Post Reply