CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    82

    Problem of SetWindowText

    After I ran SetWindowText for a CEdit edit box, the input cursor will jump to the position before the first character in the box. How to put it in the position after the last character? Thank you!

  2. #2
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: Problem of SetWindowText

    Use SetSel method

  3. #3
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Re: Problem of SetWindowText

    Set selection at the end of text.
    Like in this FAQ.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  4. #4
    Join Date
    Jun 2005
    Posts
    178

    Re: Problem of SetWindowText

    use SetSel and give the string length as first and second parameter..
    it will put the cursor at the end

    ProElite

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured