Link to home
Start Free TrialLog in
Avatar of mflam
mflam

asked on

working with selected text by hitting a hotkey

MFC app running: text selected in OTHER application (whatever app) & I hit a hotkey.
How should I work on the selected text?

I just want direction, not full code.
Any of the answers will be considered.

1a. Should I save clipboard, add text to clip, then when done restore it?
1b. If so, please supply pointer to restoring clipboard without corrupting it.
2. Any other way to work with selected text in external app, without working with clipboard at all?
3. Maybe there are ways to work with "multiple clipboards?"

ADVAthnaksNCE Moshe
Avatar of nietod
nietod

You probably don't need to use the clipboard.  But where is the text?  Is it in an edit box? an RTF window?  A list box? etc...

If it is in a rich edit control, for example, you can use the EM_GETTEXTRANGE message.  There are other messages for other types of controls/windows.
Avatar of mflam

ASKER

I see I have not been clear.
Of course if I was in my same app it would be easy...
Please give me a week (this is a very full week for me) and I'll fix the question.
Avatar of mflam

ASKER

Edited text of question.
ASKER CERTIFIED SOLUTION
Avatar of nietod
nietod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial