Esempio n. 1
0
void CSelectDiskPage::UpdateControls()
{
	GetDlgItem(IDC_BTN_ADD).EnableWindow(m_wndListSingle.GetSelectedDiskObjectList().size() > 0);
	GetDlgItem(IDC_BTN_REMOVE).EnableWindow(m_wndListBind.GetSelectedDiskObjectList().size() > 0);
	GetDlgItem(IDC_BTN_REMOVE_ALL).EnableWindow( m_wndListBind.GetItemCount() > 0 );

	CEdit ctlEditCount;
	ctlEditCount.Attach(GetDlgItem(IDC_BIND_WIZ_COUNT));
	WTL::CString strDiskCount;
	strDiskCount.Format(_T("%d"), m_pWizData->m_nDiskCount);
	ctlEditCount.SetWindowText(strDiskCount);

	CEdit ctlEditSize;
	ctlEditSize.Attach(GetDlgItem(IDC_BIND_WIZ_SIZE));

	if ( m_wndListBind.GetDiskObjectList().size() == m_pWizData->m_nDiskCount )
	{
		WTL::CString strSize;
		pGetDiskSizeString(
			strSize, 
			m_pWizData->m_nBindType, 
			m_pWizData->m_nDiskCount, 
			m_wndListBind.GetSelectedDiskObjectList());

		ctlEditSize.SetWindowText(strSize);


		SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT );
	}
	else
	{
		ctlEditSize.SetWindowText(_T(""));
		SetWizardButtons( PSWIZB_BACK);
	}
}
Esempio n. 2
0
BOOL CNewDocWizStep2::OnSetActive()
{
	m_Data = (CNewDocData*)::GetWindowLong(GetParent(), GWL_USERDATA);

	CheckDlgButton(IDC_NEWDOC_STDNUMPAGES, m_Data->m_bStdNumPages);
	SendDlgItemMessage(IDC_NEWDOC_NUMPAGES, EM_SETREADONLY, m_Data->m_bStdNumPages, 0);
	SetDlgItemInt(IDC_NEWDOC_NUMPAGES, m_Data->m_iNumPages, false/*bSigned*/);

	CheckDlgButton(IDC_NEWDOC_STDPAGENAMES, m_Data->m_bStdPageNames);
	for (int i = 0; i < MAX_AGPAGE; i++)
		SendDlgItemMessage(IDC_NEWDOC_PAGENAME1 + i, EM_SETREADONLY, m_Data->m_bStdPageNames, 0);

	for (int i = 0; i < MAX_AGPAGE; i++)
	{
		int iShowFlag = (i < m_Data->m_iNumPages ? SW_SHOW : SW_HIDE);
		::ShowWindow(GetDlgItem(IDC_NEWDOC_PAGENAME1 + i), iShowFlag);
		::ShowWindow(GetDlgItem(IDC_NEWDOC_PAGELABEL1 + i), iShowFlag);
	}

	for (int i = 0; i < MAX_AGPAGE; i++)
		SetDlgItemText(IDC_NEWDOC_PAGENAME1 + i, m_Data->m_strPageNames[i]);

	bool bOKtoGoOn = true;
	if (bOKtoGoOn)
		SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);
	else
		SetWizardButtons(PSWIZB_BACK);

	return true;
}
Esempio n. 3
0
LRESULT CWizardSprayAnalyze::OnResultsComplete(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	DoAnalyzeFile();
	if (m_data->GetGrETLFlag())
		SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT);
	else
		SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH);
	return 0;
}
Esempio n. 4
0
//--------------------------------------------------------------------------//
//--------------------------------------------------------------------------//
BOOL CDblSideStep2::OnSetActive()
{
	m_Frame1.SubclassWindow(GetDlgItem(IDC_FRAME1));
	m_Frame2.SubclassWindow(GetDlgItem(IDC_FRAME2));
	m_Frame3.SubclassWindow(GetDlgItem(IDC_FRAME3));
	m_Frame4.SubclassWindow(GetDlgItem(IDC_FRAME4));

	if (m_nSelected == -1)
		SetWizardButtons(PSWIZB_BACK);
	else
		SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);

	return (TRUE);
}
Esempio n. 5
0
BOOL CNewDocWizStep1::OnSetActive()
{
	m_Data = (CNewDocData*)::GetWindowLong(GetParent(), GWL_USERDATA);

	// Some templates require the paper type combo, others don't
	if (m_Data->m_DocType == DOC_BUSINESSCARD	||
		m_Data->m_DocType == DOC_CDBOOKLET		||
		m_Data->m_DocType == DOC_CDLABEL		||
		m_Data->m_DocType == DOC_ENVELOPE		||
		m_Data->m_DocType == DOC_GIFTNAMECARD	||
		m_Data->m_DocType == DOC_HOLIDAYCARD	||
		m_Data->m_DocType == DOC_IRONON			||
		m_Data->m_DocType == DOC_LABEL			||
		m_Data->m_DocType == DOC_NOTECARD		||
		m_Data->m_DocType == DOC_PHOTOCARD		||
		m_Data->m_DocType == DOC_POSTCARD)
	{
		::ShowWindow(GetDlgItem(IDC_NEWDOC_STDSIZE), SW_HIDE);
		::ShowWindow(GetDlgItem(IDC_NEWDOC_PAPERTYPE), SW_SHOW);

		bool bFirstTime = (m_Data->m_PaperType < 0);
		if (bFirstTime)
			m_Data->m_PaperType = 0;

		const PaperTemplate* pPaper = NULL;
		CPaperTemplates::StuffCombo(m_Data->m_DocType, m_Data->m_PaperType, &pPaper, GetDlgItem(IDC_NEWDOC_PAPERTYPE), 0, 0);
		if (pPaper)
		{
			m_Data->m_fWidth = pPaper->fWidth;
			m_Data->m_fHeight = pPaper->fHeight;
			// Once we set the paper type the first time, the user's desired orientation is maintained
			if (!bFirstTime)
				SwapSizeCheck(false/*bSetControls*/);
			else
				SwapOrientationCheck(false/*bSetControls*/);
		}

		m_Data->m_bStdSize = true;
	}
	else
	{
		::ShowWindow(GetDlgItem(IDC_NEWDOC_STDSIZE), SW_SHOW);
		::ShowWindow(GetDlgItem(IDC_NEWDOC_PAPERTYPE), SW_HIDE);
		CheckDlgButton(IDC_NEWDOC_STDSIZE, m_Data->m_bStdSize);
	}

	CheckRadioButton(IDC_NEWDOC_LANDSCAPE, IDC_NEWDOC_PORTRAIT, IDC_NEWDOC_LANDSCAPE + m_Data->m_bIsPortrait);

	SendDlgItemMessage(IDC_NEWDOC_WIDTH,  EM_SETREADONLY, m_Data->m_bStdSize, 0);
	SendDlgItemMessage(IDC_NEWDOC_HEIGHT, EM_SETREADONLY, m_Data->m_bStdSize, 0);

	CString strBuffer;
	strBuffer.Format("%0.5G", m_Data->m_fWidth);
	SetDlgItemText(IDC_NEWDOC_WIDTH, strBuffer);
	strBuffer.Format("%0.5G", m_Data->m_fHeight);
	SetDlgItemText(IDC_NEWDOC_HEIGHT, strBuffer);

	SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);
	return true;
}
Esempio n. 6
0
void CEDBS_CfgImpOBAK::OnSelchangeConfigurations() 
{
	CCfgDb* pCfgDb;
//	CPropertySheet* pPropertySheet;   
//	int iNextPage;

	pCfgDb = (CCfgDb*)m_cbbConfigurations.GetItemDataPtr(m_cbbConfigurations.GetCurSel());
	m_strConfigDescription = pCfgDb->m_strConfigDescription;

	m_pConfiguration->m_strConfigFile = pCfgDb->m_strConfigFile;

	m_tModifyRules = (m_pConfiguration->m_strConfigFile != "Default") && (pCfgDb->m_strShowCfgPage == "ja");
/*
	pConfiguration = &((CEDBSExtension*)g_pTE)->Configuration;
	pPropertySheet = (CPropertySheet*) GetParent();   
	
	iNextPage = pPropertySheet->GetActiveIndex() + 1;
	while( pPropertySheet->GetPageCount() > iNextPage )
		pPropertySheet->RemovePage( iNextPage );

	pCfgDb = (CCfgDb*)m_cbbConfigurations.GetItemDataPtr(m_cbbConfigurations.GetCurSel());
	if( pCfgDb->m_strConfigFile == "Default" ) {
		pPropertySheet->AddPage( pConfiguration->ppagDefault );		
	}	
	if( pConfiguration->ppagExtra )		
		pPropertySheet->AddPage( pConfiguration->ppagExtra );		
*/
	UpdateData(false);
	SetModified(true);
	SetWizardButtons();
}
Esempio n. 7
0
BOOL CNewDocWizEnd::OnSetActive()
{
	m_Data = (CNewDocData*)::GetWindowLong(GetParent(), GWL_USERDATA);

	SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH);
	return true;
}
Esempio n. 8
0
BOOL
CBindTypePage::OnSetActive()
{
	SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);

	return TRUE;
}
Esempio n. 9
0
void
CPrinterSetupWizardSheet::OnResolveService( Service * service )
{
	// Make sure that the active page is page 2

	require_quiet( GetActivePage() == &m_pgSecond, exit );

	if ( !--service->printer->resolving )
	{
		// sort the services now.  we want the service that
		// has the highest priority queue to be first in
		// the list.

		service->printer->services.sort( OrderServiceFunc );

		// Now we can hit next

		SetWizardButtons( PSWIZB_BACK|PSWIZB_NEXT );
	
		// Reset the cursor	
		
		m_active = m_arrow;

		// And tell page 2 about it

		m_pgSecond.OnResolveService( service );
	}		

exit:

	return;
}
Esempio n. 10
0
BOOL CNewDocWizIntro::OnSetActive()
{
	::SetWindowLong(GetParent(), GWL_USERDATA, (long)m_Data);

	CWindow Parent(GetParent());
	Parent.CenterWindow();

	m_DocList.SubclassWindow(GetDlgItem(IDC_NEWDOC_LIST));

	m_DocList.Reset();
	m_DocList.AddItem(DOC_BANNER, IDI_BANNER, false);
	m_DocList.AddItem(DOC_BUSINESSCARD, IDI_BUSINESSCARD, true);
	m_DocList.AddItem(DOC_BROCHURE, IDI_BROCHURE, true);
	m_DocList.AddItem(DOC_HALFCARD, IDI_HALFCARD, true);
	m_DocList.AddItem(DOC_QUARTERCARD, IDI_QUARTERCARD, true);
	m_DocList.AddItem(DOC_CDBOOKLET, IDI_CDBOOKLET, true);
	m_DocList.AddItem(DOC_CDLABEL, IDI_CDLABEL, true);
	m_DocList.AddItem(DOC_ENVELOPE, IDI_ENVELOPE, true); 
	m_DocList.AddItem(DOC_FULLSHEET, IDI_FULLSHEET, true);
	m_DocList.AddItem(DOC_GIFTNAMECARD, IDI_GIFTNAMECARD, true);
	m_DocList.AddItem(DOC_HOLIDAYCARD, IDI_HOLIDAYCARD, true);
	m_DocList.AddItem(DOC_IRONON, IDI_IRONON, true);
	m_DocList.AddItem(DOC_LABEL, IDI_LABEL, true);
	m_DocList.AddItem(DOC_NOTECARD, IDI_NOTECARD, true);
	m_DocList.AddItem(DOC_PHOTOCARD, IDI_PHOTOCARD, true);
	m_DocList.AddItem(DOC_POSTCARD, IDI_POSTCARD, true);
	m_DocList.AddItem(DOC_TRIFOLD, IDI_TRIFOLD, true);
	m_DocList.AddItem(DOC_AVERYPOSTER, IDI_AVERYPOSTER, true);
	m_DocList.SelectItem(m_Data->m_nSelectedItem);

	SetWizardButtons(m_Data->m_nSelectedItem >= 0 ? PSWIZB_NEXT : 0);
	return true;
}
Esempio n. 11
0
//--------------------------------------------------------------------------//
//--------------------------------------------------------------------------//
BOOL CDblSideIntro::OnSetActive()
{
	CWindow Parent(GetParent());
	Parent.CenterWindow();

	SetWizardButtons(PSWIZB_NEXT);
	return (TRUE);
}
BOOL CFirstStartWizardUser::OnSetActive()
{
	auto wiz = static_cast<CFirstStartWizard*>(GetParent());

	wiz->SetWizardButtons(PSWIZB_NEXT | PSWIZB_BACK);

	return CFirstStartWizardBasePage::OnSetActive();
}
Esempio n. 13
0
BOOL CWizardWelcomePage::OnInitDialog()
{
	CWizardPage::OnInitDialog();

	SetWizardButtons( PSWIZB_NEXT );

	return TRUE;
}
Esempio n. 14
0
BOOL
CSelectDiskPage::OnSetActive()
{
	SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);
	UpdateControls();

	return TRUE;
}
Esempio n. 15
0
BOOL CDoubleSidedPrintIntroduction::OnSetActive() 
{
	BOOL fResult = INHERITED::OnSetActive();
	if (fResult)
	{
		SetWizardButtons(PSWIZB_NEXT);
	}
	return fResult;
}
Esempio n. 16
0
LRESULT CNewDocWizIntro::OnClickList(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
	m_Data->m_nSelectedItem = m_DocList.GetSelectedItem();
	m_Data->SetNewDocSizeData();
	m_Data->m_PaperType = -1;

	SetWizardButtons(m_Data->m_nSelectedItem >= 0 ? PSWIZB_NEXT : 0);
	return S_OK;
}
Esempio n. 17
0
BOOL CDoubleSidedPrintPrePrint2::OnSetActive() 
{
	BOOL fResult = INHERITED::OnSetActive();
	if (fResult)
	{
		SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT);
	}
	return fResult;
}
Esempio n. 18
0
BOOL CDoubleSidedPrintFinish::OnSetActive() 
{
	BOOL fResult = INHERITED::OnSetActive();
	if (fResult)
	{
		SetWizardButtons(PSWIZB_BACK|PSWIZB_FINISH);
	}
	return fResult;
}
Esempio n. 19
0
void CDoubleSidedPrintPostPrint1::UpdateButtons(void)
{
	DWORD dwButtons = PSWIZB_BACK;
	if (m_Output1.GetChecked() || m_Output2.GetChecked())
	{
		dwButtons |= PSWIZB_NEXT;
	}
	SetWizardButtons(dwButtons);
}
Esempio n. 20
0
BOOL CWizardProfilePage::OnSetActive()
{
	SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT );

	m_sNick = MyProfile.GetNick();

	if ( m_sNick.IsEmpty() )
	{
		TCHAR pBuffer[64];
		DWORD nSize = 64;
		if ( GetUserNameW( pBuffer, &nSize ) ) m_sNick = pBuffer;
	}

	if ( CXMLElement* pVitals = MyProfile.GetXML( _T("vitals") ) )
	{
		CString strGender	= pVitals->GetAttributeValue( _T("gender") );
		CString strAge		= pVitals->GetAttributeValue( _T("age") );

		if ( strGender.CompareNoCase( _T("male") ) == 0 )
		{
			m_nGender = 1;
		}
		else if ( strGender.CompareNoCase( _T("female") ) == 0 )
		{
			m_nGender = 2;
		}

		int nAge = 0;
		_stscanf( strAge, _T("%i"), &nAge );

		for ( int nAgeItem = 0 ; nAgeItem < m_wndAge.GetCount() ; nAgeItem ++ )
		{
			if ( m_wndAge.GetItemData( nAgeItem ) == DWORD( nAge ) )
			{
				m_nAge = nAgeItem;
				break;
			}
		}
	}

	if ( CXMLElement* pLocation = MyProfile.GetXML( _T("location") ) )
	{
		if ( CXMLElement* pPolitical = pLocation->GetElementByName( _T("political") ) )
		{
			m_sLocCountry	= pPolitical->GetAttributeValue( _T("country") );
			m_sLocCity		= pPolitical->GetAttributeValue( _T("city") ) + _T(", ")
							+ pPolitical->GetAttributeValue( _T("state") );
		}
	}

	UpdateData( FALSE );

	OnSelChangeCountry();

	return CWizardPage::OnSetActive();
}
Esempio n. 21
0
// Overrides from base class
int CWizardSprayAnalyze::OnSetActive()
{
	if(m_bNext) // coming back from the next page
	{
		SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT);
		m_bNext=false;
	}
	else // coming here from previous page
	{
		SetWizardButtons(0);
		LogMessage(_T("\r\n---- Analysis started ----\r\n"));
		PostMessage(UM_START_ANALYSIS);
	}

	// 0 = allow activate
	// -1 = go back to page that was active
	// page ID = jump to page
	return 0;
}
BOOL CFirstStartWizardLanguage::OnSetActive()
{
	auto wiz = static_cast<CFirstStartWizard*>(GetParent());

	wiz->SetWizardButtons(PSWIZB_NEXT);

	PostMessage(WM_SETPAGEFOCUS, 0, 0);

	return CFirstStartWizardBasePage::OnSetActive();
}
Esempio n. 23
0
BOOL CWizardSharePage::OnSetActive()
{
	// Wizard Window Caption Workaround
	CString strCaption;
	GetWindowText( strCaption );
	GetParent()->SetWindowText( strCaption );

	SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT );
	return CWizardPage::OnSetActive();
}
BOOL CWizardWelcomePage::OnInitDialog()
{
	CWizardPage::OnInitDialog();

	Skin.Apply( _T("CWizardWelcomePage"), this );

	SetWizardButtons( PSWIZB_NEXT );

	return TRUE;
}
Esempio n. 25
0
bool CWizardSprayAnalyze::ProcessErrorMsg(const TCHAR *pMsg)
{
	CString msg( pMsg );
	msg += _T("\r\n");

	PostLogMessage(msg);
	ProcessFileSizeError(msg) || ProcessCSVLineError(msg) || ProcessFileNotFoundError(msg);

	SetWizardButtons(PSWIZB_BACK);
	return true; //stop on any error
}
Esempio n. 26
0
void COptionSheet::SetWizardMode(BOOL bFullPage)
{
	DWORD flags;

	flags = OSH_WIZARD;
	if(TRUE == bFullPage) {
		flags |= OSH_WIZARDFULL;
	}
	SetWizardButtons(OSWIZB_BACK | OSWIZB_NEXT | OSWIZB_FINISH);
	SetFlags(flags);
}
Esempio n. 27
0
//--------------------------------------------------------------------------//
//--------------------------------------------------------------------------//
LRESULT CDblSideStep2::OnFrame(WORD /*wNotifyCode*/, WORD wID, HWND hWndCtl,
								BOOL &bHandled)
{
	long lStyle;

	if (m_nSelected != -1)
	{
		HWND hWnd = GetDlgItem(m_nSelected + IDC_FRAME1 - 1);
		lStyle = ::GetWindowLong(hWnd, GWL_STYLE);
		lStyle &= ~SS_BLACKFRAME;
		lStyle |= SS_ETCHEDFRAME;
		::SetWindowLong(hWnd, GWL_STYLE, lStyle);

		RECT r;
		::GetClientRect(hWnd, &r);
		POINT Pts[2];
		Pts[0].x = r.left;
		Pts[0].y = r.top;
		Pts[1].x = r.right;
		Pts[1].y = r.bottom;
		::MapWindowPoints(hWnd, m_hWnd, Pts, 2);
		r.left = Pts[0].x;
		r.top = Pts[0].y;
		r.right = Pts[1].x;
		r.bottom = Pts[1].y;
		InvalidateRect(&r);
	}
	else
		SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);

	lStyle = ::GetWindowLong(hWndCtl, GWL_STYLE);
	lStyle &= ~SS_ETCHEDFRAME;
	lStyle |= SS_BLACKFRAME;
	::SetWindowLong(hWndCtl, GWL_STYLE, lStyle);

	RECT r;
	::GetClientRect(hWndCtl, &r);
	POINT Pts[2];
	Pts[0].x = r.left;
	Pts[0].y = r.top;
	Pts[1].x = r.right;
	Pts[1].y = r.bottom;
	::MapWindowPoints(hWndCtl, m_hWnd, Pts, 2);
	r.left = Pts[0].x;
	r.top = Pts[0].y;
	r.right = Pts[1].x;
	r.bottom = Pts[1].y;
	InvalidateRect(&r);

	m_nSelected = wID - IDC_FRAME1 + 1;

	bHandled = TRUE;
	return (TRUE);
}
Esempio n. 28
0
BOOL CWizardInterfacePage::OnSetActive()
{
	// Wizard Window Caption Workaround
	CString strCaption;
	GetWindowText( strCaption );
	GetParent()->SetWindowText( strCaption );

	CoolInterface.FixThemeControls( this );		// Checkbox/Groupbox text colors (Remove theme if needed)

	SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT );
	return CWizardPage::OnSetActive();
}
Esempio n. 29
0
int CWizardSprayCompletion::OnSetActive()
{
	SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH);

	// Don't remember any previous updates to the summary,
	//  and just regenerate the whole summary
	UpdateSummary();

	// 0 = allow activate
	// -1 = go back to page that was active
	// page ID = jump to page
	return 0;
}
Esempio n. 30
0
//
// Non-zero if the page was successfully set active;
// otherwise 0
//
BOOL 
CIntroPage::OnSetActive()
{
/*
	CStatic stIntroCtl;
	stIntroCtl.Attach(GetDlgItem(IDC_INTRO_1));
	CString strIntro1;
	strIntro1.LoadString(IDS_DRZ_INTRO_1);
	stIntroCtl.SetWindowText(strIntro1);
*/

	SetWizardButtons(PSWIZB_NEXT);
	return TRUE;
}