It will be sent to the parent window (in your case the dialog) just before the button is painted. So handle it in your dialog's DlgProc function by creating a brush in the background color that you want, casting it to BOOL and returning it. See MSDN for details.
I create a CPNGButton class to display a button. Using three images to display three different status. No mouse, mouse move, L Button down. CPNGButton is a child class of CStatic. Now if this CPNGButton button is a Minize button, when click this button. After restore the MainFrame, how to restore the minimize button status. Just to how to capture the mouse away from this minimize button?
The MainFrame is showing and the user click the logout button to call login function. The the CLoginForm show, CLoginForm is a no border CDialog, when user click the minimize button of CLoginForm. The CLoginForm is hide, but there is a black block in the left-bottom of the screem. I donot know why this happen.
Last Visit: 31-Dec-99 19:00 Last Update: 28-Mar-15 23:05