In my new gadget class I allow setting of GA_HintInfo. I don't know if I am setting it wrong in OM_SET or not doing it right in the dispatcher at GM_HELPTEST. It shows my gadget's hint info for every gadget regardless of what theirs is.
case GM_HELPTEST: // retval=IIntuition->IDoSuperMethodA(cl,o,msg); // retval=GMR_HELPHIT; return(GMR_HELPCODE | 0x0000C0DE); break; case GM_QUERY: if (((struct gpQuery *)msg)->gpq_Type==GMQ_HINTINFO) { *(((struct gpQuery *)msg)->gpq_Data)=(LONG )IDD->HintInfo; } // retval=IIntuition->IDoSuperMethodA(cl,o,msg); retval=GMR_NOREUSE; break;
The problem is AFAICT that you don't check that the ie_X and ie_Y coordinates are inside your gadget.
Ideally in your layout function you should have something like (IDD->Container is a struct IBox where your gadget dimensions will be stored):
And then your GM_QUERY code should look like:
Got it. Thanks.