Loading picture files into CDC or similar

I am really new to C++ windows programming, but know wuite a bit of DOS c++. I tried to work this question out for a long time: How can you load a bitmap, jpg or any picture from a file into a CDC class, or similar, so that you can access pixels directly by GetPixel, SetPixel. Try and explain clearly please...
kristianlmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ZoppoCommented:
Hi kristianlm,

There's not a lot to explain: Just make a functionality which loads each of the wanted bitmaps and then just draw it onto the dc, i.e. using CDC::BitBlt().

I would suggest you to use a class library instead of coding your own file format import funcions, you can find one i.e. at www.paintlib.de

hope that helps,

ZOPPO
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kristianlmAuthor Commented:
Well, thanks Zoppo, but I think I still need a bit more help...

What function should I use? Could you please send me a source zipped or something - I am a REALLY starter...

Thanks for your help so far, Zoppo.
0
ZoppoCommented:
Now, as I told you can download the free source for paintlib at i.e. www.paintlib.de. With this you can load bitmaps of lot's of formats into CBitmap objects. To do anything with this bitmap you can either work with the bitmap's bits directly using GetDIBits() or you can create a memory device context with CreateCompatibleDC() and select the bitmpa into it with SelectObject().

Would even be helpful when you take a loog at the www.codeguru.com page to see some samples for handling bitmaps.

ZOPPO
0
kristianlmAuthor Commented:
Well, thanks Zoppo, but I think I still need a bit more help...

What function should I use? Could you please send me a source zipped or something - I am a REALLY starter...

Thanks for your help so far, Zoppo.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.