POINT KeySelection(lpPntStruc, StartType, Mfunc) | |||
LPEXTPAINTSTRUC lpPntStruc; | |||
WORD StartType; | |||
WORD Mfunc; |
The KeySelection function moves the start or end point of the selection rectangle and returns that point's new location.
lpPntStruc
Points to an EXTPAINTSTRUC structure.
StartType
Specifies whether the SHIFT key is up or down. The StartType parameter is zero if the key is up, and nonzero if the key down.
Mfunc
Specifies the direction to move the selection point. This parameter can be one of the following values.
Value | Meaning |
0 | Move right. |
1 | Move left. |
2 | Move down. |
3 | Move up. |
The return value is a POINT structure containing the x-and y-coordinates of the new selection start or end point.
The export ordinal for this function is 4.
WINOLDAP calls the KeySelection function whenever the user presses an arrow key or a SHIFT+arrow key combination. If an arrow key is pressed, the function moves the current start point left, right, up, or down as specified by the Mfunc parameter. If a SHIFT+arrow key combination is pressed, the function moves the current end point in the specified direction.
The amount the function moves the point depends on the display mode. In text mode, the function moves by the width and height of the current font. In graphics mode, the function moves by a width and height that is reasonable for the given display.KeySelection does not update the EXTPAINTSTRUC structure. Instead, WINOLDAP calls either the BeginSelection or MakeSelctRect function and passes it the new point.