Wrox Programmer Forums
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 7th, 2004, 01:09 PM
Registered User
 
Join Date: Dec 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Clipboard Problem

I am trying to write to the clipboard from a console application. I use the standard OpenClipboard(NULL) function which returns TRUE (1). The next line is a call to EmptyClipboard() which should clear and lock it but that fails with an error message saying that the thread doesn't have an open clipboard. I can't use MFC without re-writing the entire app at this point.

Any thoughts?

Mark Jackson

 
Old December 7th, 2004, 02:31 PM
Registered User
 
Join Date: Dec 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Turns out OpenClipboard needs the handle to your window.

Mark Jackson







Similar Threads
Thread Thread Starter Forum Replies Last Post
Clipboard bschleusner C# 2005 1 February 16th, 2007 08:20 AM
Is the clipboard empty? achinfish Excel VBA 1 July 15th, 2006 04:34 PM
Clear the Clipboard vb certified VB.NET 0 July 11th, 2006 07:31 PM
Copy to Clipboard Clive Astley Access 5 July 16th, 2004 07:16 PM
the clipboard natmaster Java GUI 0 May 31st, 2004 02:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.