Hi Ehsan,


In my opinion, the best and easiest way to render an image on a DC is by
using the IPicture interface, it's very pretty easy to use and there are a
lot of C++ wrappers to make easier its use.

In one of my apps I'm using the classes written by Paul Dilascia that
encapsulates IPicture. You can read the article and download a sample app
from the following link:



http://msdn.microsoft.com/msdnmag/issues/01/10/c/default.aspx



Hope this helps,

Carlos



----- Original Message ----- 
From: "Ehsan Akhgari" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 13, 2004 9:13 PM
Subject: [msvc] Render a picture on the DC


> I'm a kiddie when it comes to DC manipulation, so forgive me if from now
on
> I seem stupid!
>
> I need to read an image file (let's say, a .jpg) from disk, and display it
> as needed (with resizing depending on the control's dimensions) on my
> ActiveX control's DC (windowed control).  There's nothing special about
> this.  And the file format does not matter; it can be .bmp, .gif, .jpg,
> .png, anything.
>
> What I need is a solution that is simple, fast, usable on all versions of
> windows, and easy to perform for a DC kiddie.  And I need to prepare it as
> quickly as I can, because the deadline I have to face is very near.
>
> I did a search on MSDN, and found lots of information.  Many of it looks
> good, but I don't have enough knowledge to make a decision on which path
to
> take, nor do I have enough time to read up on the subject on my own (my
> usual method of learning.)
>
> So is anyone feeling like struggling with a DC newbie?  :-)
>
> Thanks!
> -------------
> Ehsan Akhgari
>
> Farda Technology (www.farda-tech.com)
>
> List Owner: [EMAIL PROTECTED]
>
> [ Email: [EMAIL PROTECTED] ]
> [ WWW: http://www.beginthread.com/Ehsan ]
>
> In the mountains the shortest way is from peak to peak, but for that route
> you must have long legs. Aphorisms should be peaks, and those spoken to
> should be tall and lofty.
> -Thus Spoke Zarathustra, F. W. Nietzsche
>
>
>
>
> _______________________________________________
> msvc mailing list
> [EMAIL PROTECTED]
> See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for
subscription changes, and list archive.



Reply via email to