Esempio n. 1
0
void CContainer::RecalLayout()
{
	GetClientRect(m_rectCliente);

	if (m_style == S3D)
	{
		if (m_Numtabs > 1)
			m_rectCliente.bottom=m_rectCliente.bottom-(m_sizeImag.cy+SPACE_TAB-1);
	}
	else
	{
		if (m_alnTab==ALN_BOTTOM)
			m_rectCliente.bottom=m_rectCliente.bottom-(DEFAULT_FLAT+1);
		else
		{
			m_rectCliente.top+=DEFAULT_FLAT;
			m_rectCliente.bottom=m_rectCliente.bottom-(DEFAULT_FLAT+4);

		}
	}

	for (int iCont=0; iCont< m_Numtabs;iCont++)
	{
		CTab* ct=(CTab*) m_pArray[iCont];
		CWin* m_tempWin= ct->pParent;
		ASSERT(m_tempWin);
		CRect mrc;
				
		if (m_style == S3D)
		{
			   m_tempWin->SetWindowPos(NULL,m_rectCliente.left+(SPACE_TAB-4),
			   m_rectCliente.top+(SPACE_TAB/2),m_rectCliente.right-(SPACE_TAB-4),
			   m_rectCliente.bottom-((SPACE_TAB)),SWP_NOACTIVATE|
			   SWP_NOZORDER);
		}
		else
		{
			if (m_alnTab==ALN_BOTTOM)	
			{
			   	   
			   m_tempWin->SetWindowPos(NULL,m_rectCliente.left+(SPACE_TAB-3),
			   m_rectCliente.top+1,m_rectCliente.right-1,
			   m_rectCliente.bottom-1,SWP_NOACTIVATE|SWP_NOZORDER);
			}
			else
			{ 
				  m_tempWin->SetWindowPos(NULL,m_rectCliente.left+(SPACE_TAB-4),
				  m_rectCliente.top+7,m_rectCliente.right-4,
				  m_rectCliente.bottom-4,SWP_NOACTIVATE|SWP_NOZORDER);
			}
		}
	}
	AjustTabs();
	Invalidate();
	UpdateWindow();
}
Esempio n. 2
0
void CGuiTabWnd::RecalLayout()
{
	GetClientRect(m_rectCliente);

	if (m_style == S3D)
	{
		m_rectCliente.bottom=m_rectCliente.bottom-(m_sizeImag.cy+SPACE_TAB+1);
	}
	else
	{
		if (m_alnTab==ALN_BOTTOM)
			m_rectCliente.bottom=m_rectCliente.bottom-(DEFAULT_FLAT);
		else
		{
			m_rectCliente.top+=DEFAULT_FLAT;
			m_rectCliente.bottom=m_rectCliente.bottom-(DEFAULT_FLAT+4);

		}
	}

	for (int iCont=0; iCont< m_Numtabs;iCont++)
	{
		CGuiTab* ct=(CGuiTab*) m_pArray[iCont];
		CWnd* m_tempWin= ct->pParent;
		ASSERT_VALID(m_tempWin);
		if (m_style == S3D)
		{
			   m_tempWin->SetWindowPos(NULL,m_rectCliente.left+(SPACE_TAB-2),
			   m_rectCliente.top+(SPACE_TAB/2),m_rectCliente.right-(SPACE_TAB+1),
			   m_rectCliente.bottom-(SPACE_TAB+2),SWP_NOACTIVATE|
			   SWP_NOZORDER);
		}
		else
		{
			if (m_alnTab==ALN_BOTTOM)	
			{
			   m_tempWin->SetWindowPos(NULL,m_rectCliente.left+(SPACE_TAB-3),
			   m_rectCliente.top+3,m_rectCliente.right-2,
			   m_rectCliente.bottom-1,SWP_NOACTIVATE|SWP_NOZORDER);
			}
			else
			{ 
				if (m_TypeTab == TYPE_NORMAL)
				{
				  m_tempWin->SetWindowPos(NULL,m_rectCliente.left+(SPACE_TAB-3),
				  m_rectCliente.top+3,m_rectCliente.right-2,
				  m_rectCliente.bottom,SWP_NOACTIVATE|SWP_NOZORDER);
				}
			}
		}
	}
	AjustTabs();
	Invalidate();
	UpdateWindow();
}