Ejemplo n.º 1
0
BOOL CWorkTab::OnPaint(HDC hDC)
{
	CPaintDC dc(this); // device context for painting
	CBrush cbr;
	CRect m_rectDraw;
	cbr.CreateSolidBrush(CDrawLayer::GetRGBColorXP());
	
	GetClientRect(m_rectCliente);
	m_rectTab = m_rectCliente;
	m_rectDraw = m_rectCliente;
	
	if (m_alnTab == ALN_BOTTOM)
		m_rectDraw.bottom = m_rectCliente.bottom- (theApp->m_WinMain->m_sizeImagDocks.cy + SPACE_TAB + 2);	
	
	CRect rc = m_rectDraw;
	rc.top += 1;
	rc.bottom = rc.top + 1;
	dc.Draw3dRect(rc, CDrawLayer::GetRGBColorFace(), CDrawLayer::GetRGBColorFace());
	
	if (m_alnTab == ALN_BOTTOM)
	{
		m_rectCliente.bottom = m_rectCliente.bottom- (DEFAULT_FLAT);
		m_rectTab.top = m_rectCliente.bottom + 2;
	}
	cbr.DeleteObject();
	Drawtabs(&dc);
	dc.DeleteDC();
	return TRUE;
}
Ejemplo n.º 2
0
void CGuiWorkTab::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	CBrush cbr;
	CRect m_rectDraw;
	cbr.CreateSolidBrush(GuiDrawLayer::GetRGBColorXP());
	
	GetClientRect(m_rectCliente);
	m_rectTab = m_rectCliente;
	m_rectDraw = m_rectCliente;
	
	if (m_alnTab == ALN_BOTTOM)
		m_rectDraw.bottom = m_rectCliente.bottom- (m_sizeImag.cy + SPACE_TAB + 2);	
	
	CRect rc = m_rectDraw;
	rc.top += 1;
	rc.bottom = rc.top + 1;
	dc.Draw3dRect(rc, GuiDrawLayer::GetRGBColorFace(m_StyleDisplay), GuiDrawLayer::GetRGBColorFace(m_StyleDisplay));
	
	if (m_alnTab == ALN_BOTTOM)
	{
		m_rectCliente.bottom = m_rectCliente.bottom- (DEFAULT_FLAT);
		m_rectTab.top = m_rectCliente.bottom + 2;
	}
	cbr.DeleteObject();
	Drawtabs(&dc);
}
Ejemplo n.º 3
0
void CGuiWorkTab::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
    // TODO: Add your message handler code here and/or call default

    CWnd::OnHScroll(nSBCode, nPos, pScrollBar);

    /*Modified By SunZhenyu 2003/10/22, Remove the next 1 line
    if (pScrollBar == (CScrollBar*)&m_scroll )
    */
    {
        CGuiTab* ct=(CGuiTab*) m_pArray[m_iSelectTab];
        CWnd* ViewAc=ct->pParent;
        int rangmin,rangMax;
        ViewAc->SendMessage(WM_HSCROLL,MAKEWPARAM(nSBCode,nPos));
        ViewAc->GetScrollRange(SB_HORZ,&rangmin,&rangMax);
        m_scroll.SetScrollRange(rangmin,rangMax);
        m_scroll.SetScrollPos(ViewAc->GetScrollPos(SB_HORZ));

        return;
    }
    CClientDC dc(this);
    Drawtabs(&dc);




}
Ejemplo n.º 4
0
void CGuiTabWnd::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	CBrush cbr;
	CRect m_rectDraw;
	if (m_alnTab!=ALN_TOP)
		cbr.CreateSolidBrush(GuiDrawLayer::GetRGBColorXP());
	else
		cbr.CreateSolidBrush(GuiDrawLayer::GetRGBColorFace());
	GetClientRect(m_rectCliente);
	m_rectTab=m_rectCliente;
	m_rectDraw=m_rectCliente;
	if (m_alnTab==ALN_BOTTOM)
		m_rectDraw.bottom=m_rectCliente.bottom-(m_sizeImag.cy+SPACE_TAB+2);	
	else
		m_rectDraw.top=m_rectCliente.top+(m_sizeImag.cy+SPACE_TAB+2);
	
	if (m_alnTab!=ALN_TOP)
	{
		/* Modified By SunZhenyu 2003/10/26, Remove next 2 lines. */
		// dc.FillRect(m_rectTab,&cbr);
		// dc.Draw3dRect(m_rectDraw,GetSysColor(COLOR_BTNSHADOW),GetSysColor(COLOR_BTNSHADOW));
	}
	else
	{
		CRect rc=m_rectDraw;
		for (int i=0; i< 2; i++)
		{
			dc.Draw3dRect(rc,GuiDrawLayer::GetRGBColorFace(),GuiDrawLayer::GetRGBColorFace());
			rc.DeflateRect(1,1);
		}
		
		rc.InflateRect(3,3);
		dc.Draw3dRect(rc,GetSysColor(COLOR_BTNSHADOW),GetSysColor(COLOR_BTNSHADOW));
		rc=m_rectDraw;
		rc.bottom=rc.top+3;
		dc.FillRect(rc,&cbr);
		
	}
	
	
	if (m_style != S3D) //si son carpetas estilo excel o tabbed como devstudio 7
	{
		if (m_alnTab==ALN_BOTTOM)
		{
			m_rectCliente.bottom=m_rectCliente.bottom-(DEFAULT_FLAT);
			m_rectTab.top=m_rectCliente.bottom+2;
		}
		else
		{
			m_rectTab.bottom=m_rectCliente.top+(DEFAULT_FLAT)+3;
		}
	}

	Drawtabs(&dc);
	
}
Ejemplo n.º 5
0
void CWorkTab::OnSpiNiz(WPARAM wParam, LPARAM lParam, HWND hWnd)
{
	if (m_EnableL == TRUE)
	{
		m_PresLeft   = TRUE;
		m_PresRight  = FALSE;
		m_deplaza   += 10;
		CClientDC dc(this);
		Drawtabs(&dc);
	}
}
Ejemplo n.º 6
0
void CGuiWorkTab::OnSpiNde()
{
	if (m_EnableR == TRUE)
	{
		m_PresLeft = FALSE;
		m_PresRight = TRUE;
		m_deplaza -= 10; 	
		CClientDC dc(this);
		Drawtabs(&dc);	
	}
}
Ejemplo n.º 7
0
void CWorkTab::OnSpiNde(WPARAM wParam, LPARAM lParam, HWND hWnd)
{
	if (m_EnableR == TRUE)
	{
		m_PresLeft = FALSE;
		m_PresRight = TRUE;
		m_deplaza -= 10; 	
		CClientDC dc(this);
		Drawtabs(&dc);	
		dc.DeleteDC();
	}
}
Ejemplo n.º 8
0
void CGuiWorkTab::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
{
	// TODO: Add your message handler code here and/or call default
	
	//CWnd::OnHScroll(nSBCode, nPos, pScrollBar);
	
	if (pScrollBar->GetSafeHwnd() == m_scroll.GetSafeHwnd())
	{
		CGuiTab* ct = (CGuiTab*) m_pArray[m_iSelectTab];
		CWnd* ViewAc = ct->pParent;
		ViewAc->SendMessage(WM_HSCROLL, MAKEWPARAM(nSBCode, nPos));  
		SizeScroll();
		
		return;
	}

    CClientDC dc(this);
	Drawtabs(&dc);
}
Ejemplo n.º 9
0
void CWorkTab::OnHScroll(UINT nSBCode, UINT nPos, HWND hScrollBar) 
{
	// TODO: Add your message handler code here and/or call default
	
	Default();
	
	if (hScrollBar == m_scroll.GetSafeHwnd())
	{
		CTab* ct = (CTab*) m_pArray[m_iSelectTab];
		CWin* ViewAc = reinterpret_cast<CWin*>(ct->pParent);
		ViewAc->SendMessage(WM_HSCROLL, MAKEWPARAM(nSBCode, nPos),0);  
		SizeScroll();
		
		return;
	}

    CClientDC dc(this);
	Drawtabs(&dc);
	dc.DeleteDC();
}
Ejemplo n.º 10
0
BOOL CContainer::OnPaint(HDC hDC) 
{
	CRect rcClient;
	CPaintDC dc(GetSafeHwnd()); // device context for painting
	CBrush cbr;
	CRect m_rectDraw;
	cbr.CreateSolidBrush(CDrawLayer::GetRGBColorFace());
	GetClientRect(rcClient);
	CGDI		MemDC;
	CBitmap		m_BitmapMemDC;
	MemDC.CreateCompatibleDC(dc.m_hDC);
	m_BitmapMemDC.CreateCompatibleBitmap(dc.m_hDC,rcClient.Width(),rcClient.Height());	
	
	CBitmap *m_bitmapOld=new CBitmap(MemDC.SelectObject(&m_BitmapMemDC));
	MemDC.FillRect(&rcClient,&cbr);
		
	m_rectTab=m_rectCliente;
	m_rectDraw=m_rectCliente;
	if (m_alnTab==ALN_BOTTOM)
	{
		if (m_Numtabs > 1)
		m_rectDraw.bottom=rcClient.bottom-(m_sizeImag.cy+SPACE_TAB+2);	
	}
	else
		m_rectDraw.top=rcClient.top+(m_sizeImag.cy+SPACE_TAB+2);
	
	if (m_style != S3D) //si son carpetas estilo excel o tabbed como devstudio 7
	{
		if (m_alnTab==ALN_BOTTOM)
		{
			m_rectCliente.bottom=rcClient.bottom-(DEFAULT_FLAT);
			m_rectTab.top=rcClient.bottom+2;
		}
		else
		{
			m_rectTab.bottom=rcClient.top+(DEFAULT_FLAT)+3;
		}
	}

	int nVal=0;
	
	if (m_alnTab!=ALN_TOP)
	{
		
		MemDC.FillRect(m_rectTab,&cbr);
		CRect mrc=m_rectDraw;
		
	}
	else
	{
		CRect rc=m_rectDraw;
		for (int i=0; i< 2; i++)
		{
			MemDC.Draw3dRect(rc,CDrawLayer::GetRGBColorFace(),CDrawLayer::GetRGBColorFace());
			rc.DeflateRect(1,1);
		}
		
		rc.InflateRect(3,3);
		if (m_bDrawFrame)
			MemDC.Draw3dRect(rc,GetSysColor(COLOR_BTNSHADOW),GetSysColor(COLOR_BTNSHADOW));
		else
		{
			CRect mrc=m_rectDraw;
			mrc.top+=nVal;
			MemDC.Draw3dRect(mrc,GetSysColor(COLOR_BTNSHADOW),GetSysColor(COLOR_BTNSHADOW));

		}
		rc=m_rectDraw;
		rc.bottom=rc.top+3;
		MemDC.FillRect(rc,&cbr);
		
	}
	
	
	
	Drawtabs(&MemDC);

	dc.BitBlt(0,0,rcClient.Width(),rcClient.Height(),MemDC.m_hDC,
		      rcClient.left,rcClient.top,SRCCOPY);
	MemDC.SelectObject(m_bitmapOld);
	m_BitmapMemDC.DeleteObject();
	MemDC.DeleteDC();
	cbr.DeleteObject();
	m_bitmapOld->DeleteObject();
	dc.DeleteDC();
	delete m_bitmapOld;
	return TRUE;
}