Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

hDC

Options
Go to last post Go to first unread
PaulGendreau  
#1 Posted : Monday, January 26, 2004 6:20:00 AM(UTC)
PaulGendreau

Rank: Member

Groups: Member
Joined: 1/26/2004(UTC)
Posts: 2

I need to be able to draw into an image object with my syndicated application, manipulate the image, and then save it. My syndicated application (I have no control over this - it belongs to our development team) draws this way: myDrawObject.Draw pic.hDC, 0, 0, pic.ScaleWidth, pic.ScaleHeight In the above line of code, 'pic' is a VB picture box, and I must pass the hDC of the picture box as a paramer to the syndicated application. I was using Graphics Processor and could then do this: Dim m_objRASTER As New RasterObject m_objRASTER.LoadPicture m_objPic.Image 'Load it from the picture box Question: Is there a way using Graphis Mill to create an image object that my applicantion can draw to (it must have hDC that I can pass as a parameter to my app) without using a VB picture box as an intermidiate step?
Andrew  
#2 Posted : Monday, January 26, 2004 1:02:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 863

Thanks: 2 times
Was thanked: 25 time(s) in 25 post(s)
Unfortunately current version of Graphics Mill does not allow this. If even we will find way to rid of PictureBox, anyway there will be hidden (or explicit) memory copying. To apply direct drawing on pixels you should use Graphics object (included into Graphics Mill). If you need to use your own drawing object, the only way is to use intermediate object like PictureBox. However in the next version it will be possible to get HBITMAP of the Bitmap object (if it has GDI-compatible pixel format), so you will be able to select it into some HDC and use it with your object...
PaulGendreau  
#3 Posted : Monday, January 26, 2004 9:07:00 PM(UTC)
PaulGendreau

Rank: Member

Groups: Member
Joined: 1/26/2004(UTC)
Posts: 2

Okay. I have to use a picture box (huge performance hit, isn't it?). Will do. I used to use Graphics Processor like this: m_objRASTER.LoadPicture m_objPic.Image 'Load it from the picture box I want to use ImageMill only. How do I load the contents of a VB picturebox into a GraphicsMill bitmap?
Andrew  
#4 Posted : Monday, January 26, 2004 9:35:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 863

Thanks: 2 times
Was thanked: 25 time(s) in 25 post(s)
> Okay. I have to use a picture box (huge performance hit, isn't it?). It depends on size of image contained in PictureBox. > How do I load the contents of a VB picturebox into a GraphicsMill bitmap? Use Picture property: m_objBitmap.Data.Picture = m_objPic.Picture
Users browsing this topic
Similar Topics
Printing through DrawOnHdc is not working completely? (Other Products)
by brichard 1/12/2005 12:57:00 AM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.