Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to make excel addin in vc++ Pin
bhanu pratap2-Sep-05 19:09
bhanu pratap2-Sep-05 19:09 
AnswerRe: How to make excel addin in vc++ Pin
ThatsAlok2-Sep-05 20:55
ThatsAlok2-Sep-05 20:55 
QuestionVC++ Using Blowfish Compiler Error Pin
CooperWu2-Sep-05 16:04
CooperWu2-Sep-05 16:04 
GeneralRe: VC++ Using Blowfish Compiler Error Pin
sunit52-Sep-05 21:10
sunit52-Sep-05 21:10 
GeneralRe: VC++ Using Blowfish Compiler Error Pin
CooperWu3-Sep-05 2:49
CooperWu3-Sep-05 2:49 
AnswerRe: VC++ Using Blowfish Compiler Error Pin
CooperWu3-Sep-05 2:59
CooperWu3-Sep-05 2:59 
Questiona blowfish decrypt/encrypt related question Pin
Torune2-Sep-05 16:03
Torune2-Sep-05 16:03 
QuestionCreating a colored, transparent CStatic Pin
David Fleming2-Sep-05 14:00
David Fleming2-Sep-05 14:00 
I've been looking around in the articles on CStatics as well as in stuff on Bitmaps and the GDI, but I'm not quite finding what I need, so here goes....

What I would like to create is a CStatic-derived class that will make what looks like a partially transparent CStatic. Think of it as a piece of colored glass with text written on it, hovering over the background.

I can handle making a CStatic transparent (there are a couple of nifty articles on that). In essence, taking an image of the part of the parent control behind the CStatic and painting that as the background of the CStatic.

To be more explicit, here's a code snippet for doing basic transparent CStatic:
This is in OnPaint for the CStatic-derived class (so dc is the supplied DC):

CDC* pdcT;
pdcT = new CDC;
pdcT->CreateCompatibleDC(&dc);
CBitmap bitmap;
CBitmap* pOldBitmap;
pOldBitmap = pdcT->SelectObject(&bitmap);
dc.BitBlt(0, 0, rc.Width(), rc.Height(), pdcT, 0, 0, SRCCOPY);
pdcT->SelectObject(pOldBitmap);
delete pdcT;


So what I need to be able to do is modify that "parent" image to add a wash of color, then paint that to the background of the CStatic. It seems that I need to do the modifying of the bitmap after it has been selected into the pdcT, but I don't know where to go on that. Or perhaps I'm missing something that I can do in the BitBlt function to accomplish this.

Can it be done? And if so, how?

Thanks.
AnswerRe: Creating a colored, transparent CStatic Pin
David Fleming2-Sep-05 22:59
David Fleming2-Sep-05 22:59 
QuestionAbsent Thread Pin
Blake Miller2-Sep-05 10:53
Blake Miller2-Sep-05 10:53 
AnswerRe: Absent Thread Pin
Gary R. Wheeler3-Sep-05 2:36
Gary R. Wheeler3-Sep-05 2:36 
QuestionWhat do employers mean by .Net experience Pin
Brian R2-Sep-05 9:31
Brian R2-Sep-05 9:31 
AnswerRe: What do employers mean by .Net experience Pin
Chris Losinger2-Sep-05 10:43
professionalChris Losinger2-Sep-05 10:43 
QuestionThreading problem.. Pin
Laing,James2-Sep-05 8:42
Laing,James2-Sep-05 8:42 
AnswerRe: Threading problem.. Pin
Gary R. Wheeler3-Sep-05 2:43
Gary R. Wheeler3-Sep-05 2:43 
GeneralRe: Threading problem.. Pin
Laing,James3-Sep-05 7:27
Laing,James3-Sep-05 7:27 
Question:: operator Pin
celllllllll2-Sep-05 7:47
celllllllll2-Sep-05 7:47 
AnswerRe: :: operator Pin
PJ Arends2-Sep-05 8:26
professionalPJ Arends2-Sep-05 8:26 
GeneralRe: :: operator Pin
celllllllll2-Sep-05 8:50
celllllllll2-Sep-05 8:50 
GeneralRe: :: operator Pin
PJ Arends2-Sep-05 9:03
professionalPJ Arends2-Sep-05 9:03 
GeneralRe: :: operator Pin
celllllllll6-Sep-05 10:28
celllllllll6-Sep-05 10:28 
QuestionCPreviewView Class Pin
mikobi2-Sep-05 7:18
mikobi2-Sep-05 7:18 
AnswerRe: CPreviewView Class Pin
PJ Arends2-Sep-05 8:21
professionalPJ Arends2-Sep-05 8:21 
GeneralRe: CPreviewView Class Pin
mikobi2-Sep-05 20:29
mikobi2-Sep-05 20:29 
GeneralRe: CPreviewView Class Pin
mikobi2-Sep-05 20:43
mikobi2-Sep-05 20:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.