attempts at providing clipboard/dnd support for metafiles - unsuccessful
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -670,7 +670,6 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
formatEtc.ptd = NULL;
|
||||
formatEtc.dwAspect = DVASPECT_CONTENT;
|
||||
formatEtc.lindex = -1;
|
||||
formatEtc.tymed = TYMED_HGLOBAL;
|
||||
|
||||
size_t nSupportedFormats = supportedFormats.GetCount();
|
||||
for ( size_t n = 0; !result && (n < nSupportedFormats); n++ )
|
||||
@@ -678,6 +677,21 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
STGMEDIUM medium;
|
||||
formatEtc.cfFormat = supportedFormats[n];
|
||||
|
||||
// use the appropriate tymed
|
||||
switch ( formatEtc.cfFormat )
|
||||
{
|
||||
case CF_BITMAP:
|
||||
formatEtc.tymed = TYMED_GDI;
|
||||
break;
|
||||
|
||||
case CF_METAFILEPICT:
|
||||
formatEtc.tymed = TYMED_MFPICT;
|
||||
break;
|
||||
|
||||
default:
|
||||
formatEtc.tymed = TYMED_HGLOBAL;
|
||||
}
|
||||
|
||||
// try to get data
|
||||
hr = pDataObject->GetData(&formatEtc, &medium);
|
||||
if ( FAILED(hr) )
|
||||
|
Reference in New Issue
Block a user