Calculates the closest valid caret location for insertion.
C
int SftMask_GetInsertPosition(HWND hwndCtl, int Pos, BOOL fGoingLeft);
C++
int CSftMask::GetInsertPosition(int Pos, BOOL fGoingLeft) const;
hwndCtl
The window handle of the masked edit control.
Pos
The zero-based character position to start from.
fGoingLeft
TRUE to search towards the beginning, FALSE to search towards the end.
The return value is the closest character position where data can be entered.
Literal positions cannot accept input; GetInsertPosition skips them in the requested direction. This is useful for drop targets (see Drag & Drop).
See Also ShowDropPosition | Drag & Drop | Hit-Testing