Setting variables to clipboard values?

This is a discussion on Setting variables to clipboard values? within the Windows Programming forums, part of the Platform Specific Boards category; Is there a way to access the clipboard using c? Thankyou, Jon...

  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
    Mad OnionKnight's Avatar
    Join Date
    Jan 2005
    Location
    UmeŚ, Sweden
    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, 09: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, 02:33 AM
  4. ASP help. Setting variables within an <a> tag
    By TravisS in forum Tech Board
    Replies: 6
    Last Post: 03-28-2003, 03: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

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