FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour richedit
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
richedit
Posted: Sat May 30, 2015 07:29 AM

Where I can found a sample test with a dbf with memo field and the possibility to use richedit as get and save it on dbf (memo field) ?
thanks

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: richedit
Posted: Sat May 30, 2015 02:08 PM

Silvio,

did you try SaveAsRTF() method?

EMG

Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: richedit
Posted: Sat May 30, 2015 03:49 PM

yes but not run or I wrong the command

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: richedit
Posted: Sat May 30, 2015 05:20 PM

Silvio,

what is SaveAsRTF() returning? Try

? VALTYPE( oRich:SaveAsRTF() )

and let me know.

EMG

Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: richedit
Posted: Sun May 31, 2015 08:02 AM

See the test sample i sent you yesterday

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: richedit
Posted: Mon Jun 01, 2015 12:39 PM
here the test
Code (fw): Select all Collapse
#include "Fivewin.ch"
#include "constant.ch"
#include "ttitle.ch"
#include "richedit.ch"

REQUEST DBFCDX
REQUEST DBFFPT
EXTERNAL ORDKEYNO,ORDKEYCOUNT,ORDCREATE,ORDKEYGOTO

Function test()
   Local hDLL  := LoadLibrary( 'riched20.dll' )
   Local oDlgModelli

   Local cDlgTitle  :="Family"
   Local aGet[3]
    Local  nBottom   := 29.2
   Local  nRight    :=  58
   Local  nWidth    :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local  nHeight   :=  nBottom * DLG_CHARPIX_H
   Local otn

 RddSetDefault( "DBFCDX" )

   Create_Archive_Modelli_mail()

   USE MAILMOD ALIAS MM


   IF MM->(eof())
        MM->(DbAPPEND())
         Replace mm->MAILNAME with "test"
         Replace mm->MESSAGE with "Prova test"
          MM->(DbCommit())
      endif

   MM->(DbGotop())

DEFINE DIALOG oDlgModelli          ;
         SIZE nWidth, nHeight   PIXEL  TRUEPIXEL ;
         TITLE cDlgTitle



      @ 90,110  RICHEDIT aGet[3] VAR MM->MESSAGE of oDlgModelli PIXEL SIZE 100,100   //UPDATE


     @ 10, 5 BUTTON otn prompt "Save"  ACTION SaveMemo(aGet)
 ACTIVATE DIALOG oDlgModelli  centered


      if hDLL != nil
      FreeLibrary( hDLL )
   endif

   return nil



function SaveMemo(aGet)
//???
   aGet[3]:saveasrtf()

 return nil





    static   Function Create_Archive_Modelli_mail()
      Local cDir :=""

    DbCreate(cDir+'mm', {  {'MAILNAME' , 'C',  30,   0} ,;
                      {'SUBJECT'  , 'C',  30,   0} ,;
                      {'MESSAGE'  , 'M',  10,  0}}, 'DBFCDX')

     close all
      use &(cDir+'mm') new
      select mm
      if FILE(cDir+'MailMod.DBF')
         delete file &(cdir+'MailMod.cdx')
         append from &(cdir+'MailMod')
         dbcommitall()
         close all
         delete file &(cdir+'MailMod.dbf')
         delete file &(cdir+'MailMod.fpt')
      endif
      close all
      rename &(cdir+'mm.dbf') to &(cdir+'MailMod.dbf')
      rename &(cDir+'mm.fpt') to &(cDir+'MailMod.fpt')
      close all
    return nil
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion