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


C++ CCoolBarItem::Show方法代码示例

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


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

示例1: OnNetworkDisconnect

void CPlayerWnd::OnNetworkDisconnect()
{
	m_wndPlayer.Setup();
	m_bPlaying	= FALSE;
	
	CCoolBarItem* pItem = m_wndHeaderBar.GetID( ID_NETWORK_CONNECT );
	if ( pItem ) pItem->Show( TRUE );

	pItem = m_wndHeaderBar.GetID( ID_NETWORK_DISCONNECT );
	if ( pItem ) pItem->Show( FALSE );
	
	ResyncStream( RenderPayload(PayloadMask_Audio | PayloadMask_Video) );
}
开发者ID:pics860,项目名称:callcenter,代码行数:13,代码来源:wndplayer.cpp

示例2: OnUpdate

BOOL CPlugins::OnUpdate(CChildWnd* pActiveWnd, CCmdUI* pCmdUI)
{
	UINT nCommandID		= pCmdUI->m_nID;
	TRISTATE bVisible	= TRI_TRUE;
	TRISTATE bEnabled	= TRI_TRUE;
	TRISTATE bChecked	= TRI_UNKNOWN;

	CCoolBarItem* pCoolUI = CCoolBarItem::FromCmdUI( pCmdUI );

	if ( pActiveWnd != NULL && pActiveWnd->IsKindOf( RUNTIME_CLASS(CPluginWnd) ) )
	{
		CPluginWnd* pPluginWnd = (CPluginWnd*)pActiveWnd;

		if ( pPluginWnd->m_pOwner )
		{
			if ( pPluginWnd->m_pOwner->OnUpdate( nCommandID, &bVisible, &bEnabled, &bChecked ) == S_OK )
			{
				if ( bVisible != TRI_UNKNOWN && pCoolUI != NULL )
					pCoolUI->Show( bVisible == TRI_TRUE );
				if ( bEnabled != TRI_UNKNOWN )
					pCmdUI->Enable( bEnabled == TRI_TRUE );
				if ( bChecked != TRI_UNKNOWN )
					pCmdUI->SetCheck( bChecked == TRI_TRUE );

				return TRUE;
			}
		}
	}

	for ( POSITION pos = GetIterator() ; pos ; )
	{
		CPlugin* pPlugin = GetNext( pos );

		if ( pPlugin->m_pCommand )
		{
			if ( pPlugin->m_pCommand->OnUpdate( nCommandID, &bVisible, &bEnabled, &bChecked ) == S_OK )
			{
				if ( bVisible != TRI_UNKNOWN && pCoolUI != NULL )
					pCoolUI->Show( bVisible == TRI_TRUE );
				if ( bEnabled != TRI_UNKNOWN )
					pCmdUI->Enable( bEnabled == TRI_TRUE );
				if ( bChecked != TRI_UNKNOWN )
					pCmdUI->SetCheck( bChecked == TRI_TRUE );

				return TRUE;
			}
		}
	}

	return FALSE;
}
开发者ID:lemonxiao0,项目名称:peerproject,代码行数:51,代码来源:Plugins.cpp

示例3: OnNetworkConnect

void CPlayerWnd::OnNetworkConnect()
{
	CWaitCursor pCursor;
	
	CString strUrl;
	m_wndHistory.GetWindowText( strUrl );
	strUrl.TrimLeft(); strUrl.TrimRight();
	
	m_wndPlayer.Setup();
	m_wndPlayer.InstallCapture( (CComBSTR)Settings.Audio.Render, L"Audio Renderer" );
	
	IBaseFilter* pCapture;
	if ( FAILED(m_wndPlayer.RenderUrl( (CComBSTR)strUrl, &pCapture )) ) return;
	
	UnsyncStream( RenderPayload(PayloadMask_Audio | PayloadMask_Video) );
//	m_wndPlayer.ResizeConfig( pCapture );
	
	IBaseFilter* pInfTee[2];
	m_wndPlayer.BranchStream( L"Audio Renderer", &pInfTee[0] );
	m_wndPlayer.BranchStream( L"Video Renderer", &pInfTee[1] );
	
	m_bPlaying = SUCCEEDED(m_wndPlayer.StartPreview( rectDefault, m_hWnd ));
	OnSize( SIZE_INTERNAL, 0, 0 );
	
	int nItem = m_wndHistory.FindStringExact( -1, strUrl );
	if ( nItem != -1 ) m_wndHistory.DeleteString( nItem );
	
	if ( m_wndHistory.GetCount() >= MAX_ITEM ) m_wndHistory.DeleteString( MAX_ITEM - 1 );
	m_wndHistory.SetCurSel( m_wndHistory.InsertString( 0, strUrl ) );
	
	CCoolBarItem* pItem = m_wndHeaderBar.GetID( ID_NETWORK_CONNECT );
	if ( pItem ) pItem->Show( FALSE );

	pItem = m_wndHeaderBar.GetID( ID_NETWORK_DISCONNECT );
	if ( pItem ) pItem->Show( TRUE );
	
	SaveXML();
}
开发者ID:pics860,项目名称:callcenter,代码行数:38,代码来源:wndplayer.cpp

