There is to do the inverse of WindowID()?
To find the #Window from the Handle?
Please help.
Inverse WindowID()
For Window try this :
For Gadget :
Code: Select all
debug GetProp_(hWnd,"PB_WindowID") -1
Code: Select all
debug GetProp_(hWnd,"PB_ID")
;or
debug GetDlgCtrlID_(hWnd)
-
- Enthusiast
- Posts: 289
- Joined: Mon Apr 02, 2007 7:22 am
- Location: Finland
Not possible.
The hWnd (WindowID) is a WinAPI and OS exclusive handle, while the #Window in PureBasic is exclusive to PureBasic. If it would be possible to get the PureBasic #Window from a hWnd, that would mean all applications including non-PureBasic applications would have a #Window, but that is ofcourse impossible, because the hWnd's weren't created by PureBasic and so it can't get exclusive access to them.
The hWnd (WindowID) is a WinAPI and OS exclusive handle, while the #Window in PureBasic is exclusive to PureBasic. If it would be possible to get the PureBasic #Window from a hWnd, that would mean all applications including non-PureBasic applications would have a #Window, but that is ofcourse impossible, because the hWnd's weren't created by PureBasic and so it can't get exclusive access to them.
Cute?
Code: Select all
GetProp_(hWnd,"PB_WindowID") -1

Windows 7 & PureBasic 4.4
- Fluid Byte
- Addict
- Posts: 2336
- Joined: Fri Jul 21, 2006 4:41 am
- Location: Berlin, Germany
Wtf? That's it? A simple window property? Jesus, there should really be some kind of documentation for all these internal PB tricks.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
WOrked! Thanks!hallodri wrote:For Window try this :
For Gadget :Code: Select all
debug GetProp_(hWnd,"PB_WindowID") -1
Code: Select all
debug GetProp_(hWnd,"PB_ID") ;or debug GetDlgCtrlID_(hWnd)
