Re: determine invalid window process



"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



.



Relevant Pages

  • Cant get text from another VB application
    ... I am trying to get text from another application window written in VB6. ... The second VB6 application expect to get the contents of the 3 text boxes ... Dim lRet As Long ...
    (comp.lang.basic.visual.misc)
  • Re: Hide Start Orb - Vista
    ... Get the process ID of the Explorer process that owns the task bar. ... If it is the same as Explorer's, get the window text. ... Work Software Systems ... I have used WinID and Spy & Capure, two tools that work just like Spy++, to ...
    (microsoft.public.vb.winapi)
  • Re: Screen coordinates, GetWindowRect(), dialog units, and screen resolution
    ... > I'm trying to solidify my conception of screen coordinates, GetWindowRect(), dialog units, and screen resolution. ... For a maximized window this will be the ...
    (microsoft.public.vc.mfc)
  • Re: WM_LBUTTONDOWN doesnt happen until mouse released?
    ... I'm looking with Spy++ at the messages for a simple window. ... I've never seen a delay between pressing the mouse ... the problem behavior turned out to be caused by my touch-pad ...
    (microsoft.public.win32.programmer.ui)
  • Re: Are VBA userforms always child of Windows desktop?
    ... When I load a modeless userform then in Spy++ the treeview suggests that the form is a child of the desktop. ... Retrieves the parent window. ...
    (microsoft.public.excel.programming)

Loading