示例4: CreateToolBar

BOOL CSkin::CreateToolBar(CXMLElement* pBase)
{
	CCoolBarCtrl* pBar = new CCoolBarCtrl();
	
	for ( POSITION pos = pBase->GetElementIterator() ; pos ; )
	{
		CXMLElement* pXML = pBase->GetNextElement( pos );
		
		if ( pXML->IsNamed( _T("button") ) )
		{
			if ( UINT nID = LookupCommandID( pXML ) )
			{
				CCoolBarItem* pItem = pBar->Add( nID, pXML->GetAttributeValue( _T("text") ) );
				CString strTemp = pXML->GetAttributeValue( _T("colour") );
				
				if ( strTemp.GetLength() == 6 )
				{
					int nRed, nGreen, nBlue;
					_stscanf( strTemp.Mid( 0, 2 ), _T("%x"), &nRed );
					_stscanf( strTemp.Mid( 2, 2 ), _T("%x"), &nGreen );
					_stscanf( strTemp.Mid( 4, 2 ), _T("%x"), &nBlue );
					pItem->m_crText = RGB( nRed, nGreen, nBlue );
				}
				
				strTemp = pXML->GetAttributeValue( _T("tip") );
				if ( strTemp.GetLength() ) pItem->SetTip( strTemp );
				
				strTemp = pXML->GetAttributeValue( _T("visible") );
				if ( strTemp.GetLength() ) pItem->Show( FALSE );
			}
		}
		else if ( pXML->IsNamed( _T("separator") ) )
		{
			pBar->Add( ID_SEPARATOR );
		}
		else if ( pXML->IsNamed( _T("rightalign") ) )
		{
			pBar->Add( ID_RIGHTALIGN );
		}
		else if ( pXML->IsNamed( _T("control") ) )
		{
			UINT nID, nWidth, nHeight = 0;
			CString strTemp;
			
			strTemp = pXML->GetAttributeValue( _T("id") );
			if ( _stscanf( strTemp, _T("%lu"), &nID ) == 1 )
			{
				strTemp = pXML->GetAttributeValue( _T("width") );
				
				if ( _stscanf( strTemp, _T("%lu"), &nWidth ) == 1 )
				{
					strTemp = pXML->GetAttributeValue( _T("height") );
					_stscanf( strTemp, _T("%lu"), &nHeight );
					pBar->Add( nID, nWidth, nHeight );
				}
			}
		}
		else if ( pXML->IsNamed( _T("label") ) )
		{
			CCoolBarItem* pItem = pBar->Add( 1, pXML->GetAttributeValue( _T("text") ) );
			pItem->m_crText = 0;
			pItem->SetTip( pXML->GetAttributeValue( _T("tip") ) );
		}
	}
	
	CString strName = pBase->GetAttributeValue( _T("name") );
	
	CCoolBarCtrl* pOld = NULL;
	if ( m_pToolbars.Lookup( strName, (void*&)pOld ) && pOld ) delete pOld;
	
	m_pToolbars.SetAt( strName, pBar );
	
	return TRUE;
}
开发者ID:pics860,项目名称:callcenter,代码行数:74,代码来源:skin.cpp


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