Click here to Skip to main content
15,892,674 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Make client area of dialog transparent, so i can see what is behind the window Pin
Albert Holguin22-May-11 11:02
professionalAlbert Holguin22-May-11 11:02 
GeneralRe: Make client area of dialog transparent, so i can see what is behind the window Pin
manchukuo22-May-11 11:33
manchukuo22-May-11 11:33 
GeneralRe: Make client area of dialog transparent, so i can see what is behind the window Pin
Albert Holguin22-May-11 11:45
professionalAlbert Holguin22-May-11 11:45 
AnswerRe: Make client area of dialog transparent, so i can see what is behind the window Pin
Mark Salsbery22-May-11 12:48
Mark Salsbery22-May-11 12:48 
AnswerRe: Make client area of dialog transparent, so i can see what is behind the window Pin
abhishek.biradar22-May-11 21:53
abhishek.biradar22-May-11 21:53 
AnswerRe: Make client area of dialog transparent, so i can see what is behind the window Pin
Iain Clarke, Warrior Programmer23-May-11 7:00
Iain Clarke, Warrior Programmer23-May-11 7:00 
GeneralRe: Make client area of dialog transparent, so i can see what is behind the window Pin
manchukuo23-May-11 7:11
manchukuo23-May-11 7:11 
GeneralRe: Make client area of dialog transparent, so i can see what is behind the window Pin
Iain Clarke, Warrior Programmer23-May-11 8:02
Iain Clarke, Warrior Programmer23-May-11 8:02 
QuestionKERNELBASE Exception Pin
Joschwenk66622-May-11 9:20
Joschwenk66622-May-11 9:20 
QuestionC++ variable arguments Pin
Sintax122-May-11 5:50
Sintax122-May-11 5:50 
AnswerRe: C++ variable arguments Pin
Luc Pattyn22-May-11 6:02
sitebuilderLuc Pattyn22-May-11 6:02 
GeneralRe: C++ variable arguments Pin
Sintax122-May-11 7:10
Sintax122-May-11 7:10 
GeneralRe: C++ variable arguments Pin
Luc Pattyn22-May-11 7:31
sitebuilderLuc Pattyn22-May-11 7:31 
AnswerRe: C++ variable arguments Pin
Stefan_Lang23-May-11 2:19
Stefan_Lang23-May-11 2:19 
QuestionMultiple threading Pin
includeh1022-May-11 5:07
includeh1022-May-11 5:07 
AnswerRe: Multiple threading Pin
Mark Salsbery22-May-11 5:27
Mark Salsbery22-May-11 5:27 
AnswerRe: Multiple threading Pin
Luc Pattyn22-May-11 6:06
sitebuilderLuc Pattyn22-May-11 6:06 
QuestionCDC::DrawText Not doing as it's told Pin
softwaremonkey22-May-11 1:40
softwaremonkey22-May-11 1:40 
Guys,

I have a problem with CDC::DrawText() and I have been sitting here wasting away my Sunday trying to figure it out. The problem is that it does not draw the text in the position I expect it to be. The following code is supposed to draw a rectangle, then draw the text in the box, using the style (DT_LEFT, DT_CENTER or DT_RIGHT).

CBrush brush(m_background[nIndex]);
CBrush* pOldBrush = pDC->SelectObject(&brush);
pDC->SetBkColor(m_background[nIndex]);
pDC->SetBkMode(OPAQUE);
pDC->SelectStockObject(NULL_PEN);
pDC->Rectangle(m_hitRect);
pDC->SelectObject(pOldBrush);
pDC->SetBkMode(TRANSPARENT);
pDC->DrawText(txt,m_hitRect, m_nStyle | DT_SINGLELINE | DT_VCENTER);


The text appears in the box (but not in the correct position) when I use DT_CENTER or DT_RIGHT but is not drwn at all with DT_LEFT (I think its outside the rect).

Please help, I really should be cutting the grass! Big Grin | :-D

Tony
AnswerRe: CDC::DrawText Not doing as it's told Pin
Richard MacCutchan22-May-11 3:34
mveRichard MacCutchan22-May-11 3:34 
AnswerRe: CDC::DrawText Not doing as it's told Pin
Mark Salsbery22-May-11 3:54
Mark Salsbery22-May-11 3:54 
GeneralRe: CDC::DrawText Not doing as it's told Pin
softwaremonkey22-May-11 4:59
softwaremonkey22-May-11 4:59 
Questionhow to create chm file Pin
MKC00221-May-11 21:30
MKC00221-May-11 21:30 
AnswerRe: how to create chm file Pin
Richard MacCutchan22-May-11 1:36
mveRichard MacCutchan22-May-11 1:36 
AnswerRe: how to create chm file Pin
Hans Dietrich23-May-11 3:55
mentorHans Dietrich23-May-11 3:55 
AnswerRe: how to create chm file Pin
JohnStein6329-May-11 9:37
JohnStein6329-May-11 9:37 

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.