Ejemplo n.º 1
0
void CRollupCtrl::ExpandPage(int idx, BOOL bExpand,BOOL bScroll,BOOL bFromUI)
{
	if (!FindPage(idx))
		return;

	//Expand-collapse
	_ExpandPage( FindPage(idx), bExpand,bFromUI);

	//Update
	RecalLayout();

	//Scroll to this page (Automatic page visibility)
	if (bExpand && bScroll)
		ScrollToPage(idx, FALSE);

	if (GetOwner())
	{
		CRollupCtrlNotify n;
		n.hdr.hwndFrom = m_hWnd;
		n.hdr.idFrom = GetDlgCtrlID();
		n.hdr.code = ROLLUPCTRLN_EXPAND;
		n.nPageId = idx;
		n.bExpand = bExpand == TRUE;

		GetOwner()->SendMessage( WM_NOTIFY,(WPARAM)GetDlgCtrlID(),(LPARAM)&n );
	}
}
Ejemplo n.º 2
0
//---------------------------------------------------------------------------
// Function name	: ExpandAllPages
// Description	  : 
//---------------------------------------------------------------------------
void CRollupCtrl::ExpandAllPages(BOOL bExpand)
{
	//Expand-collapse All
	for (int i=0; i<m_PageList.GetSize(); i++)
		_ExpandPage(m_PageList[i], bExpand);

	//Update
	RecalLayout();
}
Ejemplo n.º 3
0
void CRollupCtrl::ExpandAllPages(BOOL bExpand,BOOL bFromUI)
{
	//Expand-collapse All
	for (size_t i=0; i<m_PageList.size(); i++)
		_ExpandPage(m_PageList[i], bExpand,bFromUI);

	//Update
	RecalLayout();
}
Ejemplo n.º 4
0
//---------------------------------------------------------------------------
// Function name	: ExpandPage
// Description	  : 
//---------------------------------------------------------------------------
void CRollupCtrl::ExpandPage(int idx, BOOL bExpand, BOOL bScrollToPage)
{
	if (idx>=m_PageList.GetSize() || idx<0)				return;

	//Expand-collapse
	_ExpandPage(m_PageList[idx], bExpand);

	//Update
	RecalLayout();

	//Scroll to this page (Automatic page visibility)
	if (bScrollToPage&&bExpand)		ScrollToPage(idx, FALSE);

}