Jump to content

WM CONTROL

From EDM2
Revision as of 22:08, 14 May 2024 by Martini (talk | contribs)

This message occurs when a control has a significant event to notify to its owner.

Syntax

param1
     USHORT  id             /*  Control-window identity. */
     USHORT  usnotifycode   /*  Notify code. */

param2
     ULONG   ulcontrolspec  /*  Notify control-specific information. */
in Combination Boxes
param1
     USHORT  usid             /*  Control window identity. */
     USHORT  usnotifycode     /*  Notify code. */

param2
     HWND    hwndcontrolspec  /*  Combination (combo) window handle. */
in Container Controls
 For the cause of this message, see WM_CONTROL.

param1
     USHORT  id          /*  Container control ID. */
     USHORT  notifycode  /*  Notify code. */

param2
     ULONG   notifyinfo  /*  Notify code information. */

Parameters

id (USHORT)
Control-window identity.
This is either the parameter of the WinCreateWindow function or the identity of an item in a dialog template.
usnotifycode (USHORT)
Notify code.
The meaning of the notify code depends on the type of the control. For details, refer to the section describing that control.
CSN_SETFOCUS
This code returns a Boolean indicating whether the circular slider control sending the notification message is gaining or losing the focus.
param2 contains TRUE if the control is gaining the focus.
CSN_CHANGED
This code is sent to notify the application that the circular slider value has been changed.
param2 contains the new value of the circular slider.
CSN_TRACKING
This code is sent to notify the application that the circular slider is being tracked by the mouse.
param2 contain the inter-media value of the circular slider.
Inter-media values are not necessarily contiguous.
CSN_QUERYBACKGROUNDCOLOR
This code gives the application the opportunity to set the background color of the circular slider. CLR_* or SYSCLR_* values can be returned for the background color.
param2 is NULL.
ulcontrolspec (ULONG)
Control-specific information.
The meaning of the control-specific information depends on the type of the control. For details, refer to the section describing that control.
in Combination Boxes
usnotifycode (USHORT)
Notify code.
   CBN_EFCHANGE
       The content of the entry field control has changed, and the change has been displayed on the screen. 

CBN_MEMERROR

       The entry field control cannot allocate the storage necessary to accommodate window text of the length implied by the EM_SETTEXTLIMIT message. 

CBN_EFSCROLL

       The entry field control is about to scroll horizontally. This can happen in these circumstances:
           The application has issued a WinScrollWindow call. 
               The content of the entry field control has changed. 
               The caret has moved. The entry field control must scroll to show the caret position. 

CBN_LBSELECT

An item in the list box control has been selected.

CBN_LBSCROLL

The list box is about to scroll.

CBN_SHOWLIST

The list box is about to be displayed.

CBN_ENTER

The user has depressed the ENTER key or double clicked (single clicked in the case of a drop-down list) on an item in the list box control.
hwndcontrolspec (HWND)
Combination (combo) window handle.
in Container Controls
id (USHORT)
Container control ID.
notifycode (USHORT)
Notify code.
The container control uses the following notification codes. For the complete description of the specified notifycode, see Container Control Notification Codes.
CN_BEGINEDIT
       Container text is about to be edited. 
CN_COLLAPSETREE
       A parent item was collapsed in the tree view. 
CN_CONTEXTMENU
       The container received a WM_CONTEXTMENU message. 
CN_DRAGAFTER
       The container received a DM_DRAGOVER message. The CN_DRAGAFTER notification code is sent only if either the CA_ORDEREDTARGETEMPH or CA_MIXEDTARGETEMPH attribute of the CNRINFO data structure is set and the current view is the name, text, or details view. 
CN_DRAGLEAVE
       The container received a DM_DRAGLEAVE message. 
CN_DRAGOVER
       The container received a DM_DRAGOVER message. The CN_DRAGOVER notification code is sent only if the CA_ORDEREDTARGETEMPH attribute of the CNRINFO data structure is not set or the current view is the icon view or tree view. 
CN_DROP
       The container received a DM_DROP message. 
CN_DROPNOTIFY
       The container received a DM_DROPNOTIFY message. 
CN_DROPHELP
       The container received a DM_DROPHELP message. 
CN_EMPHASIS
       A container record's attributes changed. 
CN_ENDEDIT
       Direct editing of container text has ended. 
CN_ENTER
       The Enter key is pressed while the container window has the focus, or the select button is double-clicked while the pointer is over the container window. 
CN_EXPANDTREE
       A parent item is expanded in the tree view. 
CN_GRIDRESIZED
       The grid was resized. This means there are more or fewer squares than previously, and all the squares are now marked CM_AVAIL. CN_HELP
       The container received a WM_HELP message. 
CN_INITDRAG
       The drag button was pressed and the pointer was moved while the pointer was over the container control. 
CN_KILLFOCUS
       The container is losing the focus. 
CN_PICKUP
       The container received a WM_PICKUP message. 
CN_QUERYDELTA
       Queries for more data when a user scrolls to a preset delta value. 
CN_REALLOCPSZ
       Container text is edited. This message is sent before the CN_ENDEDIT notification code is sent. 
CN_SCROLL
       The container window scrolled. 
CN_SETFOCUS
       The container is receiving the focus. 
notifyinfo (ULONG)
Notify code information.
For the definition of this parameter, see the description of the specified notifycode in Container Control Notification Codes.

Returns

ulReserved (ULONG)
Reserved value, should be 0.

Remarks

This message is sent to the owner of the control, thereby offering it the opportunity to perform some activity before returning to the control.

in Circular Slider Controls
The circular slider control window procedure generates this message and sends it to its owner, informing the owner of this event.
in Combination Boxes
The entry field control window procedure generates this message and sends it to its owner, informing the owner of the event.
in Container Controls
The container control window procedure generates this message and sends it to its owner, informing the owner of this event.

Default Processing

The default window procedure takes no action on this message, other than to set ulReserved to 0.

Related Messages