I saw on a Italian application made with Delphi a procedure to save documents ( tiff, bmp, jpg, etc.), pdf, docx, rtf, etc )
But I not Know How create it
Last year I tried to make a test but then I not resolved it
Perhaps someone can found a solution ...
test.prg- Code: Select all Expand view RUN
include "FiveWin.ch"
#include "constant.ch"
#define LIGHTCYAN nRGB( 203, 225, 252 )
STATIC oSay[6]
STATIC cNameImage,dDateModImage,nSizeImage
STATIC oRich
Function ut_allegati(cKdnr)
Local oDlg
Local oBar
Local nBottom := 35
Local nRight := 110
Local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
Local nHeight := nBottom * DLG_CHARPIX_H
Local oFontDlg
Local hRichDLL := LoadLibrary( "riched20.dll" )
DEFINE FONT oFontDlg NAME "Tahoma" SIZE 0, -12
DEFINE DIALOG oDlg SIZE nWidth, nHeight FONT oFontDlg ;
STYLE nOr( WS_OVERLAPPEDWINDOW ) ;
TITLE "Allegati"
oRich = xTRich(): New(13, 0, { || "" }, oDlg, , ,,, .f.)
oRich:cKdNr := cKdNr
oRich:bMButtonDown := {|nRow, nCol, nFlags| oRich:end(),oDlg:hide(),dropread(cKdnr),oDlg:show(), oDlg:end()}
@ 120,2 SAY oSay[1] PROMPT "Nome file :" of oDlg SIZE 50,10
@ 130,2 SAY oSay[2] PROMPT "Dimensioni :" of oDlg SIZE 50,10
@ 160,2 SAY oSay[3] PROMPT "Ultima modifica :" of oDlg SIZE 50,10
@ 120,10 SAY oSay[4] PROMPT cNameImage of oDlg SIZE 200,10 UPDATE
@ 130,10 SAY oSay[5] PROMPT nSizeImage of oDlg SIZE 50,10 UPDATE
@ 160,10 SAY oSay[6] PROMPT dDateModImage of oDlg SIZE 50,10 UPDATE
oDlg:bResized := {||Rinfresca_oFrm(nHeight,nWidth,oDlg) }
ACTIVATE DIALOG oDlg CENTERED
FreeLibrary( hRichDLL )
return nil
Function Rinfresca_oFrm(nHeight,nWidth,oDlg)
oRich:ntop :=oDlg:nHeight-180
oRich:nwidth :=oDlg:nwidth-20
oRich:nHeight :=oRich:ntop-60
oRich:refresh()
return nil
function dropread()
return nil
class xrich
- Code: Select all Expand view RUN
// Win32 RichEdit Control support
#include "FiveWin.ch"
#include "Constant.ch"
#include "WColors.ch"
#include "RichEdit.ch"
#ifdef __XPP__
#define Super ::TControl
#define New _New
#endif
#define CTRL_CLASS "RichEdit20A"
#define MK_MBUTTON 16
#define WM_MBUTTONDOWN 519
#define WM_MBUTTONDBLCLK 521
#define WM_MOUSEWHEEL 522
#define WM_NCHITTEST 132 // 0x84
//----------------------------------------------------------------------------//
CLASS xTRich FROM TRichEdit
DATA cCargo, cKdNr
METHOD HandleEvent( nMsg, nWParam, nLParam )
METHOD MButtonDown( nRow, nCol, nFlags )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS xTRich
local nRow, nCol, nFlags
do case
case nMsg == WM_NCHITTEST
if ::cCargo = GetWindowText( ::hWnd ) .or. len(ALLTRIM(GetWindowText( ::hWnd )))=0
else
::MButtonDown( nRow, nCol, nFlags )
::cCargo := GetWindowText( ::hWnd )
endif
case nMsg == FM_HIGHLIGHT
return ::HighLightLine()
case nMsg == FM_HIGHLIGHTALL
return ::HighlightAllText()
case nMsg == WM_KEYDOWN
if ::lReadOnly
if ( nWParam == Asc( "E" ) .or. nWParam == Asc( "L" ) .or. ;
nWParam == Asc( "J" ) .or. nWParam == Asc( "R" ) ) .and. ;
GetKeyState( VK_CONTROL )
return 0
endif
endif
return ::KeyDown( nWParam, nLParam )
otherwise
if( nMsg == WM_MOUSEWHEEL .or. nMsg == WM_MBUTTONDOWN .or. ;
nMsg == WM_MBUTTONDBLCLK )
if GetKeyState( VK_CONTROL )
return 0
endif
else
Super:HandleEvent( nMsg, nWParam, nLParam )
endif
endcase
return nil
//----------------------------------------------------------------------------//
METHOD MButtonDown( nRow, nCol, nKeyFlags ) CLASS xTRich
Super:MButtonDown( nRow, nCol, nKeyFlags )
::PostMsg( FM_CHANGE )
return nil
//----------------------------------------------------------------------------//
run the exe and then you can insert document on the dialog test draging the document you want into the box
: the document are showed on this box ... then i not found a solution to save them on folder or found another solution
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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