How to change the background color of the window
Windows sends a WM_ERASEBKGND message to the window to inform the window erase background, you can use
ClassWizard Reserves the default handler of the message to erase the background (actually painting) and return True to
Prevent Windows Erase Window.
Bool CBoxView :: OneRaseBkGnd (CDC * PDC)
{CBRUSH Brush (RGB (128, 0, 128));
// Select the brush into the device context.
CBRUSH * POLDBRUSH = PDC-> SelectObject (& brush) ;.
CRECT RCCLIP
PDC-> GetClipbox (& RCLIP); // Paint The Area.
PDC-> Patblt (rcclip.left, rcclip.top, rcclip.width (), rcclip.Height (), PATCopy;
PDC-> SELECTOBJECT (POLDBRUSH);
Return True;}