Board index » delphi » OLE Drag&drop in a dockable window

OLE Drag&drop in a dockable window

Hello

I wonder if anyone can help me with the following problem:
I have a StringGrid that accepts OLE Drag and Drop (e.g. d&d from Excel
). In order to do that I need to register the StringGrid handle using
RegisterDragDrop( Handle , Self ). It works fine. As soon as I dock the
form that contains the TStringGrid into a panel, its handle changes
value and I no longer can do OLE Drag&Drop!! Why does the handle change
in I dock the form?

Has anyone experienced this problem before?

Any help is very much appreciated.

Paulo

 

Re:OLE Drag&drop in a dockable window


Quote
In article <37974866.7EB2...@techprt.co.uk>, Paulo Pinheiro wrote:
> As soon as I dock the
> form that contains the TStringGrid into a panel, its handle changes
> value and I no longer can do OLE Drag&Drop!! Why does the handle change
> in I dock the form?

Because the form that contains the grid needs to destroy and recreate its
window handle on docking (it changes style from overlapped window to
control on docking) and that also destroys and recreates the window
handles of all controls on the form. This is a general problem with
docking. Use the OnEndDock event to reregister the grid for drag&drop.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

Other Threads