Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to implement Copy function?

Status
Not open for further replies.

keman

Programmer
Jan 15, 2007
4
DE
Hallo!

I am not an expert programmer in Borland C++.

I need help in generalising a code to implement Copy function for the text given in the TMemo for a small project. The idea is that user selects the text and press copy button. Can anyone suggest something or guide me towards the right track?

Any ideas are welcome. Thanks in advance for your suggestions!
 
>> I need help in generalising a code to implement Copy function for the text given in the TMemo for a small project.

When you say "Copy", do you mean that you want to copy the text to the Windows Clipboard? If so:

Memo1->CopyToClipboard();

Note that CopyToClipboard() will only copy selected text. If none is selected, it will not modify the clipboard. If you want to be sure that you copy the entire text, call Memo1->SelectAll() first.

If this isn't what you mean, then where are you trying to copy the text to?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top