B
bitwxtadpl
I want to programmatically set the position of a cursor in a textbox
that has focus based on a X and Y value.
However, when I send a WM_RBUTTONDOWN and a WM_RBUTTONUP message to the
textbox it selects the text from where the cursor is to where I want
the cursor to be. All I want is to move the position of the cursor
based on a X and Y values, not select the text.
The code to recreate the issue.
const int WM_LBUTTONDOWN = 0x0201;
const int WM_LBUTTONUP = 0x0202;
textBox1.Focus();
int X = 23;
int Y = 6;
SendMessage(textBox1.Handle, WM_LBUTTONDOWN, Y,X);
SendMessage(textBox1.Handle, WM_LBUTTONUP, Y,X);
Is there another message I can send?
Thanks,
Brian
that has focus based on a X and Y value.
However, when I send a WM_RBUTTONDOWN and a WM_RBUTTONUP message to the
textbox it selects the text from where the cursor is to where I want
the cursor to be. All I want is to move the position of the cursor
based on a X and Y values, not select the text.
The code to recreate the issue.
const int WM_LBUTTONDOWN = 0x0201;
const int WM_LBUTTONUP = 0x0202;
textBox1.Focus();
int X = 23;
int Y = 6;
SendMessage(textBox1.Handle, WM_LBUTTONDOWN, Y,X);
SendMessage(textBox1.Handle, WM_LBUTTONUP, Y,X);
Is there another message I can send?
Thanks,
Brian