Hello Roger
How to find and replace a Word in RTF File using DCRTF
How to find and replace a Word in RTF File using DCRTF
How to find and replace a Word in RTF File using DCRTF
Nolberto Paulino
Regards
Regards
Re: How to find and replace a Word in RTF File using DCRTF
DCRTF is simply a command interface to the Xbase++ class XbpRtf.
I have never used it. It inherits from Microsoft's RTF editor class.
Sorry, I don't have an answer for you.
I have never used it. It inherits from Microsoft's RTF editor class.
Sorry, I don't have an answer for you.
The eXpress train is coming - and it has more cars.
Re: How to find and replace a Word in RTF File using DCRTF
hi,
as i know ActiveX of Rich32.OCX is limited and have no "FindReplace" Function.
i wonder why Alaska still use ActiveX for "Controls" as all can be done "native".
---
you can try EM_FINDTEXTEX
https://docs.microsoft.com/de-de/window ... findtextex
as i know ActiveX of Rich32.OCX is limited and have no "FindReplace" Function.
i wonder why Alaska still use ActiveX for "Controls" as all can be done "native".
---
you can try EM_FINDTEXTEX
https://docs.microsoft.com/de-de/window ... findtextex
Code: Select all
SendMessage ( hWndControl, EM_FINDTEXTEX, (WPARAM) Options, (LPARAM) &FindText )
Code: Select all
FUNCTION RichEditBox_ReplaceText( hWndControl, cFind, cReplace, lMatchCase, lWholeWord, lSelectFindText )
LOCAL lDown := .T.
LOCAL aPos := { 0, 0 }
aPos := RichEditBox_GetSelRange( hWndControl )
RichEditBox_SetSelRange( hWndControl, { aPos[ 1 ], aPos[ 1 ] } )
aPos := RichEditBox_FindText( hWndControl, cFind, lDown, lMatchCase, lWholeWord, lSelectFindText )
IF aPos[ 1 ] <> - 1
RichEditBox_SetSelRange( hWndControl, aPos )
RichEditBox_SetText( hWndControl, .T., cReplace )
aPos := RichEditBox_FindText( hWndControl, cFind, lDown, lMatchCase, lWholeWord, lSelectFindText )
ENDIF
RETURN aPos
greetings by OHR
Jimmy
Jimmy
Re: How to find and replace a Word in RTF File using DCRTF
Hi jimmy
You can give me an example of how to do it because I can't compile the example without errors
Thanks.
You can give me an example of how to do it because I can't compile the example without errors
Thanks.
Nolberto Paulino
Regards
Regards
Re: How to find and replace a Word in RTF File using DCRTF
hi,
as i say Xbase++ use ActiveX for RTF and have NO "find/replace"
you have to write your own Code, than you can try the Code which i show you.
it does work with "native" RTF Control (RichEdit20A) like in my DXE LIB (using Ot4xb)
it use Riched20.dll like harbour / HMG where "that" Code work
! Note : Sample is for Xbase++ v1.9x and include SOURCE of XBP_RTF.PRG using Ot4xb p.s. Riched20.dll is also available under 64 Bit
---
Alaska have introduce ActiveX Technique 2008 when Microsoft have stopped Support for ActiveX.
since Windows 7 does NOT have anymore those ActiveX "on-Board" so when (re)install it you brake Rule
i wonder that Alaska is still using ActiveX for controls and no Xbase++ User is protesting against it.
Microsoft have stop it for Security Reason while it is no safe
as i say Xbase++ use ActiveX for RTF and have NO "find/replace"
you have to write your own Code, than you can try the Code which i show you.
it does work with "native" RTF Control (RichEdit20A) like in my DXE LIB (using Ot4xb)
it use Riched20.dll like harbour / HMG where "that" Code work
! Note : Sample is for Xbase++ v1.9x and include SOURCE of XBP_RTF.PRG using Ot4xb p.s. Riched20.dll is also available under 64 Bit
---
Alaska have introduce ActiveX Technique 2008 when Microsoft have stopped Support for ActiveX.
since Windows 7 does NOT have anymore those ActiveX "on-Board" so when (re)install it you brake Rule
i wonder that Alaska is still using ActiveX for controls and no Xbase++ User is protesting against it.
Microsoft have stop it for Security Reason while it is no safe

greetings by OHR
Jimmy
Jimmy
Re: How to find and replace a Word in RTF File using DCRTF
The selected attachment does not exist anymore.
Nolberto Paulino
Regards
Regards
Re: How to find and replace a Word in RTF File using DCRTF
hi,
but i must agree that "often" i got Message "file not found" in this Forum ...
it might help to delete all Cookies.
it work for me.
but i must agree that "often" i got Message "file not found" in this Forum ...
it might help to delete all Cookies.
greetings by OHR
Jimmy
Jimmy