May 04, 2024, 05:59:16 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Drag-Drop in list view

Started by sapero, October 25, 2008, 05:32:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sapero

October 25, 2008, 05:32:59 PM Last Edit: October 25, 2008, 05:36:25 PM by sapero
In this example, you can drop text (or an URL form your browser) on list view control. The text will be inserted exactly in the item/subitem you dropped it.

The IDropTarget implementation (CDropTarget class) uses the IDataObject parameter to query it for plain text data. Requested data format is specified in FORMATETC structure (which is passed to IDataObject), and the data is returned in STGMEDIUM structure, mostly in memory of type HGLOBAL.
Plain text (ansi version) is represented by clipboard data format CF_TEXT.