Example #1
0
void CClassView::OnShowWindow(BOOL bShow, UINT nStatus)
{
	CFormView::OnShowWindow(bShow, nStatus);
	static BOOL IsValid = FALSE;
	if( bShow && !IsValid )
	{
		IsValid = TRUE;
		
		m_client.Load("GacShell.dll");
		m_server.Load("GasShell.dll");
		
		m_Image.Create(16,16,ILC_COLOR16|ILC_MASK,0,1);
		m_Image.Add( ::AfxGetApp()->LoadIcon( IDI_EMPTY ) );
		m_Image.Add( ::AfxGetApp()->LoadIcon( IDI_SERVER ) );
		m_Image.Add( ::AfxGetApp()->LoadIcon( IDI_CLIENT ) );
		m_Image.Add( ::AfxGetApp()->LoadIcon( IDI_SERVERCLASS ) );
		m_Image.Add( ::AfxGetApp()->LoadIcon( IDI_CLIENTCLASS ) );
		m_Image.Add( ::AfxGetApp()->LoadIcon( IDI_OBJECT ) );
		m_classTree.SetImageList(&m_Image, TVSIL_NORMAL);
		
		HTREEITEM hItem = m_classTree.GetChildItem( TVI_ROOT );
		
		TVINSERTSTRUCT Item;
		Item.hParent = TVI_ROOT;
		Item.hInsertAfter = TVI_LAST;
		Item.item.mask = TVIF_IMAGE|TVIF_PARAM|TVIF_TEXT|TVIF_SELECTEDIMAGE;
		Item.item.iImage = 0;
		Item.item.iSelectedImage = 0;
		Item.item.lParam = 0; //(LPARAM)m_curSelResSet;
		Item.item.pszText = "游戏逻辑类"; // (LPSTR)m_curSelResSet->m_resSetName.c_str();		
		HTREEITEM hSetItem = m_classTree.InsertItem( &Item );
		
		Item.hParent = hSetItem;
		Item.item.iImage = 1;
		Item.item.iSelectedImage = 1;
		Item.item.lParam = 0; // (LPARAM)&(m_curSelResSet->m_2DResSet);
		Item.item.pszText = "服务器端逻辑类";	
		ResetServer(m_classTree.InsertItem( &Item ));
		
		Item.hParent = hSetItem;
		Item.item.iImage = 2;
		Item.item.iSelectedImage = 2;
		Item.item.lParam = 0; // (LPARAM)&(m_curSelResSet->m_3DResSet);
		Item.item.pszText = "客户端逻辑类";	
		ResetClient(m_classTree.InsertItem( &Item ));

		m_classTree.Expand( hSetItem, TVE_EXPAND );
	}
}
Example #2
0
void CMultiSort::Redraw( CDC * pDC, CRect rectAll )
{
	ASSERT( m_pParent && ::IsWindow( m_pParent->GetSafeHwnd() ) );
	if( !m_pParent || !::IsWindow(m_pParent->GetSafeHwnd()) )
		return;
	
	ResetClient( rectAll );

	CClientDC	dc(m_pParent);
	if( NULL == pDC )
		pDC		=	&dc;

	DrawRise( pDC, m_rectRise );
	DrawFall( pDC, m_rectFall );
	DrawDiff( pDC, m_rectDiff );
	DrawRiseMin5( pDC, m_rectRiseMin5 );
	DrawFallMin5( pDC, m_rectFallMin5 );
	DrawVolRatio( pDC, m_rectVolRatio );
	DrawBSRatioAsc( pDC, m_rectBSRatioAsc );
	DrawBSRatioDesc( pDC, m_rectBSRatioDesc );
	DrawAmount( pDC, m_rectAmount );
}