
(*
 Delphi Object and Component Reference
#{bmc bm9.BMP} TDragState example
This code is an OnDragOver event handler that won't allow a label control to be dropped on a panel control and stops the dragging of the label as soon as the user drags the label onto the panel:
*) 
void __fastcall TForm1::Panel1DragOver(TObject *Sender, TObject *Source, int X, int Y, TDragState State, bool &Accept)
{
  Accept = false;
  if ((Source->ClassNameIs("TLabel") && (State == dsDragEnter))
    ((TLabel *)Source)->EndDrag(false);
} 
