how to find a window's SW_SHOW/SW_HIDE status

前端 未结 6 1817
野趣味
野趣味 2021-01-01 22:44

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

6条回答
  •  庸人自扰
    2021-01-01 23:11

    I don't know if there is a proper method for this task but I would try WindowFromPoint Function.

    Remarks

    The WindowFromPoint function does not retrieve a handle to a hidden or disabled window, even if the point is within the window. An application should use the ChildWindowFromPoint function for a nonrestrictive search.

    For example I would convert control's corner coords into screen coords and then try to get it's handle from those points.

提交回复
热议问题