Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PlgBlt(..)  transparency Parameter

Posted on 2000-04-17
1
Medium Priority
?
561 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 31

Accepted Solution

by:
Zoppo earned 100 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

719 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