Archive: Get caret position...


Get caret position...
Trying:

System::Call user32::SendMessage(i $ActivationCodeControl, i ${EM_GETSEL}, i.r1, i.r2)

$1 and $2 are always 0 no matter what is selected.

Am I missing something here?


I would guess W/LParam are pointers, so you need *


System::Call "user32::SendMessage(i, i, *i, *i) (i $ActivationCodeControl, i ${EM_GETSEL}, *i.r1, *i.r2)"

Seems to work.