You don't need to call the Windows API functions directly for this, Plus! already has helper functions to do the same thing.
Download the
Official Scripting Documentation and look at the following pages:
- Objects Reference > PlusWnd Object > Functions > Edit and RichEdit controls > EditBox_GetCurSelStart
- Objects Reference > PlusWnd Object > Functions > Edit and RichEdit controls > EditBox_GetCurSelEnd