BOOL CGotoDlg::OnInitDialog() { CMDIFrameWnd* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWnd, AfxGetMainWnd()); CChildFrame *pFrame = DYNAMIC_DOWNCAST( CChildFrame, pMainFrame->MDIGetActive() ); CWSDialog::OnInitDialog(); CWSUIExtras::SetWSDialogWindowText(CWnd::GetSafeHwnd(), Workshare::Products::WS_PROD_COMPARE); m_btnGoto.SubclassDlgItem( IDGOTO, this ); m_btnClose.SubclassDlgItem( IDCLOSE, this ); if (pFrame && pFrame->GetCompositeView()) { CRect rcView; pFrame->GetCompositeView()->GetWindowRect(rcView); SetWindowPos(&wndTop, rcView.left+10, rcView.top+10, 0, 0, SWP_NOSIZE); } // Setup the help link. m_StaticHyperLinkHelp.SubclassDlgItem(IDC_HELPLINK, this); m_StaticHyperLinkHelp.m_iHelpID = GetHelpID(); SetDefID(IDGOTO); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL CKeyboardDlg::OnInitDialog() { CWSDialog::OnInitDialog(); CWSUIExtras::SetWSDialogWindowText(CWnd::GetSafeHwnd(), Workshare::Products::WS_PROD_COMPARE); //Correct use of the SetFont() Function in MFC //http://support.microsoft.com/kb/85518 // Use the font to paint a control. GetDlgItem(IDC_STATIC_KEYBOARD_SHORTCUTS)->SetFont(CFont::FromHandle(m_workshareFonts.WorkshareMainInstructionFont())); GetDlgItem(IDC_STATIC_UI_NAVIGATION)->SetFont(CFont::FromHandle(m_workshareFonts.WorkshareNormalTextEmphasizedFont())); GetDlgItem(IDC_STATIC_RIBBON_NAVIGATION)->SetFont(CFont::FromHandle(m_workshareFonts.WorkshareNormalTextEmphasizedFont())); GetDlgItem(IDC_STATIC_CHANGE_NAVIGATION)->SetFont(CFont::FromHandle(m_workshareFonts.WorkshareNormalTextEmphasizedFont())); GetDlgItem(IDC_STATIC_FILE_CONTROL)->SetFont(CFont::FromHandle(m_workshareFonts.WorkshareNormalTextEmphasizedFont())); m_btnOk.SubclassDlgItem( IDOK, this ); // Setup the help link. m_StaticHyperLinkHelp.SubclassDlgItem(IDC_HELPLINK, this); m_StaticHyperLinkHelp.m_iHelpID = GetHelpID(); return TRUE; }
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; }
void CMainTabDlg::OnButtonHelp() { UINT nHelpID = GetHelpID(); TRACE1 ("CMainTabDlg::OnButtonHelp(), Help Context ID = %d\n", nHelpID); APP_HelpInfo(m_hWnd, nHelpID); }