Is somebody could give me advices about the following question ?
I don't have problem to detect a dropped icon on my window with WINDOW_AppMsgHook but I
would like to detect when a icon is dragging over my window (without to be dropped).
Is it possible ?
I tried to use a DropZone but as soon that I add a WBDZA_Hook, OS freezes when a icon is dragged in my window.
DropZone is well created but certainly that I misuse it...
Is a DropZone with WBDZA_Hook could help me ?
Thank you for your help (posted too on OS4-Coding forum)
Sample based on SDK:Examples/GUI/Window/AppWindow.c
http://www.indiego.rocks/file/download/ ... 1c0ad04cc6
Code: Select all
if ( (appDropZoneHook = AllocSysObjectTags(ASOT_HOOK,
ASOHOOK_Entry, appDropZone_hook,
ASOHOOK_Data, NULL,
TAG_END)) )
{
GetAttr(WINDOW_AppWindowPtr,objects[OID_MAIN],(uint32 *)&windowZone) ;
if ( (dropZone = AddAppWindowDropZone((struct AppWindow *)windowZone,1,0,
WBDZA_Left,0,
WBDZA_Top, 0,
WBDZA_Width, windows->Width,
WBDZA_Height, windows->Height,
WBDZA_Hook, appDropZone_hook,
TAG_END)) )
{
printf("dropZone OK \n");
}
else
printf("dropZone KO \n");
} //end if appMessageDropZoneHook
LONG appDropZone_hook(struct Hook *hook, APTR reserved, struct AppWindowDropZoneMsg *adzm)
{
printf("windows->MouseX (%d) windows->MouseY (%d) \n",windows->MouseX,windows->MouseY) ;
return 0 ;
}