Board index » cppbuilder » Doesn't anyone answer difficult questions anymore?????

Doesn't anyone answer difficult questions anymore?????

I have a simple question.  I cannot figure out how to drag a node from a
Modal Dialog, onto the form below.  I'm dragging a tree node from a
TTreeView into an outlook style bar, but I cannot get it to accept it.  I'm
using the following code for the TTreeView StartDrag event:

  if((TreeView->Selected != NULL) && (TreeView->Selected->Data != NULL))
    SideBarDragObject = new
SideBarDragObject(MainForm->SideBar,DragObject,
      NULL,(StoredSideItem*)TreeView->Selected->Data);

and according to examples I've seen, I shouldn't have to use any Drag or
Drop events for the Outlook style bar to accept the node.

Any help would be greatly appreciated.

Thanks,
Aaron

 

Re:Doesn't anyone answer difficult questions anymore?????


With such an annoying subject line, I wouldn't even read it.

Re:Doesn't anyone answer difficult questions anymore?????


If you don't use events for D&D then how do you know when something is being
dragged into your object?

ABieberitz <ABieber...@email.msn.com> schreef in berichtnieuws
3a4e57db$1_2@dnews...

Quote
> I have a simple question.  I cannot figure out how to drag a node from a
> Modal Dialog, onto the form below.  I'm dragging a tree node from a
> TTreeView into an outlook style bar, but I cannot get it to accept it.
I'm
> using the following code for the TTreeView StartDrag event:

>   if((TreeView->Selected != NULL) && (TreeView->Selected->Data != NULL))
>     SideBarDragObject = new
> SideBarDragObject(MainForm->SideBar,DragObject,
>       NULL,(StoredSideItem*)TreeView->Selected->Data);

> and according to examples I've seen, I shouldn't have to use any Drag or
> Drop events for the Outlook style bar to accept the node.

> Any help would be greatly appreciated.

> Thanks,
> Aaron

Re:Doesn't anyone answer difficult questions anymore?????


Hi, Aaron.

Quote
ABieberitz wrote:

> I have a simple question.  I cannot figure out how to drag a node from a
> Modal Dialog, onto the form below.  I'm dragging a tree node from a
> TTreeView into an outlook style bar, but I cannot get it to accept it.  I'm
> using the following code for the TTreeView StartDrag event:

>   if((TreeView->Selected != NULL) && (TreeView->Selected->Data != NULL))
>     SideBarDragObject = new
> SideBarDragObject(MainForm->SideBar,DragObject,
>       NULL,(StoredSideItem*)TreeView->Selected->Data);

> and according to examples I've seen, I shouldn't have to use any Drag or
> Drop events for the Outlook style bar to accept the node.

If I understand correctly, you have a form with a style bar which opens
up a modal dialog box.  You are then trying to drag from the dialog box
and drop onto the form.  If this is correct, then the problem is that
the form does not receive/process messages after it opens a *modal*
dialog box.  Make the dialog box non-modal and see if that works.

FWIW, a more meaningful subject line is apt to get more
attention/meaningful responses.

robert

Other Threads