(Win XP SP2, Delphi 2007)
I'm getting this exception when I have a Notepad text file open, press
Ctrl/C and then in another application I've created try to paste from a
mask-edit.
if not OpenClipboard(FClipboardWindow) then
raise Exception.CreateRes(@SCannotOpenClipboard);
The call to the Clipboard comes in the Mask unit, WMPaste procedure:
...
Clipboard.Open;
Value := Clipboard.AsText;
Clipboard.Close;
...
The fault seems not to happen if I first close the Notepad text file.
Could it be that Notepad is badly behaved?
Mike