FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Richedit5 and XP
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Richedit5 and XP
Posted: Sat May 26, 2018 05:04 AM
I have several clients on computers which costs XP. I wrote an application using richedit5. On W10 everything is normal. Under XP (if richedit5 there are several Windows) when you exit I get the error. If you use the old richedit, then everything is fine

Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "RichEdi5.ch"

function Main()
private oWnd

  DEFINE DIALOG oWnd FROM 0,0 TO 200,400  TITLE "Test"  PIXEL
  ACTIVATE DIALOG oWnd  ON INIT Win_Ini()
return nil

procedure Win_Ini()
local cRtf:="First richedit5"
local oRtf, oBt

  @ 10, 10 RICHEDIT5 oRTF VAR cRtf OF oWnd  SIZE 380, 100  PIXEL

  oBt:=TButton():New(oRtf:nBottom+30, oWnd:nWidth-250,"Second", ;
                                   oWnd,, 100, 30,,,, .T.)
  oBt:bAction:={||Two_Rtf()}
  oWnd:Center()
return

procedure Two_Rtf
private oDlg

  DEFINE DIALOG oDlg FROM 0,0 TO 100, 200 TITLE "Second RTF"  PIXEL
  ACTIVATE DIALOG oDlg  ON INIT Dlg_Ini()
return

procedure Dlg_Ini(tip, oObj)
local cRtf:="Second richedit5"
local oRtf

  @ 10, 10 RICHEDIT5 oRTF VAR cRtf OF oDlg  SIZE 180, 80  PIXEL

  oDlg:Center()
return
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Richedit5 and XP
Posted: Sat May 26, 2018 09:51 AM

Yes, MsftEdit.dll is used for control RichEdit5, and not exist in XP ( I think with XP SP1 or later exist it, but I'm not sure and this control I not tested in XP )
RichEdit use RichEd20.dll
But if you copy MsftEdit.dll in folder of application it's possible run ok

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Richedit5 and XP
Posted: Sat May 26, 2018 12:23 PM

Thanks, Crist贸bal ! I understood. And how can you insert a square root or a degree or other Unicode characters into richedit ?

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Richedit5 and XP
Posted: Sat May 26, 2018 01:20 PM
Excuse me, I do not understand your question well
1.- What language are you using?
2.- Do not confuse "unicode" with special symbols (which may depend on the font used), or with ascii symbols that you can obtain by pressing ALT + 167, for example.

You can easily verify that the control accepts any character you wish to put, using the Windows utility charmap.exe

Code (fw): Select all Collapse
            SEPARATOR
            MENUITEM "Maps Characters" ;
               ACTION WaitRun( "Charmap.exe" )
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Richedit5 and XP
Posted: Sat May 26, 2018 03:55 PM

In Microsoft Word there is an option Insert -> Symbol. Is it possible to do it by means of Richedit ?

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Richedit5 and XP
Posted: Sun May 27, 2018 11:49 PM

Not exactly, although CharMap is very similar

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces

Continue the discussion