https://cloud.mail.ru/public/4BD8/9WAeuMRyu
- Code: Select all Expand view
- function Main
local hBmp, bmp1:="C:\TMP\map.bmp", bmp2:="C:\TMP\lgd.bmp"
local img:={FW_ReadImage( nil, bmp1 ), ; // [3],[4] are width and height
FW_ReadImage( nil, bmp2 )}
local oCommDlg, oFiles
hBmp := FW_MakeYourBitmap( img[1,3]+10, img[1,4]+6, ;
{ |hDC, w, h| PaintOverlay( hDC, w, h, img) } )
PalBmpFree( img[1] )
PalBmpFree( img[2] )
FW_SaveImage( hBmp, pr1 ) // cSave can be bmp,jpg,png
DeleteObject( hBmp )
************************************************
oCommDlg := FWGetOleObject( "WIA.CommonDialog" )
oFiles := FWGetOleObject( "WIA.Vector")
if valtype(oFiles)="O"
oFiles:Add(bmp1)
oCommDlg:ShowPhotoPrintingWizard(oFiles)
else
? "Not found WiaAut.dll"
endif
return NIL
static function PaintOverlay( hDC, w, h, img)
local t,l
FW_DrawImage( hDC, img[1] )
t :=10 && top
l := w - img[2, 3] - 20 && left
FW_DrawImage( hDC, img[2], { t, l, t + img[2, 4], l + img[2, 3] } )
return nil