Need Help with CxImage.OCX

Paulaner
02-05-2005, 05:26 AM
Hi,

i want to use the Cximage.ocx to modify bitmaps.

I can load a picture from a picturebox in a Aximage this way:

AxImage1.CreateFromBitmap Picture1.Picture
AxImage1.GrayScale

that works fine, but how can i put the Axpicture back to picturebox.

When i try "AxImage1.MakeBitmap" i need an ?>hcd as Ole_Handle<?.

How could this works.

Thanks Paulaner

ps.

With Cximage.ocx you can rotate,grayscale, saving and reading
JPG,PNG,TIF etc.
You will get it at
"http://www.xdp.it/download.htm"

passel
02-05-2005, 02:52 PM
Not familiar with it, but did you try passing Picture1.hDC to the function?

Paulaner
02-06-2005, 05:40 AM
Seems like it should be
AxImage1.MakeBitmap Picture1.hDC

no, this dosn't works. I think the problem is that i need a "HDC as OLE_HANDLE", i am trying the following but it dont works.
---
Private Sub Command1_Click()
abc Picture1.hdc
End Sub

Private Sub abc(ByVal hdc As stdole.OLE_HANDLE)
AxImage1.MakeBitmap hdc
End Sub

Verphix
02-06-2005, 07:22 AM
[quote]I think the problem is that i need a "HDC as OLE_HANDLE"[/vb]

You do? You posted a function over there, 'abc', why use stdole.ole_handle as an argument? Maybe you should use this instead:
Private Sub Command1_Click()
abc Picture1.hDC
End Sub

Private Sub abc(ByVal PicHDC As long)
AxImage1.MakeBitmap PicHDC
End Sub

Paulaner
02-08-2005, 01:37 AM
Hi again,

this runs without error, but my problem is, how can i put AxImage into a picturebox.

So i need after "AxImage1.MakeBitmap XXX"
something like "Set Picture1.Picture=XXX"

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum