For example, what Wordpad did when I press “Ctrl+C”?
It places many different format to clipboard. So Notepad can get the text without any color or font…etc, and you still can keep the original format when you paste in another Wordpad window.
The MSDN said I should call SetClipboardData multiple times. But it doesn’t work at all.
You can use Delphi’s
TClipboard.SetAsHandleto put data on the clipboard in as many formats as you want. Open the clipboard first, or else each call toSetAsHandlewill clobber whatever else was already there, even in other formats.