Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #11512
| From | Franz Rachbauer <office@rachbauer.org> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Reportpro 2.17 DrawBMP method not showing image |
| Date | 2018-03-21 06:48 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <p8sro6$14l1$1@gioia.aioe.org> (permalink) |
| References | <a0ce8852-c13c-423e-ac07-d6640e8a8087@googlegroups.com> |
Hi,
I draw Bitmaps with RP 2.17 using the following:
METHOD PrintLogo(oPrinter) CLASS rptBon
LOCAL oBitmap AS FileBitmap
LOCAL cFile := GetDefault()+"LOGO.BON" AS STRING
oPrinter:Prow := 0
IF File(cFile)
oPrinter:UnitOfMeasure := UNIT_PIXELS
oBitmap := FileBitMap{GetDefault()+cFile}
oPrinter:DrawBmp(oPrinter:Prow, nX, cFile)
oPrinter:Prow += oBitmap:Size:Height
oPrinter:UnitOfMeasure := UNIT_MM
ENDIF
RETURN PRINT_OK
CLASS FileBitMap INHERIT Bitmap
METHOD Init(cFile) CLASS FileBitmap
LOCAL hBmp AS PTR
LOCAL pFile AS PSZ
SUPER:Init(ResourceID{"",_GetInst()})
pFile := StringAlloc(cFile)
hBmp := LoadImage( NULL_PTR, pFile, IMAGE_BITMAP, 0, 0,
LR_LOADFROMFILE)
MemFree(pFile)
IF hBmp <> NULL_PTR
SELF:__SetHandle(hBmp)
ENDIF
RETURN SELF
Regards, Franz
Am 20.03.2018 um 23:41 schrieb sherifghalebsa@gmail.com:
> Hello,
> I'm using VO 2.8SP4b and ReportPro 2.17b
>
> And the DrawBMP method doesnt print the image, has anyone printed an image successfully?
>
> Cause i'm having trouble with the ReportPro DrawBMP method, it doesnt work although i made sure the file exists using "If File()" method and in ReportPro class the method "oDIB:LoadDIBFromFile(cFileName)" returns true.
>
> Here is how i've tried to use the DrawBMP method:
>>> oPrinter:DrawBMP(10,1,"c:\my_folder\my_image.bmp")
>
> Any help or sample code would be much appreciated.
> Thanks.
>
---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Reportpro 2.17 DrawBMP method not showing image sherifghalebsa@gmail.com - 2018-03-20 15:41 -0700
Re: Reportpro 2.17 DrawBMP method not showing image Sherlock <sherlock@sherlock.com.au> - 2018-03-20 22:42 -0700
Re: Reportpro 2.17 DrawBMP method not showing image sherifghalebsa@gmail.com - 2018-03-21 12:19 -0700
Re: Reportpro 2.17 DrawBMP method not showing image Franz Rachbauer <office@rachbauer.org> - 2018-03-21 06:48 +0100
Re: Reportpro 2.17 DrawBMP method not showing image sherifghalebsa@gmail.com - 2018-03-21 12:20 -0700
csiph-web