Thread: Copy To Cliipboard (console app)

  1. #1
    Code Warrior
    Join Date
    Nov 2001
    Posts
    669

    Copy To Cliipboard (console app)

    Hi!

    Anyone knows how to copy text to clipboard in console program?
    Current projects:
    1) User Interface Development Kit (C++)
    2) HTML SDK (C++)
    3) Classes (C++)
    4) INI Editor (Delphi)

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981

  3. #3
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    If an application calls OpenClipboard() with hwnd set to NULL, EmptyClipboard() sets the clipboard owner to NULL; this causes SetClipboardData() to fail.
    If you need to call EmptyClipboard(), which looks like is a good idea, then create a dummy window and never show it.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Copy and Paste function in console apps.
    By Hakins90 in forum C Programming
    Replies: 5
    Last Post: 12-27-2007, 05:07 AM
  2. Using C++ to run a Console APP?
    By anon2222 in forum C++ Programming
    Replies: 4
    Last Post: 01-10-2006, 08:07 AM
  3. Simple Novice Question: MS DOS app. a console?
    By renurv in forum C++ Programming
    Replies: 7
    Last Post: 12-30-2005, 02:42 PM
  4. Making an installer package using a console app
    By Finchie_88 in forum C++ Programming
    Replies: 22
    Last Post: 10-23-2004, 09:30 PM
  5. Win32 Console App
    By Trauts in forum Windows Programming
    Replies: 2
    Last Post: 05-19-2003, 03:42 PM