Copy bitmap to clipboard

J

Jana

Hello,

I have the following problem. I should like to copy my bitmap test.bmp
into windows clipboard.
I have already a little frame:



const CWnd *pWnd;
CBitmap bitmap;

::OpenClipboard(pWnd->GetSafeHwnd());
::EmptyClipboard() ;
::SetClipboardData (CF_BITMAP, bitmap.GetSafeHandle() ) ;
::CloseClipboard () ;
bitmap.Detach();



But I don't know how to initialise pWnd and pass my .bmp file?

Can someone help me?

Best regards
Jana
 
I

Ian Collins

Jana said:
Hello,

I have the following problem. I should like to copy my bitmap test.bmp
into windows clipboard.
Try a windows group, this isn't a C++ problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,277
Latest member
VytoKetoReview

Latest Threads

Top