Page 1 of 1

Richedit5 and XP

Posted: Sat May 26, 2018 5:04 am
by Natter
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: Select all | Expand

#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
 

Re: Richedit5 and XP

Posted: Sat May 26, 2018 9:51 am
by cnavarro
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

Re: Richedit5 and XP

Posted: Sat May 26, 2018 12:23 pm
by Natter
Thanks, Cristóbal ! I understood. And how can you insert a square root or a degree or other Unicode characters into richedit ?

Re: Richedit5 and XP

Posted: Sat May 26, 2018 1:20 pm
by cnavarro
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: Select all | Expand


            SEPARATOR
            MENUITEM "Maps Characters" ;
               ACTION WaitRun( "Charmap.exe" )
 

Re: Richedit5 and XP

Posted: Sat May 26, 2018 3:55 pm
by Natter
In Microsoft Word there is an option Insert -> Symbol. Is it possible to do it by means of Richedit ?

Re: Richedit5 and XP

Posted: Sun May 27, 2018 11:49 pm
by cnavarro
Not exactly, although CharMap is very similar