A
A
Avery0072014-01-18 16:22:49
C++ / C#
Avery007, 2014-01-18 16:22:49

Why is the value of the variable not changing?

I make my text box, reached the caret. In OnKeyDown, depending on the pressed arrow, I change the cPos and cLine variables. But when I calculate the position of the caret in the function (X = e.ClipRectangle.X + 11 + 12 + (cPos * CharWidth), Y = e.ClipRectangle.Y + (cLine * CharHeight)) , for some reason they are always equal to zero and the caret does not move.
When I display the value in onkeydown using messagebox , it changes, but where I think it is still 0
. Thank you very much in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Illivion, 2014-01-18
@Illivion

Launched your project, the carriage is moving. I don't even know what to say. :)

I
Ilya Glebov, 2014-01-19
@IljaGlebov

I also move

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question