当前位置: 首页>>代码示例>>C++>>正文


C++ CControlBar::IsWindowVisible方法代码示例

本文整理汇总了C++中CControlBar::IsWindowVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ CControlBar::IsWindowVisible方法的具体用法?C++ CControlBar::IsWindowVisible怎么用?C++ CControlBar::IsWindowVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CControlBar的用法示例。


在下文中一共展示了CControlBar::IsWindowVisible方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnUpdateControlBarMenu

void CFrameWnd::OnUpdateControlBarMenu( CCmdUI *pCmdUI )
/******************************************************/
{
    CControlBar *pBar = GetControlBar( pCmdUI->m_nID );
    if( pBar != NULL ) {
        pCmdUI->SetCheck( pBar->IsWindowVisible() ? 1 : 0 );
    } else {
        pCmdUI->ContinueRouting();
    }
}
开发者ID:ArmstrongJ,项目名称:open-watcom-v2,代码行数:10,代码来源:framewnd.cpp

示例2: OnBarCheck

BOOL CFrameWnd::OnBarCheck( UINT nID )
/************************************/
{
    CControlBar *pBar = GetControlBar( nID );
    if( pBar == NULL ) {
        return( FALSE );
    }
    ShowControlBar( pBar, !pBar->IsWindowVisible(), FALSE );
    return( TRUE );
}
开发者ID:ArmstrongJ,项目名称:open-watcom-v2,代码行数:10,代码来源:framewnd.cpp

示例3: OnSetPreviewMode

void CFrameWnd::OnSetPreviewMode( BOOL bPreview, CPrintPreviewState *pState )
/***************************************************************************/
{
    ASSERT( pState != NULL );
    
    DWORD       dwSaveStates = 0L;
    POSITION    position = m_listControlBars.GetHeadPosition();
    while( position != NULL ) {
        CControlBar *pBar = (CControlBar *)m_listControlBars.GetNext( position );
        ASSERT( pBar != NULL );
        ASSERT( pBar->IsKindOf( RUNTIME_CLASS( CControlBar ) ) );

        DWORD dwID = pBar->GetDlgCtrlID();
        if( dwID >= AFX_IDW_CONTROLBAR_FIRST && dwID < AFX_IDW_CONTROLBAR_FIRST + 32 ) {
            DWORD dwThisState = AFX_CONTROLBAR_MASK( dwID );
            if( pBar->IsWindowVisible() ) {
                dwSaveStates |= dwThisState;
            }
            if( !(pBar->IsDockBar() && pBar->GetDlgCtrlID() == AFX_IDW_DOCKBAR_FLOAT) ) {
                ShowControlBar( pBar, pState->dwStates & dwThisState, TRUE );
            }
        }
    }
    pState->dwStates = dwSaveStates;
    
    if( bPreview ) {
        m_lpfnCloseProc = pState->lpfnCloseProc;
        
        pState->hMenu = ::GetMenu( m_hWnd );
        ::SetMenu( m_hWnd, NULL );
        pState->hAccelTable = m_hAccelTable;
        m_hAccelTable = NULL;
        LoadAccelTable( MAKEINTRESOURCE( AFX_IDR_PREVIEW_ACCEL ) );

        HWND hWndPane = ::GetDlgItem( m_hWnd, pState->nIDMainPane );
        if( hWndPane != NULL ) {
            ::ShowWindow( hWndPane, SW_HIDE );
        }
        hWndPane = ::GetDlgItem( m_hWnd, AFX_IDW_PANE_FIRST );
        if( hWndPane != NULL ) {
            ::SetWindowLong( hWndPane, GWL_ID, AFX_IDW_PANE_SAVE );
        }
    } else {
        m_lpfnCloseProc = NULL;
        
        if( pState->hMenu != NULL ) {
            ::SetMenu( m_hWnd, pState->hMenu );
            pState->hMenu = NULL;
        }
        if( pState->hAccelTable != NULL ) {
            m_hAccelTable = pState->hAccelTable;
            pState->hAccelTable = NULL;
        }

        HWND hWndPane = ::GetDlgItem( m_hWnd, AFX_IDW_PANE_SAVE );
        if( hWndPane != NULL ) {
            ::SetWindowLong( hWndPane, GWL_ID, AFX_IDW_PANE_FIRST );
        }
        hWndPane = ::GetDlgItem( m_hWnd, pState->nIDMainPane );
        if( hWndPane != NULL ) {
            ::ShowWindow( hWndPane, SW_SHOW );
        }
    }
}
开发者ID:ArmstrongJ,项目名称:open-watcom-v2,代码行数:64,代码来源:framewnd.cpp


注:本文中的CControlBar::IsWindowVisible方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。