Thread: Cut/Copy/Paste

  1. #1
    Registered User
    Join Date
    Aug 2024
    Posts
    2

    Cut/Copy/Paste

    Hi,
    How do I add the option to select a portion of text to Cut/Copy to clipboard using the mouse in my next c source?
    (As used by most other apps).

  2. #2
    Registered User
    Join Date
    Dec 2017
    Posts
    1,664
    All truths are half-truths. - A.N. Whitehead

  3. #3
    Registered User
    Join Date
    Aug 2024
    Posts
    2

    Cut/Copy

    Quote Originally Posted by john.c View Post
    "This overview does not describe how to copy and paste linked or embedded objects. For information on these subjects, see the Component Object Model (COM) documentation".
    Last edited by DonnyDave; 08-06-2024 at 10:00 AM.

  4. #4
    Registered User
    Join Date
    Aug 2024
    Posts
    1
    You can start by implementing mouse event handlers (WM_LBUTTONDOWN, WM_MOUSEMOVE, WM_LBUTTONUP) to allow users to select text. For clipboard operations, use the WM_KEYDOWN message to detect keyboard shortcuts (Ctrl+X, Ctrl+C, Ctrl+V). Use the Windows clipboard API to manage text data: OpenClipboard, SetClipboardData, GetClipboardData, and CloseClipboard for clipboard operations, and GlobalAlloc, GlobalLock, and GlobalUnlock to handle memory allocation for clipboard data

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. cin + copy paste
    By Ducky in forum C++ Programming
    Replies: 5
    Last Post: 12-17-2012, 07:33 AM
  2. Custom Copy/Paste
    By C_ntua in forum Windows Programming
    Replies: 5
    Last Post: 06-16-2010, 01:15 PM
  3. copy paste from another app
    By bonkey in forum Windows Programming
    Replies: 1
    Last Post: 09-08-2003, 08:03 AM

Tags for this Thread