To contain the handle of the client area text string and its initial data, you must add the following new global variables to the beginning of your C-language source file:
HANDLE hText = NULL; /* handle of current client-area text */
char szInitialClientAreaText[] =
"This program demonstrates the use of ... ";
HANDLE hData, hClipData; /* handles of clip data */
LPSTR lpData, lpClipData; /* addresses of clip data */
You must also add variables for painting and clipboard data manipulation. Add these variables to the beginning of your MainWndProc main window procedure:
HDC hdc;
HMENU hMenu;
PAINTSTRUCT ps;
RECT rcClient;
LPSTR lpszText;