Click here to Skip to main content
15,917,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: linker problem VS2005 and lua library Pin
prasad_som3-Apr-07 2:33
prasad_som3-Apr-07 2:33 
GeneralRe: linker problem VS2005 and lua library Pin
abac_mefisto3-Apr-07 2:23
abac_mefisto3-Apr-07 2:23 
QuestionHow to paint background of a CWnd derived class? Pin
narayanagvs2-Apr-07 22:56
narayanagvs2-Apr-07 22:56 
QuestionRe: How to paint background of a CWnd derived class? Pin
prasad_som3-Apr-07 0:12
prasad_som3-Apr-07 0:12 
AnswerRe: How to paint background of a CWnd derived class? Pin
Parthi_Appu3-Apr-07 0:28
Parthi_Appu3-Apr-07 0:28 
AnswerRe: How to paint background of a CWnd derived class? Pin
Parthi_Appu3-Apr-07 0:14
Parthi_Appu3-Apr-07 0:14 
GeneralRe: How to paint background of a CWnd derived class? Pin
narayanagvs3-Apr-07 1:10
narayanagvs3-Apr-07 1:10 
GeneralRe: How to paint background of a CWnd derived class? Pin
Parthi_Appu3-Apr-07 1:21
Parthi_Appu3-Apr-07 1:21 
Change the implementation as below

BOOL CClrCatalogWnd::OnEraseBkgnd(CDC* pDC)
{
 if(m_hbrBackground)
   DeleteObject(m_hbrBackground);
 m_hbrBackground = CreateSolidBrush(RGB( m_nSliderPos, m_nSliderPos, m_nSliderPos));
 CRect rc; GetClientRect( rc );
 ::FillRect(pDC->m_hDC, rc, m_hbrBackground);
 return TRUE;
 //return CWnd::OnEraseBkgnd(pDC); /* Don't call the default implementation */
}

narayanagvs wrote:
What to do in OnCtlColor??

if nCtlColor is equal to CTLCOLOR_DLG, then you have to return the HBRUSH to paint the dialog.

It seems that you are changing the background color, depending on the slider value, if so, just return TRUE in OnEraseBkgnd(..) and do the above implementation in OnPaint handler




Do your Duty and Don't expect the Result
Rate this Post, if I helped You

Questionenum and constants Pin
prithaa2-Apr-07 22:26
prithaa2-Apr-07 22:26 
AnswerRe: enum and constants Pin
prasad_som2-Apr-07 22:40
prasad_som2-Apr-07 22:40 
Questiontoolbar resize problem Pin
Try2-Apr-07 21:56
Try2-Apr-07 21:56 
AnswerRe: toolbar resize problem Pin
KaЯl3-Apr-07 5:09
KaЯl3-Apr-07 5:09 
GeneralRe: toolbar resize problem Pin
Try3-Apr-07 19:07
Try3-Apr-07 19:07 
QuestionFunctions and if () Question [modified] Pin
Programm3r2-Apr-07 21:50
Programm3r2-Apr-07 21:50 
AnswerRe: Functions and if () Question Pin
kakan2-Apr-07 22:02
professionalkakan2-Apr-07 22:02 
AnswerRe: Functions and if () Question Pin
CPallini2-Apr-07 22:11
mveCPallini2-Apr-07 22:11 
GeneralRe: Functions and if () Question Pin
kakan2-Apr-07 22:16
professionalkakan2-Apr-07 22:16 
GeneralRe: Functions and if () Question Pin
CPallini2-Apr-07 22:31
mveCPallini2-Apr-07 22:31 
GeneralRe: Functions and if () Question Pin
kakan2-Apr-07 22:43
professionalkakan2-Apr-07 22:43 
QuestionRe: Functions and if () Question Pin
Programm3r2-Apr-07 22:29
Programm3r2-Apr-07 22:29 
AnswerRe: Functions and if () Question Pin
kakan2-Apr-07 22:38
professionalkakan2-Apr-07 22:38 
AnswerRe: Functions and if () Question Pin
CPallini2-Apr-07 22:43
mveCPallini2-Apr-07 22:43 
GeneralRe: Functions and if () Question Pin
cp98763-Apr-07 1:35
cp98763-Apr-07 1:35 
JokeRe: Functions and if () Question Pin
Cedric Moonen2-Apr-07 22:21
Cedric Moonen2-Apr-07 22:21 
GeneralRe: Functions and if () Question Pin
CPallini2-Apr-07 22:34
mveCPallini2-Apr-07 22:34 

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.