
May 7th, 2008, 08:10 AM
|
|
Registered User
|
|
Join Date: Dec 2007
Posts: 7
Time spent in forums: 1 h 56 m 44 sec
Reputation Power: 0
|
|
|
Clipboard exception on open
(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 try to paste.
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
|