Solved

PlgBlt(..)  transparency Parameter

Posted on 2000-04-17
1
527 Views
Last Modified: 2013-11-20
When using PlgBlt:

pDC->PlgBlt(currentImagePoints, &memDC, 0, 0, 66, 80, CBitmap(), 0, 0);

I get just an ordinary sprite (contained in the memDC).  But instead, i want to use the transparency mask parameter and replace the above CBitmap()  parameter with my monocrome mask.

The problem however is that it's not displaying the sprite at all whatsoever now.  When i try shrinking the size of the mask bitmap (so that it is smaller than the bitmap contained in memDC), the sprite to be displayed to the screen is still invisible!

The mask that i tried making was done as follows:
- Loaded Photoshop
- Opened the bimap that contains the sprite (red in the transparency area)
- went to mode and selected Grey Scale
- saved the bitmap with the name mask.bmp

The mask is specified to be monocrome in the MSDN library.

Could you give any suggestions as to why the sprite is always invisible no matter what?  What can i do to fix this?

- Thanks
0
Comment
Question by:Chains
1 Comment
 
LVL 31

Accepted Solution

by:
Zoppo earned 50 total points
ID: 2725661
Hi Chains,

>The mask is specified to be monocrome in the MSDN library.
That's correct and I think that may be your problem. 'monocrome' means 1 bit per pixel, only black/white. A grayscaled image may have 8bit or more.

BTW, what's the return value of the PlgBlt-call?

ZOPPO
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
if loop in java 3 138
modThree challenge 4 88
Way to decrease size of apk file 9 65
Remove Password Protection from pdf (with password) using an command line executable 5 49
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now