15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


drag-n-drop across controls

Anil Kumar. K -- pushpak@m-net.arbornet.org
Monday, February 26, 1996

Hello All,
	I have a problem regarding drag-n-drop across conrtols.
Specs : win 95; MSVC 4.0

	I have a dialogbox in which I have a tree control and a list control. =
I'm trying to do drag-n-drop across these two controls. The problem is =
that the hotspot of the drag image and the hot spot of the cursor do not =
coincide. I'm handling the mouse messages in the dialog (I'm capturing =
the mouse in the 'BeginDrag' handler). When I start the drag operation, =
the two hotspots coincide and it looks fine. But when, I drag the item =
outside the tree control, the hotspots do not coincide and there is some =
offset b/w them. Also when I drag the item back into the control, the =
offset between the two hotspots increases. I think I'm doing some silly =
error and I'm not able to figure it out.

Any help would be greatly appreciated.
						Thanking you
						Anil kumar .K



Ken Freeman -- kfreeman@viewlogic.com
Wednesday, February 28, 1996

Anil Kumar. K wrote:
> 
> Hello All,
>         I have a problem regarding drag-n-drop across conrtols.
> Specs : win 95; MSVC 4.0
> 
>         I have a dialogbox in which I have a tree control and a list control.
>  I'm trying to do drag-n-drop across these two controls. The problem is that the 
> hotspot of the drag image and the hot spot of the cursor do not coincide. I'm 
> handling the mouse messages in the dialog (I'm capturing the mouse in the
> BeginDrag' handler). When I start the drag operation, the two hotspots coincide 
> and it looks fine. But when, I drag the item outside the tree control, the hotspots 
> do not coincide and there is some offset b/w them. Also when I drag the item back 
> into the control, the offset between the two hotspots increases. I think I'm doing 
> some silly error and I'm not able to figure it out.
> 
> Any help would be greatly appreciated.
>                                                 Thanking you
>                                                 Anil kumar .K

You need to call CImageList::DragEnter and specify NULL (the desktop) for the
window to lock.

Ken

[P.S. Please use carriage returns to format your mail - Netscape's mail reader
has no word wrap!]




| Вернуться в корень Архива |