Beispiel #1
0
//---------------------------------------------------------------------------
// Function name	: InsertPage
// Description		: return -1 if an error occurs
//					  Make sure template had WS_CHILD style
//---------------------------------------------------------------------------
int CRollupCtrl::InsertPage(LPCTSTR caption, CDialog* pwndTemplate, BOOL bAutoDestroyTpl, int idx)
{
	if (!pwndTemplate)		return -1;

	if (idx>0 && idx>=m_PageList.GetSize())		idx=-1;

	//Insert Page
	return _InsertPage(caption, pwndTemplate, idx, bAutoDestroyTpl);
}
Beispiel #2
0
int CRollupCtrl::InsertPage(LPCTSTR caption, CDialog* pwndTemplate, BOOL bAutoDestroyTpl, int idx,BOOL bAutoExpand)
{
	if (!pwndTemplate)		return -1;

	if (idx>0 && idx>=(int)m_PageList.size())		idx=-1;

	pwndTemplate->SetParent( this );

	return _InsertPage(caption, pwndTemplate, idx, bAutoDestroyTpl,bAutoExpand);
}
Beispiel #3
0
//---------------------------------------------------------------------------
// Function name	: InsertPage
// Description	  : return -1 if an error occurs
//---------------------------------------------------------------------------
int	CRollupCtrl::InsertPage(const TCHAR* caption, UINT nIDTemplate, int idx)
{
	if (idx>0 && idx>=m_PageList.GetSize())		idx=-1;

	//Create Template
	CDialog* wndtemplate = new CDialog(nIDTemplate, this);
	BOOL b = wndtemplate->Create(nIDTemplate, this);
	if (!b)	{ delete wndtemplate; return -1; }

	//Insert Page
	return _InsertPage(caption, wndtemplate, idx, TRUE);
}
Beispiel #4
0
//---------------------------------------------------------------------------
// Function name	: InsertPage
// Description	  : return -1 if an error occurs
//---------------------------------------------------------------------------
int CRollupCtrl::InsertPage(const TCHAR* caption, UINT nIDTemplate, CRuntimeClass* rtc, int idx)
{
	if (idx>0 && idx>=m_PageList.GetSize())		idx=-1;

	//Create Template
	ASSERT(rtc!=NULL);
	CDialog* wndtemplate = (CDialog*)rtc->CreateObject();
	BOOL b = wndtemplate->Create(nIDTemplate, this);
	if (!b)	{ delete wndtemplate; return -1; }

	//Insert Page
	return _InsertPage(caption, wndtemplate, idx, TRUE);
}
Beispiel #5
0
int CRollupCtrl::InsertPage(LPCTSTR caption, UINT nIDTemplate, CRuntimeClass* rtc, int idx)
{
	if (idx>0 && idx>=(int)m_PageList.size())		idx=-1;

	//Create Template
	ASSERT(rtc!=NULL);
	CDialog* pwndTemplate = (CDialog*)rtc->CreateObject();
	BOOL b = pwndTemplate->Create(nIDTemplate, this);
	if (!b)	{ delete pwndTemplate; return -1; }

	//Insert Page
	return _InsertPage(caption, pwndTemplate, idx, TRUE);
}