WM CONTROL: Difference between revisions
Appearance
(9 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
==Syntax== | ==Syntax== | ||
;Default | |||
<PRE> | <PRE> | ||
param1 | param1 | ||
Line 9: | Line 10: | ||
param2 | param2 | ||
ULONG ulcontrolspec /* Notify control-specific information. */ | ULONG ulcontrolspec /* Notify control-specific information. */ | ||
</PRE> | |||
;in Button Controls | |||
<PRE> | |||
param1 | |||
USHORT id /* Button control identity. */ | |||
USHORT usnotifycode /* Notification code. */ | |||
param2 | |||
ULONG flcontrolspec /* Control-specific information. */ | |||
</PRE> | |||
;in Circular Slider Controls) - Syntax | |||
:This message occurs when a control has a significant event to notify to its owner. | |||
<PRE> | |||
param1 | |||
USHORT usID /* Control-window identity. */ | |||
USHORT usnotifycode /* Notification code. */ | |||
param2 | |||
ULONG ulnotifyspec /* Notify control-specific information. */ | |||
</PRE> | </PRE> | ||
Line 45: | Line 67: | ||
</PRE> | </PRE> | ||
;in List Boxes | |||
<PRE> | |||
param1 | |||
USHORT id /* Control-window identity. */ | |||
USHORT usnotifycode /* Notify code. */ | |||
param2 | |||
HWND hwndcontrolspec /* List box control window handle. */ | |||
</PRE> | |||
;in Multiline Entry Fields | |||
<PRE> | |||
param1 | |||
USHORT usid /* Control window identity. */ | |||
USHORT usnotifycode /* Notify code. */ | |||
param2 | |||
ULONG ulOver /* Number of bytes that do not fit. */ | |||
PIX pixOver /* Linear distance of overflow in pels. */ | |||
POVERFLOW pErrInfo /* Overflow error information structure. */ | |||
ULONG ulErrInd /* Clipboard fail flag. */ | |||
PMARGSTRUCT pmrg /* Margin structure. */ | |||
IPT iptSearchedTo /* Current insertion point of search. */ | |||
ULONG ulReserved /* Reserved value, should be 0. */ | |||
returns | |||
BOOL rc /* Action taken by application. */ | |||
ULONG ulReserved /* Reserved value, should be 0. */ | |||
</PRE> | |||
;in Notebook Controls) | |||
<PRE> | |||
param1 | |||
USHORT id /* Control-window identity. */ | |||
USHORT notifycode /* Notify code. */ | |||
param2 | |||
ULONG notifyinfo /* Notify code information. */ | |||
</PRE> | |||
;in Slider Controls | |||
<PRE> | |||
param1 | |||
USHORT id /* Slider control identity. */ | |||
USHORT notifycode /* Notification code. */ | |||
param2 | |||
ULONG notifyinfo /* Control-specific information. */ | |||
</PRE> | |||
;in Spin Button Controls) | |||
<PRE> | |||
param1 | |||
USHORT id /* Identity of the spin button component window. */ | |||
USHORT notifycode /* Notification code. */ | |||
param2 | |||
HWND hwnd /* Window handle. */ | |||
</PRE> | |||
;in Value Set Controls) | |||
<PRE> | |||
param1 | |||
USHORT id /* Value set control identity. */ | |||
USHORT notifycode /* Notify code. */ | |||
param2 | |||
ULONG notifyinfo /* Control-specific information. */ | |||
</PRE> | |||
==Parameters== | ==Parameters== | ||
===Default=== | ===Default=== | ||
;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. | |||
;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. | |||
;ulReserved (ULONG) | |||
:Reserved value, should be 0. | |||
===in Button Controls=== | |||
;id (USHORT) | |||
:Button control identity. | |||
;usnotifycode (USHORT) | |||
:Notification code. | |||
:The notification code BN_PAINT is only generated when the button control has a style of BS_USERBUTTON. | |||
:The button control uses these notification codes: | |||
:;BN_CLICKED | |||
::The button has been pressed. | |||
:;BN_DBLCLICKED | |||
::The button has been double-clicked. | |||
:;BN_PAINT | |||
::The button requires painting, using one of the following draw states: | |||
:;BDS_DISABLED | |||
::The disabled state of the button requires painting. | |||
:;BDS_HILITED | |||
::The highlighted state of the button requires painting. | |||
:;BDS_DEFAULT | |||
::The default state of the button requires painting. | |||
;flcontrolspec (ULONG) | |||
:Control-specific information. | |||
:When usnotifycode is BN_PAINT this parameter is a pointer to a USERBUTTON structure, otherwise this parameter is the window handle of the button control. | |||
===in Circular Slider Controlst=== | |||
;id (USHORT) | ;id (USHORT) | ||
:Control-window identity. | :Control-window identity. | ||
Line 87: | Line 226: | ||
:Notify code. | :Notify code. | ||
:;CBN_EFCHANGE | |||
::The content of the entry field control has changed, and the change has been displayed on the screen. | |||
CBN_MEMERROR | :;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 | :;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 | :;CBN_LBSELECT | ||
::An item in the list box control has been selected. | ::An item in the list box control has been selected. | ||
CBN_LBSCROLL | :;CBN_LBSCROLL | ||
::The list box is about to scroll. | ::The list box is about to scroll. | ||
Line 126: | Line 265: | ||
:;CN_BEGINEDIT | :;CN_BEGINEDIT | ||
::Container text is about to be edited. | |||
:;CN_COLLAPSETREE | :;CN_COLLAPSETREE | ||
::A parent item was collapsed in the tree view. | |||
:;CN_CONTEXTMENU | :;CN_CONTEXTMENU | ||
::The container received a WM_CONTEXTMENU message. | |||
:;CN_DRAGAFTER | :;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 | :;CN_DRAGLEAVE | ||
::The container received a DM_DRAGLEAVE message. | |||
:;CN_DRAGOVER | :;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 | :;CN_DROP | ||
::The container received a DM_DROP message. | |||
:;CN_DROPNOTIFY | :;CN_DROPNOTIFY | ||
::The container received a DM_DROPNOTIFY message. | |||
:;CN_DROPHELP | :;CN_DROPHELP | ||
::The container received a DM_DROPHELP message. | |||
:;CN_EMPHASIS | :;CN_EMPHASIS | ||
::A container record's attributes changed. | |||
:;CN_ENDEDIT | :;CN_ENDEDIT | ||
::Direct editing of container text has ended. | |||
:;CN_ENTER | :;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 | :;CN_EXPANDTREE | ||
::A parent item is expanded in the tree view. | |||
:;CN_GRIDRESIZED | :;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 | :;CN_INITDRAG | ||
::The drag button was pressed and the pointer was moved while the pointer was over the container control. | |||
:;CN_KILLFOCUS | :;CN_KILLFOCUS | ||
::The container is losing the focus. | |||
:;CN_PICKUP | :;CN_PICKUP | ||
::The container received a WM_PICKUP message. | |||
:;CN_QUERYDELTA | :;CN_QUERYDELTA | ||
::Queries for more data when a user scrolls to a preset delta value. | |||
:;CN_REALLOCPSZ | :;CN_REALLOCPSZ | ||
::Container text is edited. This message is sent before the CN_ENDEDIT notification code is sent. | |||
:;CN_SCROLL | :;CN_SCROLL | ||
::The container window scrolled. | |||
:;CN_SETFOCUS | :;CN_SETFOCUS | ||
::The container is receiving the focus. | |||
;notifyinfo (ULONG) | ;notifyinfo (ULONG) | ||
Line 181: | Line 321: | ||
:;EN_CHANGE | :;EN_CHANGE | ||
::The content of the entry field control has changed, and the change has been displayed on the screen. | |||
:;EN_KILLFOCUS | :;EN_KILLFOCUS | ||
::The entry field control is losing the focus. | |||
:;EN_MEMERROR | :;EN_MEMERROR | ||
::The entry field control cannot allocate the storage necessary to accommodate window text of the length implied by the EM_SETTEXTLIMIT message. | |||
:;EN_OVERFLOW | :;EN_OVERFLOW | ||
::The entry field control cannot insert more text than the current text limit. The text limit may be changed with the EM_SETTEXTLIMIT message. | |||
::If the recipient of this message returns TRUE, then the entry field control retries the operation, otherwise it terminates the operation. | |||
:;EN_SCROLL | :;EN_SCROLL | ||
::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. | |||
:;EN_SETFOCUS | :;EN_SETFOCUS | ||
::The entry field control is receiving the focus. | |||
;hwndcontrolspec (HWND) | ;hwndcontrolspec (HWND) | ||
:Entry field control window handle. | :Entry field control window handle. | ||
==in List Boxes== | |||
;id (USHORT) | |||
:Control-window identity. | |||
;usnotifycode (USHORT) | |||
:Notify code. | |||
:The list box control window procedure uses these notification codes: | |||
:;LN_ENTER | |||
::Either the Enter or Return key has been pressed while the list box control has the focus, or the list box control has been double-clicked. | |||
:;LN_KILLFOCUS | |||
::The list box control loses the focus. | |||
:;LN_SCROLL | |||
::The list box control is about to scroll horizontally. This can happen when the application has issued a WinScrollWindow function. | |||
:;LN_SETFOCUS | |||
::The list box control receives the focus. | |||
:;LN_SELECT | |||
::An item is being selected (or deselected). | |||
::Note: To discover the index of the selected item, the application must use the LM_QUERYSELECTION message. | |||
;hwndcontrolspec (HWND) | |||
:List box control window handle. | |||
===in Multiline Entry Fields=== | |||
;usid (USHORT) | |||
;Control window identity. | |||
;usnotifycode (USHORT) | |||
:Notify code. | |||
:;MLN_TEXTOVERFLOW | |||
::A key stroke causes the amount of text to exceed the limit on the number of bytes of data (refer to MLM_SETTEXTLIMIT). The parameter contains the number of bytes of data which would not fit within the current text limit. For character key strokes this can be 1 or 2 (DBCS). For Shift+Ins (paste) it can be any amount up to the paste limit. | |||
::The default rc of FALSE causes the default error handling, which is to ignore the key stroke, and beep. | |||
::An rc of TRUE implies that corrective action has been taken (such as deleting existing text or raising the limit) and the WM_CHAR (in Multiline Entry Fields) should be reprocessed as if just entered. | |||
:;MLN_PIXHORZOVERFLOW | |||
::A key stroke causes the size of the display bit map to exceed the horizontal limit of the format rectangle (refer to MLM_SETFORMATRECT). The parameter contains the number of pels that would not fit within the current text limit. | |||
::The default rc of FALSE causes the default error handling, which is to ignore the key stroke, and beep. | |||
::An rc of TRUE implies that corrective action has been taken (such as changing to a smaller font or raising the limit) and the WM_CHAR (in Multiline Entry Fields) should be reprocessed as if just entered. | |||
:;MLN_PIXVERTOVERFLOW | |||
::A key stroke causes the size of the display bit map to exceed the vertical limit of the format rectangle (refer to MLM_SETFORMATRECT). The parameter contains the number of pels that would not fit within the current text limit. | |||
::The default rc of FALSE causes the default error handling, which is to ignore the key stroke, and beep. | |||
::An rc of TRUE implies that corrective action has been taken (such as changing to a smaller font or raising the limit) and the WM_CHAR (in Multiline Entry Fields) should be reprocessed as if just entered. | |||
:;MLN_OVERFLOW | |||
::An action other than entry of a key stroke causes a condition involving the text limit or format rectangle limit, such that either the limit becomes inadequate to contain the text or the text exceeds the limit. | |||
::This can be caused by: | |||
MLM_SETWRAP MLM_SETTABSTOP | |||
MLM_SETFONT | |||
MLM_IMPORT | |||
MLM_PASTE | |||
MLM_CUT | |||
MLM_UNDO | |||
MLM_DELETE | |||
WM_SIZE. | |||
::;MLN_HSCROLL | |||
:::Indicates that the MLE has completed a scrolling calculation and is about to update the display accordingly. All queries return values as if the scrolling were complete. However, no scrolling action is visible on the user interface. | |||
::;MLN_VSCROLL | |||
:::Indicates that the MLE has completed a scrolling calculation and is about to update the display accordingly. All queries return values as if the scrolling were complete. However, no scrolling action is visible on the user interface. | |||
::;MLN_CHANGE | |||
:::Signals that the text has changed. This notification is sent whenever any text change occurs. | |||
::;MLN_UNDOOVERFLOW | |||
:::Signals that the text change operation, which could normally be undone, cannot be undone because the amount of text involved exceeds the undo capability. This includes text entry, deletion, cutting, and pasting. | |||
::;MLN_CLPBDFAIL | |||
:::Signals that a clipboard operation failed. | |||
::;MLN_MEMERROR | |||
:::Signals that the required storage cannot be obtained. The action that results in the increased storage requirement fails. | |||
::;MLN_SETFOCUS | |||
:::Sent whenever the MLE window receives the input focus. | |||
::;MLN_KILLFOCUS | |||
:::Sent whenever the MLE window loses the input focus. | |||
::;MLN_MARGIN | |||
:::Whenever the user moves the mouse into the left, right top, or bottom margins, this message is sent to the owner of the window. | |||
:::If the owner returns an rc of TRUE, the mouse move is assumed to have been processed by the owner and no further action need be taken. | |||
:::If the owner returns an rc of FALSE, the MLE performs a default action appropriate to each different mouse action. | |||
:::The exceptions to this are all mouse messages that occur after a button-down inside the margin, until and including the matching button-up. Conceptually the drag (button-down until button-up) is a single macro event. Therefore, if FALSE is returned for a button-down event, no further margin notifications are given until after the drag has ended (button-up). | |||
:::Note: If the application receives a notification of button-down in the margin and processes it, it must capture the mouse until the button-up event. | |||
::;MLN_SEARCHPAUSE | |||
:::This notification is sent periodically by the MLE, while an MLM_SEARCH message is being processed, to give an application the opportunity to stop excessively long searches, and to provide search progress information. The owner window can respond either with TRUE or FALSE. FALSE causes the MLE to continue searching; TRUE causes the MLE to stop the search immediately. For further information, see MLM_SEARCH | |||
;ulOver (ULONG) | |||
:Number of bytes that do not fit. | |||
:param2 contains ulOver for a usnotifycode of MLN_TEXTOVERFLOW. | |||
;pixOver (PIX) | |||
:Linear distance of overflow in pels. | |||
:param2 contains pixOver for a usnotifycode of MLN_PIXHORZOVERFLOW or MLN_PIXVERTOVERFLOW. | |||
;pErrInfo (POVERFLOW) | |||
:Overflow error information structure. | |||
:param2 contains pErrInfo for a usnotifycode of MLN_OVERFLOW. | |||
:The afErrInd field of the MLEOVERFLOW structure can take one or more of the following values: | |||
:;MLFEFR_RESIZE | |||
::The window is resized, and the format rectangle is tied to the window size and limited either horizontally, vertically, or both. The implicit change of the format rectangle to the new size does not contain the text. The format rectangle is made static at the previous size, and the MLESFR_MATCHWINDOW style is turned off until set again by the application. This is done in response to a WM_SIZE message, and therefore the multi-line entry field does not forward the return value from this notification message. | |||
:;MLFEFR_TABSTOP | |||
::A tab stop location change is requested, and the text is limited either horizontally, vertically, or both. Changing the tab stops causes the text to exceed the limit. The tab stop change is rejected. | |||
:;MLFEFR_FONT | |||
::A font change is requested, and the text is limited either horizontally, vertically, or both. Changing the font causes the text to exceed the limit. The font change is rejected. | |||
:;MLFEFR_WORDWRAP | |||
::The word-wrap state is requested to be changed, and the text is limited either horizontally, vertically, or both. Wrapping the text differently exceeds the limit, and the request is rejected. This happens in situations where the horizontal limit is not set, there are lines exceeding it, and word-wrap is being changed from off to on, such that it creates soft line breaks resulting in increased vertical size. This happens if word-wrap is being changed from on to off, and there is at least one line created by a soft line-break, such that when that line-break is removed, the full line (up to the hard line break) exceeds the horizontal limit. | |||
:;MLFEFR_TEXT | |||
::Text is changed by MLM_IMPORT, MLM_PASTE, MLM_CUT, MLM_UNDO, or MLM_DELETE, and the text is limited either horizontally, vertically, or both within the format rectangle. The change causes the text to exceed the format rectangle in a dimension that is limited. For example, Delete and EOL joins text from two lines into one line long enough to exceed the horizontal limit. | |||
:;MLFETL_TEXTBYTES | |||
::Text is changed by MLM_IMPORT MLM_PASTE, or MLM_UNDO, and the text is limited to a maximum number of bytes. The change causes the text to exceed that maximum. | |||
;ulErrInd (ULONG) | |||
:Clipboard fail flag. | |||
:param2 contains ulErrInd for a usnotifycode of MLN_CLPBDFAIL. | |||
:;MLFCPBD_TOOMUCHTEXT | |||
:Text amount exceeds clipboard capacity | |||
:;MLFCPBD_CLPBDERROR | |||
:A clipboard error occurred. | |||
;pmrg (PMARGSTRUCT) | |||
:Margin structure. | |||
:param2 contains pmrg for a usnotifycode of MLN_MARGIN. | |||
:The left and right margins are defined as going all the way to the top and bottom such that the top and bottom margins are contained between them. Therefore, the corners are included in the sides. | |||
:usMouMsg contains the mouse message that signals the event. | |||
:iptNear contains the insertion point of the nearest point in the text. For situations where the nearest location is beyond the end of a line, the insertion point for the end of the line is returned. (The EOL character is considered to be beyond the end of the line.) | |||
;iptSearchedTo (IPT) | |||
:Current insertion point of search. | |||
:param2 contains iptSearchedTo for a usnotifycode of MLN_SEARCHPAUSE. | |||
;ulReserved (ULONG) | |||
:Reserved value, should be 0. | |||
:param2 contains ulReserved for a usnotifycode of MLN_HSCROLL, MLN_VSCROLL, MLN_CHANGE, MLN_UNDOOVERFLOW, MLN_MEMERROR, MLN_SETFOCUS, or MLN_KILLFOCUS. | |||
;rc (BOOL) | |||
:Action taken by application. | |||
:ReturnCode contains rc for a usnotifycode of MLN_TEXTOVERFLOW, MLN_PIXHORZOVERFLOW, MLN_PIXVERTOVERFLOW, MLN_MARGIN, or MLN_SEARCHPAUSE. | |||
:;TRUE | |||
::The multiline entry field control assumes that appropriate action has been taken by the application. Appropriate action depends on the MLN_* notification code, and is documented under the usnotifycode field. | |||
:;FALSE | |||
::The multiline entry field control assumes that the application has ignored this WM_CONTROL (in Multiline Entry Fields) message, and takes action appropriate to the MLN_* notification code, as documented under the usnotifycode field. | |||
===in Notebook Controls=== | |||
;id (USHORT) | |||
:Control-window identity. | |||
;notifycode (USHORT) | |||
:Notify code. | |||
:The notebook control uses these notification codes: | |||
:;BKN_HELP | |||
::Indicates the notebook control has received a WM_HELP message. | |||
:;BKN_NEWPAGESIZE | |||
::Indicates the dimensions of the application page window have changed. | |||
:;BKN_PAGEDELETED | |||
::Indicates a page has been deleted from the notebook. | |||
:;BKN_PAGESELECTED | |||
::Indicates a new page has been brought to the top of the notebook. This notification is sent after the page is turned. | |||
:;BKN_PAGESELECTEDPENDING | |||
::Indicates a new page is about to be brought to the top of the notebook. This notification is sent before the page is actually turned. | |||
::If the application does not want the page to be turned, it sets the ulPageIdNew field of the PAGESELECTNOTIFY structure to NULL before returning. | |||
;notifyinfo (ULONG) | |||
:Notify code information. | |||
:The value of this parameter depends on the value of the notifycode parameter. When the value of the notifycode parameter is BKN_HELP, this parameter is the ID of the notebook page (ulPageId) whose tab contains the selection cursor. | |||
:When the value of the notifycode parameter is BKN_PAGESELECTED or BKN_PAGESELECTEDPENDING, this parameter is a pointer to the PAGESELECTNOTIFY structure. | |||
:When the value of the notifycode parameter is BKN_PAGEDELETED, this parameter is a pointer to the DELETENOTIFY structure. | |||
:Otherwise, this parameter is the notebook control window handle. | |||
===in Slider Controls=== | |||
;id (USHORT) | |||
:Slider control identity. | |||
;notifycode (USHORT) | |||
:Notification code. | |||
:The slider control uses these notification codes: | |||
:;SLN_CHANGE | |||
::The slider arm position has changed. | |||
:;SLN_KILLFOCUS | |||
::The slider control is losing the focus. | |||
:;SLN_SETFOCUS | |||
::The slider control is receiving the focus. | |||
:;SLN_SLIDERTRACK | |||
::The slider arm is being dragged, but has not been released. | |||
;notifyinfo (ULONG) | |||
:Control-specific information. | |||
:When the value of the notifycode parameter is SLN_CHANGE or SLN_SLIDERTRACK, this value is the new arm position, expressed as the number of pixels from the home position. | |||
:Otherwise, this value is the window handle (HWND) of the slider control. | |||
==Returns== | ==Returns== | ||
;ulReserved (ULONG) | ;ulReserved (ULONG) | ||
:Reserved value, should be 0. | :Reserved value, should be 0. | ||
===in Multiline Entry Fields=== | |||
;ulReserved (ULONG) | |||
:Reserved value, should be 0. | |||
:ReturnCode contains ulReserved for a usnotifycode of MLN_OVERFLOW, MLN_HSCROLL, MLN_VSCROLL, MLN_CHANGE, MLN_UNDOOVERFLOW, MLN_CLPBDFAIL, MLN_MEMERROR, MLN_SETFOCUS, or MLN_KILLFOCUS. | |||
===in Spin Button Controls=== | |||
;id (USHORT) | |||
:Identity of the spin button component window. | |||
;notifycode (USHORT) | |||
:Notification code. | |||
:;SPBN_UPARROW | |||
::Tells the application that the Up Arrow was clicked on, or the Up Arrow key was pressed. | |||
:;SPBN_DOWNARROW | |||
::Tells the application that the Down Arrow was clicked on, or the Down Arrow key was pressed. | |||
:;SPBN_SETFOCUS | |||
::Tells the application which spin field was selected. | |||
:;SPBN_KILLFOCUS | |||
::Tells the application when the spin field loses focus. | |||
:;SPBN_ENDSPIN | |||
::Tells the application that the user released the select button or one of the arrow keys while spinning a button. | |||
:;SPBN_CHANGE | |||
::Tells the application that the contents of the spin field changed. | |||
;hwnd (HWND) | |||
:Window handle. | |||
:The interpretation of this handle is dependent upon the following notification codes: | |||
:SPBN_UPARROW, SPBN_DOWNARROW, and SPBN_ENDSPIN. | |||
:The param2 parameter is the handle to the currently selected spin field in a particular master-servant setup. If either the Up or Down Arrow is clicked on and none of a spin button's servants are currently selected, the master will return a handle to itself. | |||
:;SPBN_SETFOCUS | |||
::The param2 parameter is the handle of the currently selected spin field. | |||
::This message tells the application which spin field is selected. | |||
:;SPBN_KILLFOCUS | |||
::The param2 parameter is NULLHANDLE if the spin field loses focus or no spin field is currently selected. | |||
::This message tells the application when a spin field loses focus. | |||
::Note: Both SPBN_KILLFOCUS and SPBN_SETFOCUS are set independently. You must check this message only when the application does not specify a master-servant relationship. | |||
:;SPBN_CHANGE | |||
::The param2 parameter is the handle of the spin button in which the spin field text changed. | |||
===in Value Set Controls=== | |||
;id (USHORT) | |||
:Value set control identity. | |||
;notifycode (USHORT) | |||
:Notify code. | |||
:The value set control uses these notification codes: | |||
:;VN_DRAGLEAVE | |||
::The value set receives a DM_DRAGLEAVE message. | |||
:;VN_DRAGOVER | |||
::The value set receives a DM_DRAGOVER message. | |||
:;VN_DROP | |||
::The value set receives a DM_DROP message. The VN_DROP notification code is sent only when an item is dropped on an item that has the VIA_DROPONABLE attribute. | |||
:;VN_DROPHELP | |||
::The value set receives a DM_DROPHELP message. | |||
:;VN_ENTER | |||
::The user presses the Enter key while the value set window has the focus or double-clicks the select button while the pointer is over an item in the value set. | |||
:;VN_HELP | |||
::The value set receives a WM_HELP message. | |||
:;VN_INITDRAG | |||
::The drag button was pressed and the pointer was moved while the pointer was over the value set control. The VN_INITDRAG notification code is sent only for items that have the VIA_DRAGGABLE attribute. | |||
:;VN_KILLFOCUS | |||
::The value set is losing the focus. | |||
:;VN_SELECT | |||
::An item in the value set has been selected and is given selected-state emphasis. | |||
:;VN_SETFOCUS | |||
::The value set receives the focus. | |||
;notifyinfo (ULONG) | |||
:Control-specific information. | |||
:When the value of the notifycode parameter is VN_DRAGOVER, VN_DRAGLEAVE, VN_DROP, or VN_DROPHELP, this parameter is a pointer to a VSDRAGINFO structure. | |||
:When the value of the notifycode parameter is VN_INITDRAG, this parameter is a pointer to a VSDRAGINIT structure. | |||
:When the value of the notifycode parameter is VN_ENTER, VN_HELP, or VN_SELECT, this parameter contains the row and column of the selection cursor. The low-order word contains the row index, and the high-order word contains the column index. | |||
:Otherwise, this parameter is the window handle (HWND) of the value set control. | |||
==Remarks== | ==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. | 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 Button Controls) - Remarks | |||
:The button control generates this message and sends it to its owner, informing the owner of this event, when: | |||
:*Its style is not BS_PUSHBUTTON and the button is pressed. | |||
:*It receives a BM_CLICK message. | |||
:*Its style is BS_USERBUTTON and the button is clicked or double clicked. | |||
;in Circular Slider Controls | ;in Circular Slider Controls | ||
Line 218: | Line 682: | ||
;in Container Controls | ;in Container Controls | ||
:The container control window procedure generates this message and sends it to its owner, informing the owner of this event. | :The container control window procedure generates this message and sends it to its owner, informing the owner of this event. | ||
;in Entry Fields | |||
:The entry field control window procedure generates this message and sends it to its owner, informing the owner of the event. | |||
;in Language Support Dialog | |||
:The Language Support Dialog Procedure responds to this message by issuing the WinDefDlgProc function, then posting a WM_PCONTROL message to the application queue and setting ulReserved to the result of the WinDefDlgProc function. | |||
;in Language Support Window | |||
:The Language Support Window Procedure responds to this message by posting a WM_PCONTROL message to the application queue and setting ulReserved to 0. | |||
;in List Boxes | |||
:The list box control window procedure generates this message and sends it to its owner, informing the owner of this event. | |||
;in Multiline Entry Fields | |||
: The multiline entry field control window procedure generates this message and sends it to its owner, informing the owner of the event. | |||
;in Notebook Controls) | |||
:The notebook control window procedure generates this message and sends it to its owner, informing the owner of this event. | |||
:param2 depends on the MLN_* notification code. | |||
;in Slider Controls | |||
:The slider control window procedure generates this message and sends it to its owner, informing the owner of this event. | |||
;in Spin Button Controls) | |||
:This message is sent when, as specified by notifycode, the spin button component must tell its owner of a significant event. | |||
;in Value Set Controls) | |||
:The value set control window procedure generates this message and sends it to its owner, informing the owner of this event. | |||
==Default Processing== | ==Default Processing== | ||
Line 224: | Line 716: | ||
==Related Messages== | ==Related Messages== | ||
[[Category:Messages]] |
Latest revision as of 02:38, 15 May 2024
This message occurs when a control has a significant event to notify to its owner.
Syntax
- Default
param1 USHORT id /* Control-window identity. */ USHORT usnotifycode /* Notify code. */ param2 ULONG ulcontrolspec /* Notify control-specific information. */
- in Button Controls
param1 USHORT id /* Button control identity. */ USHORT usnotifycode /* Notification code. */ param2 ULONG flcontrolspec /* Control-specific information. */
- in Circular Slider Controls) - Syntax
- This message occurs when a control has a significant event to notify to its owner.
param1 USHORT usID /* Control-window identity. */ USHORT usnotifycode /* Notification code. */ param2 ULONG ulnotifyspec /* 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. */
- in Entry Fields
param1 USHORT id /* Control window identity. */ USHORT usnotifycode /* Notify code. */ param2 HWND hwndcontrolspec /* Entry field control window handle. */
- in List Boxes
param1 USHORT id /* Control-window identity. */ USHORT usnotifycode /* Notify code. */ param2 HWND hwndcontrolspec /* List box control window handle. */
- in Multiline Entry Fields
param1 USHORT usid /* Control window identity. */ USHORT usnotifycode /* Notify code. */ param2 ULONG ulOver /* Number of bytes that do not fit. */ PIX pixOver /* Linear distance of overflow in pels. */ POVERFLOW pErrInfo /* Overflow error information structure. */ ULONG ulErrInd /* Clipboard fail flag. */ PMARGSTRUCT pmrg /* Margin structure. */ IPT iptSearchedTo /* Current insertion point of search. */ ULONG ulReserved /* Reserved value, should be 0. */ returns BOOL rc /* Action taken by application. */ ULONG ulReserved /* Reserved value, should be 0. */
- in Notebook Controls)
param1 USHORT id /* Control-window identity. */ USHORT notifycode /* Notify code. */ param2 ULONG notifyinfo /* Notify code information. */
- in Slider Controls
param1 USHORT id /* Slider control identity. */ USHORT notifycode /* Notification code. */ param2 ULONG notifyinfo /* Control-specific information. */
- in Spin Button Controls)
param1 USHORT id /* Identity of the spin button component window. */ USHORT notifycode /* Notification code. */ param2 HWND hwnd /* Window handle. */
- in Value Set Controls)
param1 USHORT id /* Value set control identity. */ USHORT notifycode /* Notify code. */ param2 ULONG notifyinfo /* Control-specific information. */
Parameters
Default
- 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.
- 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.
- ulReserved (ULONG)
- Reserved value, should be 0.
in Button Controls
- id (USHORT)
- Button control identity.
- usnotifycode (USHORT)
- Notification code.
- The notification code BN_PAINT is only generated when the button control has a style of BS_USERBUTTON.
- The button control uses these notification codes:
- BN_CLICKED
- The button has been pressed.
- BN_DBLCLICKED
- The button has been double-clicked.
- BN_PAINT
- The button requires painting, using one of the following draw states:
- BDS_DISABLED
- The disabled state of the button requires painting.
- BDS_HILITED
- The highlighted state of the button requires painting.
- BDS_DEFAULT
- The default state of the button requires painting.
- flcontrolspec (ULONG)
- Control-specific information.
- When usnotifycode is BN_PAINT this parameter is a pointer to a USERBUTTON structure, otherwise this parameter is the window handle of the button control.
in Circular Slider Controlst
- 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.
- The application has issued a WinScrollWindow call.
- 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.
in Entry Fields
- id (USHORT)
- Control window identity.
- usnotifycode (USHORT)
- Notify code.
- EN_CHANGE
- The content of the entry field control has changed, and the change has been displayed on the screen.
- EN_KILLFOCUS
- The entry field control is losing the focus.
- EN_MEMERROR
- The entry field control cannot allocate the storage necessary to accommodate window text of the length implied by the EM_SETTEXTLIMIT message.
- EN_OVERFLOW
- The entry field control cannot insert more text than the current text limit. The text limit may be changed with the EM_SETTEXTLIMIT message.
- If the recipient of this message returns TRUE, then the entry field control retries the operation, otherwise it terminates the operation.
- EN_SCROLL
- 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.
- The application has issued a WinScrollWindow call
- EN_SETFOCUS
- The entry field control is receiving the focus.
- hwndcontrolspec (HWND)
- Entry field control window handle.
in List Boxes
- id (USHORT)
- Control-window identity.
- usnotifycode (USHORT)
- Notify code.
- The list box control window procedure uses these notification codes:
- LN_ENTER
- Either the Enter or Return key has been pressed while the list box control has the focus, or the list box control has been double-clicked.
- LN_KILLFOCUS
- The list box control loses the focus.
- LN_SCROLL
- The list box control is about to scroll horizontally. This can happen when the application has issued a WinScrollWindow function.
- LN_SETFOCUS
- The list box control receives the focus.
- LN_SELECT
- An item is being selected (or deselected).
- Note: To discover the index of the selected item, the application must use the LM_QUERYSELECTION message.
- hwndcontrolspec (HWND)
- List box control window handle.
in Multiline Entry Fields
- usid (USHORT)
- Control window identity.
- usnotifycode (USHORT)
- Notify code.
- MLN_TEXTOVERFLOW
- A key stroke causes the amount of text to exceed the limit on the number of bytes of data (refer to MLM_SETTEXTLIMIT). The parameter contains the number of bytes of data which would not fit within the current text limit. For character key strokes this can be 1 or 2 (DBCS). For Shift+Ins (paste) it can be any amount up to the paste limit.
- The default rc of FALSE causes the default error handling, which is to ignore the key stroke, and beep.
- An rc of TRUE implies that corrective action has been taken (such as deleting existing text or raising the limit) and the WM_CHAR (in Multiline Entry Fields) should be reprocessed as if just entered.
- MLN_PIXHORZOVERFLOW
- A key stroke causes the size of the display bit map to exceed the horizontal limit of the format rectangle (refer to MLM_SETFORMATRECT). The parameter contains the number of pels that would not fit within the current text limit.
- The default rc of FALSE causes the default error handling, which is to ignore the key stroke, and beep.
- An rc of TRUE implies that corrective action has been taken (such as changing to a smaller font or raising the limit) and the WM_CHAR (in Multiline Entry Fields) should be reprocessed as if just entered.
- MLN_PIXVERTOVERFLOW
- A key stroke causes the size of the display bit map to exceed the vertical limit of the format rectangle (refer to MLM_SETFORMATRECT). The parameter contains the number of pels that would not fit within the current text limit.
- The default rc of FALSE causes the default error handling, which is to ignore the key stroke, and beep.
- An rc of TRUE implies that corrective action has been taken (such as changing to a smaller font or raising the limit) and the WM_CHAR (in Multiline Entry Fields) should be reprocessed as if just entered.
- MLN_OVERFLOW
- An action other than entry of a key stroke causes a condition involving the text limit or format rectangle limit, such that either the limit becomes inadequate to contain the text or the text exceeds the limit.
- This can be caused by:
MLM_SETWRAP MLM_SETTABSTOP MLM_SETFONT MLM_IMPORT MLM_PASTE MLM_CUT MLM_UNDO MLM_DELETE WM_SIZE.
- MLN_HSCROLL
- Indicates that the MLE has completed a scrolling calculation and is about to update the display accordingly. All queries return values as if the scrolling were complete. However, no scrolling action is visible on the user interface.
- MLN_VSCROLL
- Indicates that the MLE has completed a scrolling calculation and is about to update the display accordingly. All queries return values as if the scrolling were complete. However, no scrolling action is visible on the user interface.
- MLN_CHANGE
- Signals that the text has changed. This notification is sent whenever any text change occurs.
- MLN_UNDOOVERFLOW
- Signals that the text change operation, which could normally be undone, cannot be undone because the amount of text involved exceeds the undo capability. This includes text entry, deletion, cutting, and pasting.
- MLN_CLPBDFAIL
- Signals that a clipboard operation failed.
- MLN_MEMERROR
- Signals that the required storage cannot be obtained. The action that results in the increased storage requirement fails.
- MLN_SETFOCUS
- Sent whenever the MLE window receives the input focus.
- MLN_KILLFOCUS
- Sent whenever the MLE window loses the input focus.
- MLN_MARGIN
- Whenever the user moves the mouse into the left, right top, or bottom margins, this message is sent to the owner of the window.
- If the owner returns an rc of TRUE, the mouse move is assumed to have been processed by the owner and no further action need be taken.
- If the owner returns an rc of FALSE, the MLE performs a default action appropriate to each different mouse action.
- The exceptions to this are all mouse messages that occur after a button-down inside the margin, until and including the matching button-up. Conceptually the drag (button-down until button-up) is a single macro event. Therefore, if FALSE is returned for a button-down event, no further margin notifications are given until after the drag has ended (button-up).
- Note: If the application receives a notification of button-down in the margin and processes it, it must capture the mouse until the button-up event.
- MLN_SEARCHPAUSE
- This notification is sent periodically by the MLE, while an MLM_SEARCH message is being processed, to give an application the opportunity to stop excessively long searches, and to provide search progress information. The owner window can respond either with TRUE or FALSE. FALSE causes the MLE to continue searching; TRUE causes the MLE to stop the search immediately. For further information, see MLM_SEARCH
- ulOver (ULONG)
- Number of bytes that do not fit.
- param2 contains ulOver for a usnotifycode of MLN_TEXTOVERFLOW.
- pixOver (PIX)
- Linear distance of overflow in pels.
- param2 contains pixOver for a usnotifycode of MLN_PIXHORZOVERFLOW or MLN_PIXVERTOVERFLOW.
- pErrInfo (POVERFLOW)
- Overflow error information structure.
- param2 contains pErrInfo for a usnotifycode of MLN_OVERFLOW.
- The afErrInd field of the MLEOVERFLOW structure can take one or more of the following values:
- MLFEFR_RESIZE
- The window is resized, and the format rectangle is tied to the window size and limited either horizontally, vertically, or both. The implicit change of the format rectangle to the new size does not contain the text. The format rectangle is made static at the previous size, and the MLESFR_MATCHWINDOW style is turned off until set again by the application. This is done in response to a WM_SIZE message, and therefore the multi-line entry field does not forward the return value from this notification message.
- MLFEFR_TABSTOP
- A tab stop location change is requested, and the text is limited either horizontally, vertically, or both. Changing the tab stops causes the text to exceed the limit. The tab stop change is rejected.
- MLFEFR_FONT
- A font change is requested, and the text is limited either horizontally, vertically, or both. Changing the font causes the text to exceed the limit. The font change is rejected.
- MLFEFR_WORDWRAP
- The word-wrap state is requested to be changed, and the text is limited either horizontally, vertically, or both. Wrapping the text differently exceeds the limit, and the request is rejected. This happens in situations where the horizontal limit is not set, there are lines exceeding it, and word-wrap is being changed from off to on, such that it creates soft line breaks resulting in increased vertical size. This happens if word-wrap is being changed from on to off, and there is at least one line created by a soft line-break, such that when that line-break is removed, the full line (up to the hard line break) exceeds the horizontal limit.
- MLFEFR_TEXT
- Text is changed by MLM_IMPORT, MLM_PASTE, MLM_CUT, MLM_UNDO, or MLM_DELETE, and the text is limited either horizontally, vertically, or both within the format rectangle. The change causes the text to exceed the format rectangle in a dimension that is limited. For example, Delete and EOL joins text from two lines into one line long enough to exceed the horizontal limit.
- MLFETL_TEXTBYTES
- Text is changed by MLM_IMPORT MLM_PASTE, or MLM_UNDO, and the text is limited to a maximum number of bytes. The change causes the text to exceed that maximum.
- ulErrInd (ULONG)
- Clipboard fail flag.
- param2 contains ulErrInd for a usnotifycode of MLN_CLPBDFAIL.
- MLFCPBD_TOOMUCHTEXT
- Text amount exceeds clipboard capacity
- MLFCPBD_CLPBDERROR
- A clipboard error occurred.
- pmrg (PMARGSTRUCT)
- Margin structure.
- param2 contains pmrg for a usnotifycode of MLN_MARGIN.
- The left and right margins are defined as going all the way to the top and bottom such that the top and bottom margins are contained between them. Therefore, the corners are included in the sides.
- usMouMsg contains the mouse message that signals the event.
- iptNear contains the insertion point of the nearest point in the text. For situations where the nearest location is beyond the end of a line, the insertion point for the end of the line is returned. (The EOL character is considered to be beyond the end of the line.)
- iptSearchedTo (IPT)
- Current insertion point of search.
- param2 contains iptSearchedTo for a usnotifycode of MLN_SEARCHPAUSE.
- ulReserved (ULONG)
- Reserved value, should be 0.
- param2 contains ulReserved for a usnotifycode of MLN_HSCROLL, MLN_VSCROLL, MLN_CHANGE, MLN_UNDOOVERFLOW, MLN_MEMERROR, MLN_SETFOCUS, or MLN_KILLFOCUS.
- rc (BOOL)
- Action taken by application.
- ReturnCode contains rc for a usnotifycode of MLN_TEXTOVERFLOW, MLN_PIXHORZOVERFLOW, MLN_PIXVERTOVERFLOW, MLN_MARGIN, or MLN_SEARCHPAUSE.
- TRUE
- The multiline entry field control assumes that appropriate action has been taken by the application. Appropriate action depends on the MLN_* notification code, and is documented under the usnotifycode field.
- FALSE
- The multiline entry field control assumes that the application has ignored this WM_CONTROL (in Multiline Entry Fields) message, and takes action appropriate to the MLN_* notification code, as documented under the usnotifycode field.
in Notebook Controls
- id (USHORT)
- Control-window identity.
- notifycode (USHORT)
- Notify code.
- The notebook control uses these notification codes:
- BKN_HELP
- Indicates the notebook control has received a WM_HELP message.
- BKN_NEWPAGESIZE
- Indicates the dimensions of the application page window have changed.
- BKN_PAGEDELETED
- Indicates a page has been deleted from the notebook.
- BKN_PAGESELECTED
- Indicates a new page has been brought to the top of the notebook. This notification is sent after the page is turned.
- BKN_PAGESELECTEDPENDING
- Indicates a new page is about to be brought to the top of the notebook. This notification is sent before the page is actually turned.
- If the application does not want the page to be turned, it sets the ulPageIdNew field of the PAGESELECTNOTIFY structure to NULL before returning.
- notifyinfo (ULONG)
- Notify code information.
- The value of this parameter depends on the value of the notifycode parameter. When the value of the notifycode parameter is BKN_HELP, this parameter is the ID of the notebook page (ulPageId) whose tab contains the selection cursor.
- When the value of the notifycode parameter is BKN_PAGESELECTED or BKN_PAGESELECTEDPENDING, this parameter is a pointer to the PAGESELECTNOTIFY structure.
- When the value of the notifycode parameter is BKN_PAGEDELETED, this parameter is a pointer to the DELETENOTIFY structure.
- Otherwise, this parameter is the notebook control window handle.
in Slider Controls
- id (USHORT)
- Slider control identity.
- notifycode (USHORT)
- Notification code.
- The slider control uses these notification codes:
- SLN_CHANGE
- The slider arm position has changed.
- SLN_KILLFOCUS
- The slider control is losing the focus.
- SLN_SETFOCUS
- The slider control is receiving the focus.
- SLN_SLIDERTRACK
- The slider arm is being dragged, but has not been released.
- notifyinfo (ULONG)
- Control-specific information.
- When the value of the notifycode parameter is SLN_CHANGE or SLN_SLIDERTRACK, this value is the new arm position, expressed as the number of pixels from the home position.
- Otherwise, this value is the window handle (HWND) of the slider control.
Returns
- ulReserved (ULONG)
- Reserved value, should be 0.
in Multiline Entry Fields
- ulReserved (ULONG)
- Reserved value, should be 0.
- ReturnCode contains ulReserved for a usnotifycode of MLN_OVERFLOW, MLN_HSCROLL, MLN_VSCROLL, MLN_CHANGE, MLN_UNDOOVERFLOW, MLN_CLPBDFAIL, MLN_MEMERROR, MLN_SETFOCUS, or MLN_KILLFOCUS.
in Spin Button Controls
- id (USHORT)
- Identity of the spin button component window.
- notifycode (USHORT)
- Notification code.
- SPBN_UPARROW
- Tells the application that the Up Arrow was clicked on, or the Up Arrow key was pressed.
- SPBN_DOWNARROW
- Tells the application that the Down Arrow was clicked on, or the Down Arrow key was pressed.
- SPBN_SETFOCUS
- Tells the application which spin field was selected.
- SPBN_KILLFOCUS
- Tells the application when the spin field loses focus.
- SPBN_ENDSPIN
- Tells the application that the user released the select button or one of the arrow keys while spinning a button.
- SPBN_CHANGE
- Tells the application that the contents of the spin field changed.
- hwnd (HWND)
- Window handle.
- The interpretation of this handle is dependent upon the following notification codes:
- SPBN_UPARROW, SPBN_DOWNARROW, and SPBN_ENDSPIN.
- The param2 parameter is the handle to the currently selected spin field in a particular master-servant setup. If either the Up or Down Arrow is clicked on and none of a spin button's servants are currently selected, the master will return a handle to itself.
- SPBN_SETFOCUS
- The param2 parameter is the handle of the currently selected spin field.
- This message tells the application which spin field is selected.
- SPBN_KILLFOCUS
- The param2 parameter is NULLHANDLE if the spin field loses focus or no spin field is currently selected.
- This message tells the application when a spin field loses focus.
- Note: Both SPBN_KILLFOCUS and SPBN_SETFOCUS are set independently. You must check this message only when the application does not specify a master-servant relationship.
- SPBN_CHANGE
- The param2 parameter is the handle of the spin button in which the spin field text changed.
in Value Set Controls
- id (USHORT)
- Value set control identity.
- notifycode (USHORT)
- Notify code.
- The value set control uses these notification codes:
- VN_DRAGLEAVE
- The value set receives a DM_DRAGLEAVE message.
- VN_DRAGOVER
- The value set receives a DM_DRAGOVER message.
- VN_DROP
- The value set receives a DM_DROP message. The VN_DROP notification code is sent only when an item is dropped on an item that has the VIA_DROPONABLE attribute.
- VN_DROPHELP
- The value set receives a DM_DROPHELP message.
- VN_ENTER
- The user presses the Enter key while the value set window has the focus or double-clicks the select button while the pointer is over an item in the value set.
- VN_HELP
- The value set receives a WM_HELP message.
- VN_INITDRAG
- The drag button was pressed and the pointer was moved while the pointer was over the value set control. The VN_INITDRAG notification code is sent only for items that have the VIA_DRAGGABLE attribute.
- VN_KILLFOCUS
- The value set is losing the focus.
- VN_SELECT
- An item in the value set has been selected and is given selected-state emphasis.
- VN_SETFOCUS
- The value set receives the focus.
- notifyinfo (ULONG)
- Control-specific information.
- When the value of the notifycode parameter is VN_DRAGOVER, VN_DRAGLEAVE, VN_DROP, or VN_DROPHELP, this parameter is a pointer to a VSDRAGINFO structure.
- When the value of the notifycode parameter is VN_INITDRAG, this parameter is a pointer to a VSDRAGINIT structure.
- When the value of the notifycode parameter is VN_ENTER, VN_HELP, or VN_SELECT, this parameter contains the row and column of the selection cursor. The low-order word contains the row index, and the high-order word contains the column index.
- Otherwise, this parameter is the window handle (HWND) of the value set control.
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 Button Controls) - Remarks
- The button control generates this message and sends it to its owner, informing the owner of this event, when:
- Its style is not BS_PUSHBUTTON and the button is pressed.
- It receives a BM_CLICK message.
- Its style is BS_USERBUTTON and the button is clicked or double clicked.
- 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.
- in Entry Fields
- The entry field control window procedure generates this message and sends it to its owner, informing the owner of the event.
- in Language Support Dialog
- The Language Support Dialog Procedure responds to this message by issuing the WinDefDlgProc function, then posting a WM_PCONTROL message to the application queue and setting ulReserved to the result of the WinDefDlgProc function.
- in Language Support Window
- The Language Support Window Procedure responds to this message by posting a WM_PCONTROL message to the application queue and setting ulReserved to 0.
- in List Boxes
- The list box control window procedure generates this message and sends it to its owner, informing the owner of this event.
- in Multiline Entry Fields
- The multiline entry field control window procedure generates this message and sends it to its owner, informing the owner of the event.
- in Notebook Controls)
- The notebook control window procedure generates this message and sends it to its owner, informing the owner of this event.
- param2 depends on the MLN_* notification code.
- in Slider Controls
- The slider control window procedure generates this message and sends it to its owner, informing the owner of this event.
- in Spin Button Controls)
- This message is sent when, as specified by notifycode, the spin button component must tell its owner of a significant event.
- in Value Set Controls)
- The value set 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.