SAMPLE: Changing Background and Text Color of Message BoxLast reviewed: February 15, 1996Article ID: Q99808 |
The information in this article applies to:
MSGCOLOR is a file in the Microsoft Software Library that demonstrates how to change the background and text color of a message box by subclassing the message box. The MSGCOLOR sample 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. Download MSGCOLOR.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:
|
Additional reference words: 3.10 softlib MSGCOLOR.EXE
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |