Sorry, there may be a terminology misunderstanding here. When you said "position the cursor", I assumed you meant moce the insertion point for the edit control. Ie. Change the position where text would be inserted, if the user starts typing, assuming the control has focus.

If that is what you want, you will probably have to call update() afterwards in order for the effects to be reflected on the screen.

However, there are other possible interpretation of "position the cursor".

You might mean: move the mouse cursor over the richedit control window.

Or you might mean: Give the richedit control the focus, so that the text cursor (otherwise known as the insertion point), appears with the richedit control.

So, 1) you are going to have to clarify your problem (and terminology).

2) it would be much easier for people to assist you if you would post a minimal, working example of your code. It is always a good idea to have a small test app that omits the bulk of your program logic when learning a new library or control.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re^3: Cursor at end of Richedit control by BrowserUk
in thread Cursor at end of Richedit control by briannz556

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.