how to find a window's SW_SHOW/SW_HIDE status

前端 未结 6 1804
野趣味
野趣味 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条回答
  •  Happy的楠姐
    2021-01-01 22:57

    If it is a multi-tab dialog and not a control, then override as

    void MyClass::OnShowWindow(BOOL bShow, UINT nStatus)
    {
        m_nCmdShow = bShow;
        CDialog::OnShowWindow(bShow, nStatus);
    }
    

    In BEGIN_MESSAGE_MAP, add ON_WM_SHOWWINDOW().

    m_nCmdShow now has the status if the window is SW_SHOW or SW_HIDE.

提交回复
热议问题