Results 1 to 7 of 7

Thread: Copy & Paste

  1. #1

    Copy & Paste

    System: Windows XP
    Compiler/IDE: Free Pascal
    API: None

    Ok, well, I need to implement copy & paste into my program... Now, the problems I have, is how would I:
    a) always watch to see if person pressed Ctrl+v to paste?
    b) read from the clipboard?

    I don't need copy features, but I definitely need paste.
    --MagicRPG--

  2. #2
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Copy & Paste

    What are you copying or pasting? Graphics, text?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #3

    Copy & Paste

    Text, its all text-based.
    --MagicRPG--

  4. #4

    Copy & Paste

    If your in Lazarus and not pure FPC then include the ClpBrd unit and use the methods and the Clipboard object defined within it. As for capturing the Ctrl+V, Ctrl+X and Ctrl+C events, use a global application TActionList.

    If your in FPC, then look at the Lazarus ClpBrd unit, as it is VERY valuable. Then create a monitor process to look for your key-presses. When you find one, fire the appropriate handler.

  5. #5

    Copy & Paste

    I'm in pure FPC... Hate lazarus. Well, thanks. I'll look for that unit.
    --MagicRPG--

  6. #6
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Copy & Paste

    Clipboard seems to me like a WinAPI sort of thing. Though don't quote me on that. Maybe google for info on WinAPI to see if anything pops up there if the Lazarus unit doesn't work out for you.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  7. #7

    Copy & Paste

    Thanks, that would be exactly what I need, cause I don't think I know enough OOP yet... I know how to make, initilize, use, and close objects, but thats all. I just need some practice

    It takes me a while to learn a language (delphi/oop pascal being my second language now... Pascal as my first), but with Pascal, it took me around a year to make a functional app... then I went stir-crazy and non-stop practiced.
    --MagicRPG--

Bookmarks

Posting Permissions

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