Click here to Skip to main content
15,910,981 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: An struct declared within another struct. Pin
Cedric Moonen12-Feb-09 21:21
Cedric Moonen12-Feb-09 21:21 
QuestionA Question about Buttons Pin
BobInNJ12-Feb-09 14:43
BobInNJ12-Feb-09 14:43 
AnswerRe: A Question about Buttons Pin
Arman S.12-Feb-09 22:38
Arman S.12-Feb-09 22:38 
GeneralRe: A Question about Buttons Pin
BobInNJ13-Feb-09 5:16
BobInNJ13-Feb-09 5:16 
GeneralRe: A Question about Buttons Pin
Arman S.14-Feb-09 0:49
Arman S.14-Feb-09 0:49 
GeneralRe: A Question about Buttons Pin
BobInNJ14-Feb-09 4:47
BobInNJ14-Feb-09 4:47 
GeneralRe: A Question about Buttons Pin
Arman S.14-Feb-09 6:31
Arman S.14-Feb-09 6:31 
GeneralRe: A Question about Buttons Pin
BobInNJ14-Feb-09 6:49
BobInNJ14-Feb-09 6:49 
Arman,

Thanks for the response. I am doing this in a small test application first, to make sure I understand what is going on. Here is what the routine that I used:

<br />
HBRUSH<br />
CMainWindow::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)<br />
{<br />
	HBRUSH hbr = CFrameWnd::OnCtlColor(pDC, pWnd, nCtlColor);<br />
	if (pWnd->GetDlgCtrlID() == 2500 )   {<br />
		// Set the background mode for text to transparent<br />
		pDC->SetBkMode(TRANSPARENT);<br />
	}<br />
	return hbr;<br />
}<br />


The class CMainWindow is the main window of the application. Here is the message map for the class:
<br />
BEGIN_MESSAGE_MAP( CMainWindow, CFrameWnd )<br />
	ON_WM_CREATE()<br />
	ON_WM_CTLCOLOR()<br />
END_MESSAGE_MAP()<br />


The method CMainWindow::OnCtlColor is being called (I verified this with the debugger) and the call
to SetBkMode is happening. However, the background for the button is being changed. I would like
to know either what I am doing wrong, how to debug it, or where to look for some more information.

Thanks

Bob
GeneralRe: A Question about Buttons Pin
Arman S.14-Feb-09 7:09
Arman S.14-Feb-09 7:09 
GeneralRe: A Question about Buttons Pin
BobInNJ14-Feb-09 11:52
BobInNJ14-Feb-09 11:52 
QuestionAbout CComboBox::GetLBText() Pin
Chrissie.ja12-Feb-09 13:58
Chrissie.ja12-Feb-09 13:58 
AnswerRe: About CComboBox::GetLBText() Pin
«_Superman_»12-Feb-09 17:48
professional«_Superman_»12-Feb-09 17:48 
QuestionHow to get this to work correctly :( Pin
edgar 8812-Feb-09 13:52
edgar 8812-Feb-09 13:52 
Questionrand() is not random Pin
includeh1012-Feb-09 13:37
includeh1012-Feb-09 13:37 
AnswerRe: rand() is not random Pin
BobInNJ12-Feb-09 14:50
BobInNJ12-Feb-09 14:50 
AnswerRe: rand() is not random Pin
«_Superman_»12-Feb-09 18:01
professional«_Superman_»12-Feb-09 18:01 
AnswerRe: rand() is not random Pin
Cedric Moonen12-Feb-09 20:23
Cedric Moonen12-Feb-09 20:23 
AnswerRe: rand() is not random Pin
Arman S.12-Feb-09 20:45
Arman S.12-Feb-09 20:45 
AnswerRe: rand() is not random Pin
Stuart Dootson12-Feb-09 22:02
professionalStuart Dootson12-Feb-09 22:02 
AnswerRe: rand() is not random Pin
David Crow13-Feb-09 3:30
David Crow13-Feb-09 3:30 
AnswerRe: rand() is not random Pin
Rajesh R Subramanian13-Feb-09 5:15
professionalRajesh R Subramanian13-Feb-09 5:15 
QuestionTrying to create a pair of check boxes Pin
BobInNJ12-Feb-09 11:33
BobInNJ12-Feb-09 11:33 
AnswerRe: Trying to create a pair of check boxes Pin
Code-o-mat12-Feb-09 11:40
Code-o-mat12-Feb-09 11:40 
AnswerRe: Trying to create a pair of check boxes Pin
Stuart Dootson12-Feb-09 11:43
professionalStuart Dootson12-Feb-09 11:43 
QuestionChanging menus in MDI ( MFC) Pin
Like2Byte12-Feb-09 10:02
Like2Byte12-Feb-09 10:02 

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.