Copy To Cliipboard (console app)

This is a discussion on Copy To Cliipboard (console app) within the Windows Programming forums, part of the Platform Specific Boards category; Hi! Anyone knows how to copy text to clipboard in console program?...

  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,659

  3. #3
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,659
    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, 04:07 AM
  2. Using C++ to run a Console APP?
    By anon2222 in forum C++ Programming
    Replies: 4
    Last Post: 01-10-2006, 07:07 AM
  3. Simple Novice Question: MS DOS app. a console?
    By renurv in forum C++ Programming
    Replies: 7
    Last Post: 12-30-2005, 01: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21