Beispiel #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 );
	}
}
Beispiel #2
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);

}