If (OpenClipboard ())
{
Sleep (4000);
//in order to test the four seconds to move the mouse pointer to a text
Sleep (100);
,0,0,0 mouse_event (MOUSEEVENTF_LEFTDOWN, 0);
Sleep (50);
,0,0,0 mouse_event (MOUSEEVENTF_LEFTUP, 0);
//CTRL A
Keybd_event (VK_CONTROL, 0, 0);
Keybd_event,0,0,0 (65);
KEYEVENTF_KEYUP keybd_event (65, 0, 0);
Keybd_event (KEYEVENTF_KEYUP VK_CONTROL, 0, 0);
Sleep (100);
//CTRL C
Keybd_event (VK_CONTROL, 0, 0);
Keybd_event,0,0,0 (67);
KEYEVENTF_KEYUP keybd_event (67, 0, 0);
Keybd_event (KEYEVENTF_KEYUP VK_CONTROL, 0, 0);
Sleep (100);
//if the function fails, the return value is NULL.
HANDLE hData=https://bbs.csdn.net/topics/::GetClipboardData (CF_UNICODETEXT);
If (hData!=NULL)
{
Cstrings STR.
LPCTSTR lpdata=https://bbs.csdn.net/topics/(LPCTSTR) GlobalLock (hData);
SetDlgItemText (IDC_RICHEDIT1 lpdata);//custom copy where, copied to the edit box here
SetDlgItemText (IDC_EDIT4 lpdata);//custom copy where, copied to the edit box here
GlobalUnlock (hData);
}
CloseClipboard ();
}
}
CodePudding user response:
If you open notepad, according to the control V, there is a text