Caret in Direct2D text editor

407 views Asked by At

I am making a graphics application in Direct2D, and it has text editing capabilities powered by DirectWrite. However, I am not sure what the best way to render the caret is. I can either get the position using HitTestTextPosition and render a line manually, which seems to work, or I can attempt to use SetCaretPosition and related methods. The Direct2D surface does not cover my entire window.

What are the pros and cons of each approach; and which one would provide better usability/robustness?

0

There are 0 answers