Export (0) Print
Expand All
5 out of 13 rated this helpful - Rate this topic

Static Control

This section contains information about the programming elements used with static controls. A static control is a control that enables an application to provide the user with informational text and graphics that typically require no response.

Overviews

TopicContents
About Static Controls

This topic discusses how static controls are used.

Static Control Styles

Using Static Controls

This topic provides an example that uses a static control.

 

Messages

TopicContents
STM_GETICON

An application sends the STM_GETICON message to retrieve a handle to the icon associated with a static control that has the SS_ICON style.

STM_GETIMAGE

An application sends an STM_GETIMAGE message to retrieve a handle to the image (icon or bitmap) associated with a static control.

STM_SETICON

An application sends the STM_SETICON message to associate an icon with an icon control.

STM_SETIMAGE

An application sends an STM_SETIMAGE message to associate a new image with a static control.

 

Notifications

TopicContents
STN_CLICKED

The STN_CLICKED notification code is sent when the user clicks a static control that has the SS_NOTIFY style. The parent window of the control receives this notification code through the WM_COMMAND message.

STN_DBLCLK

The STN_DBLCLK notification code is sent when the user double-clicks a static control that has the SS_NOTIFY style. The parent window of the control receives this notification code through the WM_COMMAND message.

STN_DISABLE

The STN_DISABLE notification code is sent when a static control is disabled. The static control must have the SS_NOTIFY style to receive this notification code. The parent window of the control receives this notification code through the WM_COMMAND message.

STN_ENABLE

The STN_ENABLE notification code is sent when a static control is enabled. The static control must have the SS_NOTIFY style to receive this notification code. The parent window of the control receives this notification code through the WM_COMMAND message.

WM_CTLCOLORSTATIC

A static control, or an edit control that is read-only or disabled, sends the WM_CTLCOLORSTATIC message to its parent window when the control is about to be drawn. By responding to this message, the parent window can use the specified device context handle to set the text and background colors of the static control.

A window receives this message through its WindowProc function.

 

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.