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


C++ CElement::Draw方法代码示例

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


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

示例1:

/*****************************************************************
 * 
 * method :void		DrawCurrentPage(CDC *inDC)
 *
 * parameters : inCDC a device context
 *
 * returns : nothing
 *
 * description: Draw the current page
 *
 *
 ****************************************************************/
void		CEasyReport::DrawCurrentPage(CDC *inDC)
{
	int			i,aStart, aMax;
	CElement	*aElem;
	
	if( m_CurPage != 0 )
		aStart = m_PageItems[m_CurPage-1];
	else
		aStart = 0;
	aMax = m_PageItems[m_CurPage];
	for( i =aStart;i< aMax;i++)
	{
		aElem = (CElement *)m_ReportItems[i];
		aElem->Draw(inDC);
	}


/*	
	CRect	aRect(m_LeftMargin, -m_TopMargin, 
				m_PageWidth - m_RightMargin, -(m_PageHeight-m_BottomMargin));
	inDC->MoveTo(aRect.left, aRect.top);
	inDC->LineTo(aRect.right,aRect.top);
	inDC->LineTo(aRect.right, aRect.bottom);
	inDC->LineTo(aRect.left, aRect.bottom);
	inDC->LineTo(aRect.left, aRect.top);
*/	
}
开发者ID:BackupTheBerlios,项目名称:flushcms,代码行数:39,代码来源:EasyReport.cpp

示例2: Draw

void CCell::Draw(CDC *pDC)
{
	POSITION pos;
	CElement *pElement;
	for(pos=m_Elements.GetHeadPosition();pos!=NULL;){
		pElement=(CElement *)(m_Elements.GetNext(pos));
		pElement->Draw(pDC);
	}
}
开发者ID:eseawind,项目名称:CNCS_PMC-Conductor,代码行数:9,代码来源:Cell.cpp

示例3: OnDraw

void CSkViewView::OnDraw(CDC* pDC)
{
	CSkViewDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	if (!pDoc)
		return;

  POSITION aPos = pDoc->GetListHeadPosition();
  CElement* pElement = 0;
  while(aPos)
  {
    pElement = pDoc->GetNext(aPos);
    if(pDC->RectVisible(pElement->GetBoundRect()))
      pElement->Draw(pDC);
  }
}
开发者ID:salomarx,项目名称:Visual-studio-2008-for-C-plus,代码行数:16,代码来源:SkViewView.cpp

示例4: OnDraw

void CSketcherView::OnDraw(CDC* pDC)
{
  CSketcherDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);
  if(!pDoc)
    return;

  POSITION aPos = pDoc->GetListHeadPosition();
  CElement* pElement = 0;              // Store for an element pointer
  while(aPos)                          // Loop while aPos is not null
  {
    pElement = pDoc->GetNext(aPos);    // Get the current element pointer
    // If the element is visible...
    if(pDC->RectVisible(pElement->GetBoundRect()))
      pElement->Draw(pDC, m_pSelected);// ...draw it
  }
}
开发者ID:salomarx,项目名称:Visual-studio-2008-for-C-plus,代码行数:17,代码来源:SketcherView.cpp

示例5: GameMain

void CGame::GameMain()
{

	int i;

	CShanaProt*	player1;
	CShanaProt*	player2;

	m_Mode = m_NextMode ;
	switch( m_Mode ){
		case 0:
			// タイトルのスタート
			m_ModeTitle = new(m_CommonMode) CModeTitle( this );
			SetMode( 2 );
			break;

		case 1:
			// バトルモードスタート
			new(m_CommonMode) CModeBattle( this, m_ModeCharaSel->GetDecideChara( 0 ), m_ModeCharaSel->GetDecideChara( 1 ));
			SetMode( 2 );
			break;

		case 3:
			// タイトルモードの削除	
			if( m_ModeTitle != NULL ){
				delete m_ModeTitle;
				m_ModeTitle = NULL;
			}
			if( m_ModeCharaSel != NULL ){
				delete m_ModeCharaSel;
				m_ModeCharaSel = NULL;
			}
			SetMode( 2 );
			break;

		case 4:
			// 
			new(m_CommonMode) CModeBattle( this );
			SetMode( 2 );
			break;

		case 5:
			// キャラセレクトのスタート
			m_ModeCharaSel = new(m_CommonMode) CModeCharaSelect( this );
			if( m_ModeTitle != NULL ){
				delete m_ModeTitle;
				m_ModeTitle = NULL;
			}
			SetMode( 2 );
			break;

	}

	m_Input->UpDateState();

	CElement*	cEle;
	CElement*	cEleNext;

	// MOVE Main
	cEle = m_CommonMode->m_ActiveTask->m_Next;
	while( cEle->m_Next != m_CommonMode->m_ActiveTask->m_Next ){
		cEleNext = cEle->m_Next ;
		if( cEle->Move() == FALSE ){
			delete cEle;
		}
		else{
			cEle->Action();
			cEle->ActionFinalize();
			cEle->Interfere();
			cEle->InterfereFinalize();
		}
		cEle = cEleNext ;
	}

	// Begin the scene.
	LPDIRECT3DDEVICE9 d3ddevice;
	d3ddevice = m_D3DDraw.GetDevice();
	d3ddevice->BeginScene();
	// 画面クリア
	d3ddevice->Clear(0,NULL,D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,D3DCOLOR_XRGB(0,0,0),1.0f,0);

/*	for( i=0 ; i<4 ; i++ ){
		if( m_DispObjGroup->m_CDisp[i].m_Visible == TRUE ){
			m_D3DDraw.Draw( &m_DispObjGroup->m_CDisp[i] );
		}
	}
*/
	cEle = m_CommonMode->m_ActiveTask->m_Next;
	while( cEle->m_Next != m_CommonMode->m_ActiveTask->m_Next ){
		cEleNext = cEle->m_Next ;
		cEle->Draw( &m_D3DDraw );
		cEle->DrawFinalize();
		cEle = cEleNext ;
	}

	d3ddevice->EndScene();

//	CFps::GetCFps()->WaitNextUpdate();

	// 画面に表示(バッファスワップ)
//.........这里部分代码省略.........
开发者ID:childs-heart,项目名称:ChiruhaSyana,代码行数:101,代码来源:Game.cpp


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