CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2011
    Posts
    1

    clipboard => string

    Hello,

    iam pretty new to c++ and i want to store the clipboard into a string, manipulate the string, and put the manipulated string back into the clipboard.

    EXAMPLE:
    1. copying folloing lines into the clipboard

    LineLineLineLine
    LineLineLineLine

    2. storing this text in a string.

    3. manipulate the string.

    LineLineLineLine
    INSERT
    LineLineLineLine
    INSERT

    4. Put this string back into the clipboard.

    i found serveral threads on msdn =>http://msdn.microsoft.com/en-us/library/93ks5wxz.aspx
    but i couldnt compile them. and i have no clue about the syntax.

    but i think i could do i if you give me and example.


    thanks

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

  3. #3
    Join Date
    May 2002
    Posts
    1,435

    Re: clipboard => string

    Although you have posted in the Windows API forum, the sample code you reference is for .net c++/clr and it will compile fine if you set the clr switch in your project. The syntax is different - but it depends on what direction you want to move forward with in your programming. The Windows API is the oldest and most basic (it's really c, not c++) and .net is the latest. Regardless of which method you choose there is going to be a learning curve - working with raw char buffers in the API (of course, it would also help use string objects) or System::String^ in .net. Personally, I would recommend .net.

  4. #4
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: clipboard => string

    @to 0xC0000005
    Please keep on-topic and let us talking about Windows API in a Windows API forum!

    Thank you!
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured