I've never looked into this, but it's easy enough to guess:
- The clipboard is a shared resource
- Only one app (per desktop) can "own" the clipboard at any given point in time
- Your app owns it (after calling
OpenClipboard()
) - VS wants it (probably because, among other things, it's an editor)
- While your app is stopped at a breakpoint, no amount of waiting will ever find the clipboard not owned by your app.
- Hilarity ensues!
Shog9
2008-09-17 04:49:39