The above code will not the desired result.
You need to :
a - Return the brush in CTestDlg::OnCtlColor and not in
CAboutDlg::OnCtlColor.
b - check the nCtlColor parameter, that indicates which
control asks for the brush to paint itself. You should
check for the value that indiactes the Dialog window itself, not one of the child conrols in it (I forgot the value name, you can check it in the Help item of OnCtlColor.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.