void CStatusCmdUI::SetCheck( int nCheck ) /***************************************/ { CStatusBar *pStatusBar = (CStatusBar *)m_pOther; ASSERT( pStatusBar != NULL ); ASSERT( pStatusBar->IsKindOf( RUNTIME_CLASS( CStatusBar ) ) ); UINT nStyle = pStatusBar->GetPaneStyle( m_nIndex ); if( nCheck == 0 ) { nStyle &= ~SBPS_POPOUT; } else { nStyle |= SBPS_POPOUT; } pStatusBar->SetPaneStyle( m_nIndex, nStyle ); }
void CStatusCmdUI::Enable( BOOL bOn ) /***********************************/ { CStatusBar *pStatusBar = (CStatusBar *)m_pOther; ASSERT( pStatusBar != NULL ); ASSERT( pStatusBar->IsKindOf( RUNTIME_CLASS( CStatusBar ) ) ); UINT nStyle = pStatusBar->GetPaneStyle( m_nIndex ); if( bOn ) { nStyle &= ~SBPS_DISABLED; } else { nStyle |= SBPS_DISABLED; } pStatusBar->SetPaneStyle( m_nIndex, nStyle ); }