Click here to Skip to main content
15,892,746 members
Articles / Desktop Programming / MFC

Using the Clipboard, Part I: Transferring Simple Text

Rate me:
Please Sign up or sign in to vote.
4.94/5 (57 votes)
6 May 200213 min read 445K   5.3K   168  
In this first article of a four-part series on learning everything you ever wanted to know about programming the Windows Clipboard, you'll discover the basic steps of using the Clipboard API to transfer simple (ANSI) text to and from the Clipboard.
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by SimpleTextTransfer.rc
//
#define IDR_MANIFEST                    1
#define ID_BTNCOPY                      3
#define ID_BTNCUT                       5
#define IDPASTE                         6
#define ID_BTNPASTE                     6
#define IDM_ABOUTBOX                    0x0010
#define IDD_ABOUTBOX                    100
#define IDS_ABOUTBOX                    101
#define IDD_SIMPLETEXTTRANSFER_DIALOG   102
#define IDR_MAINFRAME                   128
#define ID_EDTTOCLIPBOARD               1000
#define ID_EDTFROMCLIPBOARD             1002
#define IDC_BUTTON1                     1003

// Next default values for new objects
// 
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE        129
#define _APS_NEXT_COMMAND_VALUE         32771
#define _APS_NEXT_CONTROL_VALUE         1005
#define _APS_NEXT_SYMED_VALUE           101
#endif
#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
Software Developer (Senior) Microsoft
United States United States
I manage the strategy for the Azure Management Experience documentation at Microsoft. Those technologies include Open-Source DevOps (Terraform, Ansible, Jenkins), Azure PowerShell, and Azure CLI.

Comments and Discussions