2008/01/24

Clipboard로 이미지 복사하기

if (OpenClipboard())
{
EmptyClipboard();
CDC *pDC = GetDC();

CDC MemDC;
CBitmap Bitmap;
MemDC.CreateCompatibleDC(pDC);
Bitmap.CreateCompatibleBitmap(pDC, m_szBuf.cx, m_szBuf.cy);
MemDC.SelectObject(Bitmap);

:
// Draw something
:

SetClipboardData(CF_BITMAP, Bitmap.m_hObject);

ReleaseDC(pDC);

CloseClipboard();
}

Original Post : http://neodreamer-dev.tistory.com/47

No comments :

Post a Comment