클립보드 복사
jjuiddong
- <wx/clipbrd.h> 라이브러리를 이용하자.
- wxWidgets 의 wxTheClipboard 를 사용하면 쉽게 클립보드 내용을 볼수 있다. html, text, bitmap 포맷을 지원하고 있다.
if (wxTheClipboard->Open()) { if (wxTheClipboard->IsSupported( wxDF_TEXT )) { wxHTMLDataObject data; wxTheClipboard->GetData( data ); std::ofstream ofs("output.txt"); if (ofs.is_open()) { std::wstring wsrc = data.GetHTML(); std::string str = wstr2str(wsrc); ofs << str; } } wxTheClipboard->Close(); }