I start a drag operation on a TDBGrid by doing:
void __fastcall TMyForm::DBGrid1MouseMove(TObject *Sender, TShiftState Shift, int X, int Y)
{
if (DragDetect(DBGrid1->Handle, Point(X,Y))) {
DBGrid1->BeginDrag(true);
}
}
This works, but if I try to resize a column it starts a drag operation instead.
What is the correct way to "HitTest" the TDBGrid to check if the mouse is over the column headers, so I can skip beginning the drag operation?
There doesn't seem to be any easy answer but I came up with this solution to the issue: