IsWindow/IsWindow_ seems broken

Windows specific forum
epidemicz
User
User
Posts: 86
Joined: Thu Jan 22, 2009 8:05 am
Location: USA
Contact:

IsWindow/IsWindow_ seems broken

Post by epidemicz »

Ran a few searches but didn't see anyone talking about IsWindow()/IsWindow_(), it seems like its broken to me...or possibly the documentation is.

From the documentation:
This function is bullet-proof and can be used with any value. If the 'Result' is not zero then the object is valid and initialized, else it returns zero. This is the correct way to ensure that a window is ready to use.

If it finds a valid window its 0 otherwise its non-0.

Code: Select all

hwnd = FindWindow_(#Null, "HTML Help")
Debug IsWindow(hwnd)
Anyone else having this problem here, are the docs just borked, or whats going on?
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Post by Arctic Fox »

IsWindow() only works for windows opened with PureBasic - by using the window number, for instance OpenWindow(#Window, x, y, InnerWidth, InnerHeight, Title$ [, Flags [, ParentWindowID]]) with #Window being the window number.
epidemicz
User
User
Posts: 86
Joined: Thu Jan 22, 2009 8:05 am
Location: USA
Contact:

Post by epidemicz »

Cool, that would make sense then, ty.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Or there is the api function IsWindow_(hWnd).
I may look like a mule, but I'm not a complete ass.
Post Reply