1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to tell if window is truely visible?

Discussion in 'Win32' started by ajcrm125, Oct 1, 2006.

  1. ajcrm125

    ajcrm125 New Member

    Joined:
    Oct 1, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    I tried the IsWindowVisible() function but it doesn't seem to be doing anything at all.... always returns non 0 even when I have tons of other windows on top of my app.

    ???

    -Adam
     
  2. tiger12506

    tiger12506 New Member

    Joined:
    Jun 6, 2007
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    What you mean to ask is "How can i tell if my window is on top?"

    Indeed, you answered you're own inquiry by your terminology "when i have tons of other windows on top of my app"

    IsWindowVisible does what it is supposed to do. It tells you whether the window is "visible" or not. If you wish to know just what windows thinks that "invisible" is, then call this function -> ShowWindow(hwnd,SW_HIDE);
    To find out if your window is "on top" - your definition of visible - then use this
    if (GetTopWindow(NULL) == hwnd) {}
     

Share This Page