ID: Q99808
MsgColor.exe is a sample file that demonstrates how to change the background and text color of a message box by subclassing the message box.
MsgColor.exe implements the ColorMessageBox() function, which creates a message box whose background and text color can be changed. The function subclasses the message box and processes WM_CTLCOLOR to modify the colors. Subclassing the message box requires obtaining the window handle of the message box. The window handle is obtained using a WH_CBT hook. The hook is called when the message box is created, and provides access to the window handle.
The following file is available for download from the Microsoft Software Library:
~ Msgcolor.exe (size: 23860 bytes)
For more information about downloading files from the Microsoft Software
Library, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q119591
TITLE : How to Obtain Microsoft Support Files from Online Services
Additional query words:
Keywords : kbfile kbsample kbMessageBox kbGrpUser kbWinOS310
Last Reviewed: December 24, 1998