Re: determine invalid window process
- From: X. Zhang <XZhang@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 29 Jul 2008 12:56:02 -0700
Further to my last post, I tested again and found the following facts:
hWnd = FindWindow(vbNullString, "Project Navigator")
'hwnd=3803704 returned
bVisible = IsWindowVisible(hWnd)
'bVisible=False returned
But Spy++ returned different Handle, 00690BC4 (6884292); then tried
bVisible = IsWindowVisible(6884292)
'bVisible=True returned.
Somehow, my FindWindow() call returned wrong window handle, even though
IsWindow() returned True. Anything wrong with my call hWnd =
FindWindow(vbNullString, "Project Navigator")? Here the real window title
always starts with "Project Navigator", but has more characters appending to
it.
Thanks,
"expvb" wrote:
"X. Zhang" <XZhang@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message.
news:84630312-7D18-475E-84D7-0CD4E3063CC0@xxxxxxxxxxxxxxxx
Thanks, expvb.
I tried IsWindowVisible(hwnd), but it always returned 0, even if the main
window was visible.
I even tried lRet = GetWindowLong(hwnd, GWL_STYLE), and then check the
value
of (lRet And WS_VISIBLE). It's 0 too, even when the main window was
visible.
So weird.
Any ideas?
IsWindow() should tell if the handle is a valid hWnd. It's possible that the
window has width and height of 0, or moved off screen. Use Spy++ to see the
screen coordinates. If you don't have Spy++, use this free alternative:
http://www.windows-spy.com
- References:
- Re: determine invalid window process
- From: expvb
- Re: determine invalid window process
- From: expvb
- Re: determine invalid window process
- Prev by Date: Re: determine invalid window process
- Previous by thread: Re: determine invalid window process
- Next by thread: send message to inactive window
- Index(es):
Relevant Pages
|
Loading