Thread: Setting variables to clipboard values?

  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    16

    Setting variables to clipboard values?

    Is there a way to access the clipboard using c?

    Thankyou,

    Jon

  2. #2
    Registered User OnionKnight's Avatar
    Join Date
    Jan 2005
    Posts
    555
    http://msdn.microsoft.com/library/de.../clipboard.asp
    Anything Windows-related can be resolved by searching MSDN.

  3. #3
    Registered User
    Join Date
    Mar 2006
    Posts
    16
    What? Im just asking if there is a way to copy a clipboard value to a variable
    Eg.
    char i[1024] = getclipboard();

    Something like that. Surely you can be of more assistance than that.
    I dont understand what they are trying to say on msdn!

  4. #4
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    GetClipboardText
    Code:
    char text[1024];
    if (GetClipboardText(text, sizeof(text)))
       printf("clipboard text: %s\n", text);

  5. #5
    Registered User
    Join Date
    Mar 2006
    Posts
    16
    Thankyou

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 12-30-2007, 10:08 AM
  2. Need help with project
    By chrisa777 in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2006, 05:01 PM
  3. Replies: 1
    Last Post: 02-03-2005, 03:33 AM
  4. ASP help. Setting variables within an <a> tag
    By TravisS in forum Tech Board
    Replies: 6
    Last Post: 03-28-2003, 04:56 AM
  5. Having trouble correctly setting DJGPP's env. variables in XP
    By Unregistered in forum C Programming
    Replies: 0
    Last Post: 06-05-2002, 10:51 PM