Richedit5 and XP

Richedit5 and XP

Postby Natter » Sat May 26, 2018 5: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: Select all  Expand view
#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
 
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Richedit5 and XP

Postby cnavarro » Sat May 26, 2018 9: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
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Richedit5 and XP

Postby Natter » 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 ?
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Richedit5 and XP

Postby cnavarro » Sat May 26, 2018 1: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: Select all  Expand view

            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
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Richedit5 and XP

Postby Natter » Sat May 26, 2018 3:55 pm

In Microsoft Word there is an option Insert -> Symbol. Is it possible to do it by means of Richedit ?
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Richedit5 and XP

Postby cnavarro » 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
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 86 guests

cron