HOWTO: Gray Text of Subclassed Button or Static Text Control

ID: Q39480


The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK)
  • Microsoft Win32 Software Development Kit (SDK)
  • Microsoft Windows 2000


SUMMARY

A control is a child window that is responsible for processing keyboard, mouse, focus, and activation messages, among others. A control paints itself and processes text strings. The color of the text in a button or static text control is automatically changed to gray when the control is disabled with the EnableWindow function. However, If an application subclasses a control to process WM_PAINT messages for the control, the application can use the GrayString function to change the text color.

Additional query words:

Keywords : kbButton kbCtrl kbNTOS kbStaticCtrl kbGrpUser kbWinOS
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: February 1, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.