Question : Is window visible, in front

Hello,

howi t is possible to check whether a window has hwnd and is "visible" but not in Front/onTop?
I need to know when the window will lost TopPosition but is still visible (not minimized).

Ocrana

Answer : Is window visible, in front

CWnd* pWnd;
assign a window to pWnd (new, Create, Attach, GetDlgItem....)
.....


pWnd->GetSafeHwnd();    //returns NULL if no hwnd

(pWnd->GetSafeHwnd() != CWnd::GetForegroundWindow()->GetSafeHwnd())   //true if the foreground (active) window is a different window

pWnd->IsIconic();   returns true if minimised
Random Solutions  
 
programming4us programming4us