Copy Picture into Clipboard
Hello,
I need your help.
Ich want to copy my Picture into the Windows Clipboard.
This is my Picture
image = Gdiplus::Image::FromFile(path,b);
I'm working with VC++ 6.0.
This is my trying, but I'm at a loss. I don't know how to initialize HGLOBAL.
HGLOBAL hClipboardData;
if (OpenClipboard())
{
EmptyClipboard();
SetClipboardData(CF_TIFF, hClipboardData);
CloseClipboard();
}
Someone who can help me?
Thanks a lot.
Bye
Jana
P.S. Sorry for my Englisch. It's terribel. I know about it :-)
# 2 Re: Copy Picture into Clipboard
Hello,
thanks for that article, but it was unhelpful. I have no Bitmap, my pic is TIFF.
void CCDSEM_Bild_ViewerDlg::OnCopy()
{
// TODO: Add your control notification handler code here
//define path
CString sPicture = m_sCurrentFile;
sPicture.SetAt(0, ' ');
sPicture.TrimLeft();
::OpenClipboard( );
::EmptyClipboard();
::SetClipboardData(CF_TIFF, );
::CloseClipboard();
But it fails important things in OpenClipboard and SetClipboardData :-( I don't know how to include my picture.
Somebody who can help?
Greetings
Jana