Esempio n. 1
0
BOOL COptionsDlgSelector::OnInitDialog() 
{
	CWSDialog::OnInitDialog();

	CWSUIExtras::SetWSDialogWindowText(CWnd::GetSafeHwnd(), Workshare::Products::WS_PROD_COMPARE, L"Compare Documents");

	GetDlgItem(IDC_STATIC_MAIN_DIALOG_HEADING)->SetFont(CFont::FromHandle(m_workshareFonts.WorkshareMainInstructionFont()));

	SubclassButtonsAndSetupImages();

	CRect rc;
	GetDlgItem( IDC_MODIFIED_LOCATION )->GetWindowRect( rc );
	ScreenToClient( rc );

	m_multiModifiedDlg.Create( MultipleModifiedDialog::IDD, this );
	m_multiModifiedDlg.SetWindowPos( &m_btnDoc1, rc.left, rc.top, rc.Width(), rc.Height(), SWP_SHOWWINDOW );
	m_multiModifiedDlg.Subclass();	

	PopulateMostRecentlyUsedList(true);
	PopulateMostRecentlyUsedList(false);
	PopulateRenderingSetList();
	PopulateComparisonOptions(false);

	SetupDocumentSelectionControls();

	// Automation can leave selector behind client MainWnd.
	BringWindowToTop();

	// Disable Drag and drop while dialog is up
	CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame, AfxGetMainWnd());	
	if(pMainFrame)
	{
		pMainFrame->EnableDragAndDrop(false);
	}

	// Setup the help link.
	m_StaticHyperLinkHelp.SubclassDlgItem(IDC_HELPLINK, this);
	m_StaticHyperLinkHelp.m_iHelpID = GetHelpID();

	SetDefID(IDOK);

	CheckOkButtonState( );

	m_cboDocumentOne.SetFocus();
	return FALSE;
}