Window Notify NMHDR\idFrom
Posted: Sat Jan 17, 2026 4:54 pm
If gadgets are created with #PB_Any, the wrong DialogID is entered, so the wrong IdFrom comes in the Notify NMHDR.
With X64 this is 64bit.
With X64 this is 64bit.
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
*hdr.NMHDR = lParam
Gadget = GetWindowLongPtr_(*hdr\hwndFrom, #GWLP_ID)
; Is it a valid PB gadget?
If GadgetID(Gadget) = *hdr\hwndFrom
...
EndIf
Code: Select all
Debug GetProp_(\hdr\hwndFrom, "PB_ID"); Ok
Debug GetWindowLongPtr_(\hdr\hwndFrom, #GWLP_ID); Ok
Debug GetDlgCtrlID_(\hdr\hwndFrom); Wrong
Debug \hdr\idFrom; Wrong