Richedit5 and XP

Post Reply
Natter
Posts: 1244
Joined: Mon May 14, 2007 9:49 am

Richedit5 and XP

Post 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
 
User avatar
cnavarro
Posts: 6558
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Richedit5 and XP

Post 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
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
Natter
Posts: 1244
Joined: Mon May 14, 2007 9:49 am

Re: Richedit5 and XP

Post by Natter »

Thanks, Cristóbal ! I understood. And how can you insert a square root or a degree or other Unicode characters into richedit ?
User avatar
cnavarro
Posts: 6558
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Richedit5 and XP

Post 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" )
 
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
Natter
Posts: 1244
Joined: Mon May 14, 2007 9:49 am

Re: Richedit5 and XP

Post by Natter »

In Microsoft Word there is an option Insert -> Symbol. Is it possible to do it by means of Richedit ?
User avatar
cnavarro
Posts: 6558
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Richedit5 and XP

Post by cnavarro »

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
Post Reply