The information in this article applies to:
SUMMARYMDISubCl.exe demonstrates how to alter the default background color of an MDI client window by subclassing the MDI client window procedure and processing the WM_ERASEBKGND message. All other messages are passed to the original MDI client window procedure. Normally, a multiple-document interface (MDI) client window defines its background color to be the system color value COLOR_BACKGROUND+1, which is defined in the Windows SDK file WINDOWS.H. This value corresponds to the window background color defined by the user in the Control Panel. MORE INFORMATIONThe following files are available for download from the Microsoft
Download Center. Click the file names below to download the files: http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. During processing of the WM_ERASEBKGND message, the class word that defines the MDI client's background color is altered using the SetClassWord() function. Then, control is passed to the original MDI client window procedure to paint and update the window. When control returns from the original MDI client window procedure, the MDI client's class word that defines the background color is set back to its original value so that other MDI applications currently running are not affected. The following sample code from MDISubCl.exe is a sample window procedure that you can use to subclass the default MDI client window procedure:
Additional query words:
Keywords : kbcode kbfile kbsample kbMDI kbWinOS2000 kbGrpUser kbWinOS310 kbWndw kbWinOS300 |
Last Reviewed: January 27, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |