WM BUTTON1DOWN
This message occurs when the operator presses pointer button one.
Syntax
param1 POINTS ptspointerpos; /* Pointer position. */ param2 USHORT fsHitTestres; /* Hit-test result. */ USHORT fsflags; /* Keyboard control codes. */
Parameters
- ptspointerpos (POINTS) - Input
- Pointer position. The pointer position is in window coordinates relative to the bottom-left corner of the window.
- fsHitTestres (USHORT) - Input
- Hit-test result. fsHitTestres provides the hit-test result. It contains the value returned from the hit test process, which determined the window to be associated with this message. For details of the possible values, see WM_HITTEST.
- fsflags (USHORT) - Input
- Keyboard control codes. In addition to the control codes described with the WM_CHAR message, the following keyboard control codes are valid:
- KC_NONE
- Indicates that no key is pressed.
Returns
- rc (BOOL) - returns
- Processed indicator.
- TRUE
- Message processed
- FALSE
- Message ignored.
Remarks
This message is posted to the application queue associated with the window that is to receive the pointer-button information.
It is the responsibility of the application to ensure that the appropriate frame window is activated and that the focus is to the appropriate window, by using the WinSetFocus function. The keyboard control codes specified by flags reflects the keyboard state at the time the mouse message was initiated. This may or may not reflect the current keyboard state.
in Frame Controls
This message is posted to the application queue associated with the window that is to receive the pointer button information.
in Multiline Entry Fields
This message delimits mouse button click events. Between a button-down and a button-up event, the mouse is considered to be dragging. A mouse click is considered to happen on button-down, and dragging is terminated by a button-up.
Mouse Event | Action |
---|---|
Click | Clicking in the text sets the cursor and anchor points to the nearest insertion point. If the MLE is in overtype mode, the anchor is extended one character further in the text, subject to the end-of-text and new-line boundary conditions, defined under WM_CHAR (in Multiline Entry Fields). |
Shift-Click | Clicking while the shift key is held down sets the cursor point to the nearest insertion point, while leaving the anchor point alone. |
Margin Mouse Event | All mouse events in a margin cause the MLE to send a MLN_MARGIN notification to the owner window of the MLE. This message has, as its parameters, the original mouse message. The owner can process the notification or not. If the owner does not process the message, the event is treated as if it occurred on the closest point in the text. |
Default Processing
The default window procedure activates the window using WinSetActiveWindow, and then sets rc to FALSE.
in Frame Controls
The frame control window procedure responds to this message by issuing the WinSetActiveWindow function and sets rc to TRUE. If this is over a part of the window that does not have a frame control, it issues a WinSetActiveWindow function. If the click is over the size border, this window begins tracking by sending a WM_TRACKFRAME message to itself. If the click is not over the size border, this message is passed on.
in Multiline Entry Fields
The default window procedure takes no action on this message, other than to set rc to FALSE.
Related Messages
- WM_BUTTON1DOWN (in Frame Controls)
- WM_BUTTON1DOWN (in Multiline Entry Fields)