Cganging Dialog Box Color
-
Hi, In a MFC dialog Based Application, I want to change the color of the Dialog Box, as soon as it appears on the screen. Can u suggest how to achieve this............. Regs
Override OnEraseBkgnd(CDC* pDC) E.g. #define DLG_BACK_COLOR RGB(255,0,0) BOOL CYourDlg::OnEraseBkgnd(CDC* pDC) { CRect rect; GetClientRect(&rect); CBrush brush(DLG_BACK_COLOR); pDC->FillRect(rect,&brush); return TRUE; } HTH Jetli Constant Thing In World Is Change.
-
Override OnEraseBkgnd(CDC* pDC) E.g. #define DLG_BACK_COLOR RGB(255,0,0) BOOL CYourDlg::OnEraseBkgnd(CDC* pDC) { CRect rect; GetClientRect(&rect); CBrush brush(DLG_BACK_COLOR); pDC->FillRect(rect,&brush); return TRUE; } HTH Jetli Constant Thing In World Is Change.
also handle WM_CTLCOLORSTATIC to give static text boxes the same background color -- Look straight into the light!
-
Hi, In a MFC dialog Based Application, I want to change the color of the Dialog Box, as soon as it appears on the screen. Can u suggest how to achieve this............. Regs
Handle WM_CTLCOLOR message in your Dialog to paint dialog with color of your choice
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
Handle WM_CTLCOLOR message in your Dialog to paint dialog with color of your choice
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
Handle WM_CTLCOLOR message in your Dialog to paint dialog with color of your choice
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV