C&C++

WINAPI GetClipboardData()

김승목 2018. 5. 17. 16:12
1
2
3
4
5
6
7
8
OpenClipboard(0);
if(IsClipboardFormatAvailable(CF_UNICODETEXT)||IsClipboardFormatAvailable(CF_OEMTEXT)){
    HANDLE hClipboard;
    hClipboard = GetClipboardData(CF_UNICODETEXT);
    wchar_t* data = (wchar_t*)GlobalLock(hClipboard);
    MessageBoxW(0,data,L"MessageBox",MB_OK);
}
CloseClipboard();
cs