DragSourceEventProperty::SetData
bool SetData ( DGDragFormat format, void * data, ULong size, DragDrop::Scope scope );
파라미터
- format
DGDragFormat 타입 파라미터입니다. 문자 스타일 같은 형태의 드래그 포맷을 지정하는 데 사용합니다: 'TEXT', 'FILE' 등. - data
지정한 포맷의 드래그 앤 드롭 데이터입니다. - size
드래그 앤 드롭 데이터의 크기입니다. - scope
데이터의 범위입니다: DragDrop::Item, DragDrop::Dialog, DragDrop::Module, DragDrop::Application, DragDrop::System.
리턴 값
설명
예제
// 메소드 예제: void TextControl::RichEditDragStarted (const DG::RichEditDragSourceEvent& ev, UShort* /*effect*/) { if (ev.GetSource () == &controlledView->editControl) { DG::DragSourceEventProperty* dsep = ev.GetDragData (); dsep->SetData ('YDXX', &sourceDocument, sizeof (TextDocument*), DG::DragDrop::Module); } }
먼저 당신은 DragSourceEventProperty 객체에 대한 포인터를 얻게 됩니다. 그러면 드래그 동작에 커스텀 'YDXX' 타입 데이터를 세트하기 위해 이 객체를 사용하십시오.