How to change Dialog Back ground color
C / C++ / MFC
3
Posts
3
Posters
0
Views
1
Watching
-
Handle WM_ERASEBKGND yourself. In MFC parlance: BOOL CSomeDialog::OnEraseBkgnd(CDC* pDC) { CRect rect; GetClientRect(rect); // yellow ! CBrush brush(RGB(255,255,0)); pDC->FillRect(rect,&brush); // tell the framework we handled this return TRUE; // CDialog::OnEraseBkgnd(pDC); } HTH
-
override OnCtlColor() and return the color of the brush , you want to paint the background. remember to put the flag to CTLCOLOR_DLG bcz u want to change the color of the dialog
[ It is possible to represent everything in this universe by using 0 and 1 ]