1.BarryG wrote: ↑Tue May 23, 2023 1:09 am Also, your SetGadgetCallback() is ProcedureReturning either 0 or CallWindowProc_(*lpPrevFunc, hWnd, uMsg, wParam, lParam), but my app needs to return 1 at times, so I can't use your code anyway. Thanks for posting it, though.
If anyone can show me a drop-in way to make ANY gadget get notified of #WM_NOTIFY, without having to code something for every gadget (I have hundreds), then I'm all ears. Even more so if it can just transfer that message to SetWindowCallback() instead so I can handle it there, like 6.01 does. But that still leaves the problem of lots of broken historic code on this forum now.
The GadgetCallback works like WindowCallback.
So you can also determine the return value yourself, as for example with the parent of the ListIconGadget. Call ProcedureReturn or process with CallGadgetProc.
I can look at automatically directing all existing gadgets to a GlobalCallback.