Page 1 of 1

IsWindow/IsWindow_ seems broken

Posted: Tue Jan 27, 2009 8:11 am
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?

Posted: Tue Jan 27, 2009 8:28 am
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.

Posted: Tue Jan 27, 2009 9:14 am
by epidemicz
Cool, that would make sense then, ty.

Posted: Tue Jan 27, 2009 11:03 am
by srod
Or there is the api function IsWindow_(hWnd).