标签云

微信群

扫码加入我们

WeChat QR Code

I'm trying to implement Drag & Drop functionality with source being a TreeView control. When I initiate a drag on a node, I'm getting:Invalid FORMATETC structure (Exception from HRESULT: 0x80040064 (DV_E_FORMATETC))The ItemDrag handler (where the exception takes place), looks like:private void treeView_ItemDrag(object sender,System.Windows.Forms.ItemDragEventArgs e){this.DoDragDrop(e.Item, DragDropEffects.Move);}Does anyone know the root cause of this and how to remedy it? (.NET 2.0, Windows XP SP2)


You misunderstood the answer.This is how the FORMATETC is constructed in windows.The code of the answer is not an answer it is how the object having the error is built.The clipboard is not written in C#, it is written in C++ and is a part of windows.The error is local to windows and there is no C# code in that object.This is the code that of the object having the error.I answer is the text above the code.The solution is in replacing the .DLLs with the newer library.

2019年05月24日58分51秒