Click here to Skip to main content
15,908,172 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAdding a new item to Open With sub menu in context menu of explorer Pin
Deepu Antony11-Feb-10 1:26
Deepu Antony11-Feb-10 1:26 
AnswerRe: Adding a new item to Open With sub menu in context menu of explorer Pin
Graham Breach11-Feb-10 2:43
Graham Breach11-Feb-10 2:43 
GeneralRe: Adding a new item to Open With sub menu in context menu of explorer Pin
Deepu Antony11-Feb-10 19:04
Deepu Antony11-Feb-10 19:04 
QuestionSendMessage Pin
john563211-Feb-10 0:26
john563211-Feb-10 0:26 
AnswerRe: SendMessage Pin
CPallini11-Feb-10 0:39
mveCPallini11-Feb-10 0:39 
AnswerRe: SendMessage Pin
Richard MacCutchan11-Feb-10 0:40
mveRichard MacCutchan11-Feb-10 0:40 
AnswerRe: SendMessage Pin
Rajesh R Subramanian11-Feb-10 1:28
professionalRajesh R Subramanian11-Feb-10 1:28 
QuestionDAO Excute Method Error on Contratint Pin
A&Ms11-Feb-10 0:19
A&Ms11-Feb-10 0:19 
QuestionRe: DAO Excute Method Error on Contratint Pin
CPallini11-Feb-10 0:29
mveCPallini11-Feb-10 0:29 
AnswerRe: DAO Excute Method Error on Contratint Pin
A&Ms11-Feb-10 2:16
A&Ms11-Feb-10 2:16 
QuestionWatermark printing Pin
Harsh Shankar11-Feb-10 0:09
Harsh Shankar11-Feb-10 0:09 
AnswerRe: Watermark printing Pin
Richard MacCutchan11-Feb-10 0:42
mveRichard MacCutchan11-Feb-10 0:42 
GeneralRe: Watermark printing Pin
Harsh Shankar11-Feb-10 0:55
Harsh Shankar11-Feb-10 0:55 
GeneralRe: Watermark printing [modified] Pin
loyal ginger11-Feb-10 1:20
loyal ginger11-Feb-10 1:20 
You can draw the superimposed text last, using a mode that only draws the text but keep the background transparent. SetBkMode(TRANSPARENT) will do the trick.

The above superimposed text will block whatever behind it because the superimposed text is opaque. To make a true superimposed text, you have to make them semi-transparent. To achieve this, you need to use a certain way to blend the text to the existing drawings. This is more complicated. You may need to create a couple of image buffers to conduct these operations, and print the final result.

-modification-

As Richard MacCutchan pointed out, you can print your superimposed text first, then render everything else. When you render text, make sure the background mode is set to transparent. That way, only the text itself is rendered, the background will be see-through.

Your problem is probably caused by the fact that the background mode is not set to transparent. Check the documentation out: http://msdn.microsoft.com/en-us/library/dd162965(VS.85).aspx[^]
modified on Thursday, February 11, 2010 9:37 AM

GeneralRe: Watermark printing Pin
Richard MacCutchan11-Feb-10 1:44
mveRichard MacCutchan11-Feb-10 1:44 
QuestionReccommended Debugger for PE inspection ? [modified] Pin
glitteringsound11-Feb-10 0:04
glitteringsound11-Feb-10 0:04 
AnswerRe: Reccommended Debugger for PE inspection ? Pin
Richard Andrew x6411-Feb-10 8:55
professionalRichard Andrew x6411-Feb-10 8:55 
QuestionHow to add a Horizontal Scroll Bar to CListBox Pin
pandit8410-Feb-10 23:33
pandit8410-Feb-10 23:33 
QuestionRe: How to add a Horizontal Scroll Bar to CListBox Pin
David Crow11-Feb-10 2:46
David Crow11-Feb-10 2:46 
AnswerRe: How to add a Horizontal Scroll Bar to CListBox Pin
BIJU Manjeri15-Feb-10 18:29
BIJU Manjeri15-Feb-10 18:29 
GeneralRe: How to add a Horizontal Scroll Bar to CListBox Pin
pandit8415-Feb-10 20:35
pandit8415-Feb-10 20:35 
GeneralRegarding MFC Pin
kirancgi10-Feb-10 23:27
kirancgi10-Feb-10 23:27 
QuestionRegarding MFC Pin
kirancgi10-Feb-10 23:25
kirancgi10-Feb-10 23:25 
AnswerRe: Regarding MFC Pin
«_Superman_»10-Feb-10 23:36
professional«_Superman_»10-Feb-10 23:36 
AnswerRe: Regarding MFC Pin
CPallini10-Feb-10 23:51
mveCPallini10-Feb-10 23:51 

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.