About Get Data from Clipboard
-
I know that I have Data in the clipboard with the DataFormat::MetafilePict. But I can't get it. My code is more or less the next: ///////////////////////////////////////////////////////////// if ( iData->GetDataPresent( DataFormats::MetafilePict) ) { System::Object * obj; System::Drawing::Imaging::Metafile * pMetafile; obj = Clipboard::GetDataObject()>GetData(System::Windows::Forms::DataFormats::MetafilePict ); pMetafile = dynamic_cast< System::Drawing::Imaging::Metafile * > (obj); } ///////////////////////////////////////////////////////// Obviusly in the Debug, I enter inside the first if condition, so the code executes but the System::Object obj can't keep the data of clipboard and keeps a undefined value after the asignation. It seems a contradiction, isn't it ? :confused: Can anybody say me anything about get MetafilePict Data from Clipboard ? Advanced Thanks, everybody.;)