Deepak
Tue Mar 15 14:30:39 CST 2005
Here is some new stuff that I discovered during the course of the day:
What I get on the native side is a "Serialized" form of the System::String
(xmlText) custom object that I set on the DataObject.
What I would like on the native side is an array of wchar_t - i.e. the data
that exactly mimics the xmlText array.
So the question is - how can I get a wchar_t array on the native side?
- Deepak.
"Deepak Malkan [Bentley]" <deepak.malkan@bentley.com> wrote in message
news:OucVvvVKFHA.2132@TK2MSFTNGP14.phx.gbl...
> Peter,
>
> Thank you for your response.
>
> The drag operation from my object in the managed dialog to DOBJVIEW fails.
>
> If I copy my object into the clipboard, then I get the folllowing formats
> listed in DOBJVIEW:
>
> System.String
> Unknown Clipformat
> CF_TEXT
> MicroStation Model List
>
> The rest of the columns are identical for all the formats - ptd={NULL},
> dwApsect={Content }, lindex={-1}, tymed={hGlobal}.
>
> Of the 4 formats, my program has added only 2 - the first (System.String)
&
> the last (MicroStation Model List).
>
> My sample code to build the dataObject is as follows (in Managed C++):
>
> wchar_t * xmlText;
> ... Allocate & build xmlText ...
>
> NSForms::DataFormats::Format * modelDataFormat =
> NSForms::DataFormats::GetFormat(S"MicroStation Model List");
> NSForms::DataObject * dataObject = new NSForms::DataObject ();
> dataObject->SetData (modelDataFormat->Name, true, new System::String
> (xmlText));
> dataObject->SetData (new System::String (xmlText));
>
> (NSForms is a namespace alias for System::Windows::Forms).
>
> - Deepak.
>
> ""Peter Huang" [MSFT]" <v-phuang@online.microsoft.com> wrote in message
> news:4xBzHESKFHA.1532@TK2MSFTNGXA02.phx.gbl...
> > Hi
> >
> > There is tool DataObject Viewer shipped with VS6.
> > IDataObject Data Object Viewer
> > DOBJVIEW displays the list of data formats offered by ActiveX and OLE
data
> > objects created by the Clipboard or drag-and-drop operations.
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/htm
> > l/_core_using_viewers_and_spy_programs.asp
> >
> > You may try to drag the .NET Object onto the tool to see what you will
> get.
> >
> > Also can you provide a simple sample which will demostrate what format
you
> > will drag and drop?
> > Thanks for your understanding!
> >
> > Best regards,
> >
> > Peter Huang
> > Microsoft Online Partner Support
> >
> > Get Secure! - www.microsoft.com/security
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
>
>