Re: Two CBitmap questions
- From: "Mark Salsbery [MVP]" <MarkSalsbery[MVP]@newsgroup.nospam>
- Date: Fri, 31 Aug 2007 12:30:09 -0700
The GDI+ Image/Bitmap classes will load png images. There's direct support
for alpha values.
The ATL class CImage uses GDI+ for loading/saving images and can/does wrap
an image as a DIBSection which can be used with GDI APIs.
To use BitBlt, the source bitmap needs to be selected into a DC.
Mark
--
Mark Salsbery
Microsoft MVP - Visual C++
"David Thielen" <thielen@xxxxxxxxxxxxx> wrote in message
news:C8BF130C-B964-4212-9D8D-6BEE73EDDB15@xxxxxxxxxxxxxxxx
Hi;
I am writing my first C++ program in 10 years I think so these are pretty
basic questions.
1) It looks like CBitmap.LoadBitmap cannot load png files. Is there a file
format with alpha that CBitmap does support? If not, what is the best way
to
draw bitmaps with alpha or is that "very difficult?" I don't have to have
this but it sure does make the output look better.
2) How do I draw a bitmap in a CDC? I thought it was with CDC.BitBlt but
you
cannot pass it a CBitmap.
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
.
- Follow-Ups:
- Re: Two CBitmap questions
- From: David Thielen
- Re: Two CBitmap questions
- Prev by Date: Re: Size of BMP file from HBITMAP?
- Next by Date: Re: Two CBitmap questions
- Previous by thread: How to display PNG images
- Next by thread: Re: Two CBitmap questions
- Index(es):
Relevant Pages
|