if (hBitmap)
{
SetClipboardData(CF_BITMAP, hBitmap);
CloseClipboard();
}
}
This function is called from a button ...
The first time , no problem, when i press the button , i have a correct bitmap in the clipboard ( verify with paint) but if i press the button a second time , i have an incorrect bitmap in the clipboard ... when i try to paste the bitmap in paint , i have an error message ( "erreur d'obtention des données du presse-papiers" in french)
do you have any idea ?
Thanks.
Dooug
Test hBitmap value after SendImage for NULL.
Set unique ID for the picture control instead of IDC_STATIC. How many controls do you have on the dialog with IDC_STATIC ID?
thanks for your response ...
I have only one control with the IDC_STATIC ID , i change the id instead of, but no effect ... the first time is ok , but not the second time except if i reload a bitmap in the Picture box ... I don't understand why ?
Last edited by douggy; March 26th, 2009 at 07:46 AM.
When i press twice the button to set the bitmap in the clipboard , i can't paste it, there is an error...
i know , i can press once the button, the second press is useless but that irritates me to not understand. In theory it should crush the old bitmap in the clipboard even if it's the same
Bookmarks