Using the clipboard |
|
axsoft
版主 發表:681 回覆:1056 積分:969 註冊:2002-03-13 發送簡訊給我 |
Using the clipboardhttp://www.hobbypages.net/snip8.html -------------------------------------------------------------------------------- For simple "Text" formats, using the clipboard is easy. The functions are defined in stdctrls.hpp and the clipboard itself is defined in clipbrd.hpp. Three easy functions are: CutToClipboard( ) CopyToClipboard( ) PasteFromClipboard( ) And these functions already know the shortcut keys (ctrl x, ctrl c, ctrl v) Using a TMemo item in this example, with the standard Edit Menu, these simple functions give the application full clipboard capabilities:void __fastcall TForm1::Cut1Click(TObject *Sender) { Memo1->CutToClipboard(); } //-------------------- void __fastcall TForm1::Copy1Click(TObject *Sender) { Memo1->CopyToClipboard(); } //-------------------- void __fastcall TForm1::Paste1Click(TObject *Sender) { Memo1->PasteFromClipboard(); }Database applications use a different header, and so do image and OLE operations. But it's all pretty layed out. Read up on the Programmers guide. Look up Clipboard. 網路志工聯盟----Visita網站http://www.vista.org.tw ---[ 發問前請先找找舊文章 ]--- |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |