|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| -
| Header File
| winuser.h
| Unicode
| No
| Platform Notes
| None
|
|
|
WM_CTLCOLORBTN
The WM_CTLCOLORBTN message is sent to the parent window of a button when the
button is about to be drawn. By responding to this message, the parent window
can set a button's text and background colors.
WM_CTLCOLORBTN
hdcButton = (HDC) wParam; // handle of button display context
hwndButton = (HWND) lParam; // handle of button
Parameters
hdcButton
Value of wParam. Identifies the display context for the button.
hwndButton
Value of lParam. Identifies the button.
Return Values
If an application processes this message, it must return the handle of a
brush. Windows uses the brush to paint the background of the button.
Default Action
The DefWindowProc function selects the default system colors for the button.
Remarks
The WM_CTLCOLORBTN message is never sent between threads. It is sent only
within one thread.
The text color of a check box or radio button applies to the box or button,
its check mark, and the text. The focus rectangle for these buttons remains the
system default color (typically black). The text color of a group box applies to
the text but not to the line that defines the box. The text color of a push
button applies only to its focus rectangle; it does not affect the color of the
text.
See Also
DefWindowProc, RealizePalette, SelectPalette, WM_CTLCOLORDLG, WM_CTLCOLOREDIT, WM_CTLCOLORLISTBOX, WM_CTLCOLORMSGBOX, WM_CTLCOLORSCROLLBAR, WM_CTLCOLORSTATIC
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|