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
#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
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 40 guests