How can i send a bitmap from ActiveX (ocx) to C# project?

M

Mehdi

hi everybody

I want to pass a bitmap file from activeX component that written in vc+
+6 to my project in c#.Net.

how can transfer a bitmap file?

is it possible that with return a pointer and lenght of file i catch
bitmap file in my project?

what's the better way to exchange such data (bmp) bitween activeX and
project?
 
B

Ben Schwehn

I want to pass a bitmap file from activeX component that written in vc+
+6 to my project in c#.Net.

how can transfer a bitmap file?


Possibly return an HBITMAP in you c dll, then use something like
System.Drawing.Image.FromHbitmap(new IntPtr(hBitmap)); in c#

Don't forget to clean up the hbitmap afterwards.

hth
Ben
 
M

Mehdi

Possibly return an HBITMAP in you c dll, then use something like
System.Drawing.Image.FromHbitmap(new IntPtr(hBitmap)); in c#

Don't forget to clean up the hbitmap afterwards.

hth
Ben

but in vc++6 an activeX has not HBITMAP return type , has it?
i don't see HBITMAP return type in vc++6
do u work with vc++6 MFC ActiveX?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top