Re: Create picture in memory and move to a specific hdc
From: Mike D Sutton (EDais_at_mvps.org)
Date: 12/20/04
- Previous message: Mike D Sutton: "Re: Image scaling (sign taken from a Pc Pen)"
- In reply to: Alessio Biscucci: "Create picture in memory and move to a specific hdc"
- Next in thread: Alessio Biscucci: "Re: Create picture in memory and move to a specific hdc"
- Reply: Alessio Biscucci: "Re: Create picture in memory and move to a specific hdc"
- Reply: Alessio Biscucci: "Re: Create picture in memory and move to a specific hdc"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 20 Dec 2004 23:59:59 -0000
> As object, I need to create a picture into memory and then send
> to a specific hdc of a third parts control to use as watermark.
> I can create the image, but I don't know how to send it to the hdc.
>
> better could be create an Istdpicture's object and pass to control's
> watermark property that works only with the LoadImage.
If you want to create a Bitmap then use the CreateDIBSection() or CreateCompatibleBitmap() API calls (or at a push CreateBitmap() if
you're creating a monochrome Bitmap.) You can then select this Bitmap into a DC and BitBlt() it to your DC. If on the other hand
you want to create a StdPicture object from your Bitmap then have a look at the OLEPicture library on my site which wraps an API
HBITMAP (returned from any of the Create*() calls mentioned above) in an OLE picture object (the same object type returned from
LoadPicture())
Hope this helps,
Mike
- Microsoft Visual Basic MVP -
E-Mail: EDais@mvps.org
WWW: http://EDais.mvps.org/
- Previous message: Mike D Sutton: "Re: Image scaling (sign taken from a Pc Pen)"
- In reply to: Alessio Biscucci: "Create picture in memory and move to a specific hdc"
- Next in thread: Alessio Biscucci: "Re: Create picture in memory and move to a specific hdc"
- Reply: Alessio Biscucci: "Re: Create picture in memory and move to a specific hdc"
- Reply: Alessio Biscucci: "Re: Create picture in memory and move to a specific hdc"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|