Rich, Memo e Edit - posicao do cursor |
Top Previous Next |
|
procedure CaretPos(H: THandle; var Row, Column: Word); begin Row := SendMessage(H, EM_LINEFROMCHAR, -1, 0); Column := LoWord(SendMessage(H,EM_GETSEL, 0, 0)) - SendMessage(H, EM_LINEINDEX, -1, 0); end;
-------------------------------------------------------------------------------------------
RichEdit:
Linha : RichText1.CaretPos.y; Coluna: RichText1.CaretPos.x; Mover o cursor: RichText1.SelStart:=Length(RichText1.Lines.Text);
|