Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transparent Bitmap

Status
Not open for further replies.

cpaige

Programmer
Jun 19, 2000
86
CA
Does any body have any source code to display a Transparent Bitmap. One restriction, it can be in C++ ,but no MFC!!!!<br><br>Making a lean and mean program and have no interest in extra stuff being traported with the EXE. <p>Clayton T. Paige<br><a href=mailto:cpaige@home.com>cpaige@home.com</a><br><a href= Snail</a><br>Clayton T. Paige<br>
Programmer Extraordinaire <br>
========================================================<br>
"Who General Failure? and Why is he reading my disk drive?"
 
Dear Clayton,<br><br>Nigel Thompson has code available on MSDN for drawing Bitmaps using a transparent pixel value. He also authored a great book for performing animation in windows applications, before DirectX.<br><br>Good luck<br>-pete
 
Thank You!<br>&nbsp;Do you know by any chance what the name of the article is? <br> <p>Clayton T. Paige<br><a href=mailto:cpaige@home.com>cpaige@home.com</a><br><a href= Snail</a><br>Clayton T. Paige<br>
Programmer Extraordinaire <br>
========================================================<br>
"Who General Failure? and Why is he reading my disk drive?
 
Dear Clayton,<br><br>Well that would actually be considered an outdated method so maybe you should just start with OpenGL here:<br><br><A HREF=" TARGET="_new"> should get you started researching the issue of rendering images. You will be reading for some time I think when you start to discover paletts, double buffering and more.<br><br>Good luck<br>-pete
 
I'm not real intersted in using OpneGL or any graphics engines.&nbsp;&nbsp;I was hoping to use just the windows GDI.&nbsp;&nbsp;Speed isn't really important.&nbsp;&nbsp;Just small code with as much portablity as posible. So, if you have&nbsp;&nbsp;a fresh install of Win95a or WIn98se it will still run with out any other files other then the EXE.&nbsp;&nbsp; <p>Clayton T. Paige<br><a href=mailto:cpaige@home.com>cpaige@home.com</a><br><a href= Snail</a><br>Clayton T. Paige<br>
Programmer Extraordinaire <br>
========================================================<br>
"Who General Failure? and Why is he reading my disk drive?
 
Clayton,<br><br>&gt; I was hoping to use just the windows GDI.<br><br>Then you just want to use BitBlt(), StretchBlt() or DIB_BitBlt() which ever works for you and you will have to setup a DRAWMODE structure to provide the transparency information, etc. Also you must take into account any Palette issues depending on your bitmap(s).<br><br>If you've never done any of this before you will likely need to do some research.<br><br>&gt; Does any body have any source code to display a Transparent Bitmap<br><br>No it's not exactly the sort of solution that can be accomplished in a dozen lines of code.<br><br>Good luck<br>-pete<br><br><br>
 
Win32 API &quot;BitBlt&quot; will do it.&nbsp;&nbsp;You just need to create a negative mask of your image and it will blit the information in rotation.<br><br>Read up on Bitblt.<br><br>Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top