I have a tree control that implements drag and drop. I use an overridden OnStartDrag() to get my own TDragObjectEx that shows an image while dragging. This works perfectly within the tree control, but as soon as I leave the tree control the image disappears. The cursor stays though.
I tried implementing OnDragOver, to reset the image but that does not appear to work.
Any hints on this? I am using C++ builder 2010, but delphi would do the same thing.
Update: Found setting csDisplayDragImage on each control in the form controls, and in form itself solves this issue. Is there some automated way to have csDisplayDragImage set in an entire form rather than have to set it manually in Create for each item?
void __fastcall TForm1::FormCreate(TObject *Sender)
{
ControlStyle << csDisplayDragImage;
RMU->ControlStyle << csDisplayDragImage;
Button1->ControlStyle << csDisplayDragImage;
}