Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to find a window's SW_SHOW/SW_HIDE status

I am trying to determine a window control's visibility that has been hidden or enabled with CWnd::ShowWindow(). (or ::ShowWindow(hWnd,nCmdShow))

I cannot simply use ::IsWindowVisible(hWnd) as the control is on a tab sheet, which may itself be switched out, causing IsWindowVisible to return FALSE.

Is there a way to get the SW_SHOW/HIDE (or others) window status or do I need to use the retun value of ShowWindow() and reset accordingly?

edit: as the control is enabled (or disabled) to show, but may not be currently visible, as the tab is switched ot, I would think that it's SW_SHOW status would remain the same, even if the window itself is not actually switched in. If I'm unrealistic in my expectations that that's fine.

So really I'm looking for 'can this window/control be shown'

like image 219
geocoin Avatar asked Sep 16 '09 11:09

geocoin


1 Answers

Call GetWindowLong( handle, GWL_STYLE), check the returned value for WS_VISIBLE style presence.

like image 120
sharptooth Avatar answered Oct 12 '22 15:10

sharptooth