Jayu_is_here
asked on
C# and handle to Clipboard
hi
I am trying to copy an image to a clipboard and then get a handle to the clipboard using API calls GetClipboardData() in C#.
Following is the snippet of our code. Could any one please point out what am I missing here since I never get the handle to the object on clipboard
<snippet>
OpenClipboard(0);
DataObject m_data = new DataObject();
m_data.SetData(DataFormats .Dib,imgCa rdImage.Im age);
Clipboard.SetDataObject(m_ data,false );
hDib = GetClipboardData(CF_DIB); // CF_DIB = 8;
</snippet>
hDib returned is always 0 where it actually had to return a handle to the clipboard;
Thanks in Advance.
I am trying to copy an image to a clipboard and then get a handle to the clipboard using API calls GetClipboardData() in C#.
Following is the snippet of our code. Could any one please point out what am I missing here since I never get the handle to the object on clipboard
<snippet>
OpenClipboard(0);
DataObject m_data = new DataObject();
m_data.SetData(DataFormats
Clipboard.SetDataObject(m_
hDib = GetClipboardData(CF_DIB); // CF_DIB = 8;
</snippet>
hDib returned is always 0 where it actually had to return a handle to the clipboard;
Thanks in Advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
just on } missing to close the namespace :)
(fast copy/paste :)
--
vascov
(fast copy/paste :)
--
vascov
Jayu, did this help ?
Did it solve your prob ?
Did it solve your prob ?
Jayu ?
Did this help you solve your problem ?
Further assistance ?
Thx
Did this help you solve your problem ?
Further assistance ?
Thx
ASKER
We need a handle/pointer to the image in the memory. We need to pass this pointer to another API which expects a pointer to the image to store the image.
jayu