The same thing seems to apply to OpenWindow() too.help wrote:PureBasic - Gadget
...
If a static number was given to identify the gadget instead of #PB_Any, then the functions return the OS identifier for the created Gadget.
If we could also get the os handle when using #PB_ANY,
so that the gadget number would be the same as the gadget id,
we wouldn't need to take care for 2 sets of numbers identifying gadgets.
We could then use the gadget number for api, for GadgetType() etc.
in functions enhancing the functionality of gadgets...
This would be especially usefull as there seems to be no (simple) way
to get the gadget number (f.e. needed for GadgetType()) out of the handle.
And we would not need to use GadgetId() in that case

(If GadgetId() would be called, it would return the gadget number.)