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

    What API do I use to discover what text is selected in another app?

    I am trying to discover what API can be used to retrieve the selected text in another application. The closest one I have found is EM_GETSELTEXT which only returns richedit text rather than all types.

    Please help - I've exhausted all other avenues.

    Thanks John


  2. #2
    Join Date
    Feb 2000
    Posts
    31

    Re: What API do I use to discover what text is selected in another app?

    Actually you were pretty close, use EM_GETSEL instead of EM_GETSELTEXT.
    From SDK
    "The EM_GETSEL message retrieves the starting and ending character positions of the current selection in an edit control. You can send this message to either an edit control or a rich edit control."

    Bye

    Fabian



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