Start a drag operation

I know how to set up a control to be a drop target, but I have no idea how to make a control a drop source. Does anyone have any information to get me going?

I’m testing by doing the following, but it’s not working:

	char data[2] = { 'H', 'I' };
	VSTGUI::CDropSource::create((void*)data, 2, VSTGUI::IDataPackage::kText);

A drag must be started from an event like mouse move or mouse down. Then you create a drop source as you already did in your code and then you have to call depending on your VSTGUI version the async CView::doDrag method by providing a drag description where DragDescription::data = VSTGUI::CDropSource::create(…), or you have to call the sync variant of the doDrag method.

I hope this helps,
Arne

Yup. That works. Thanks.