CGotoDlg::CGotoDlg(CWnd* pParent /*=NULL*/) : CWSDialog(CGotoDlg::IDD, pParent) { //{{AFX_DATA_INIT(CGotoDlg) //}}AFX_DATA_INIT SetHelpID(CDeltaVwApp::GetProductHelpID(HIDC_GOTO_CHANGE)); Create(IDD_GOTO); ShowWindow(SW_SHOW); }
CSettingsView::CSettingsView(BRect frame, const char *name, uint32 resizingMode, uint32 flags) : CLocalizedDialogBase(frame, name, resizingMode, flags, NULL, NULL, true) { internalView = new CInternalSettingsView(ClientRect(), "Internal"); prefsRead = false; AddChild(internalView); SetHelpID("settings.html#settings_dialog"); }
COptionsDlgSelector::COptionsDlgSelector(CWnd* pParent) : CWSDialog(COptionsDlgSelector::IDD, pParent), m_bFailed(false), m_bCancelled(false), m_bPageModified(FALSE), m_bSelectionOnly(FALSE), m_nDefaultComparisonOptionItem(0), m_multiModifiedDlg(AfxGetResourceHandle()), m_cmdLineComparisonOption(WSCONVERTERLib::dvCompareUnknown), m_bSilent(false), m_bFilesAreFastFiles(TRUE) { SetHelpID(CDeltaVwApp::GetProductHelpID(HIDC_DOCUMENT_SELECTOR)); }
////////////////////////////////////////////////////////////////////////////// // // RExportGraphicDlg::RExportGraphicDlg( RComponentView* pComponentView, CString& strFilter ) // // dialog constructor using a component view // ////////////////////////////////////////////////////////////////////////////// RExportGraphicDlg::RExportGraphicDlg( RComponentView* pComponentView, CString& strFilter ) : CFileDialog( FALSE, strFilter, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_EXPLORER, strFilter, NULL ) { m_ofn.hInstance = AfxGetResourceHandle() ; m_ofn.lpTemplateName = MAKEINTRESOURCE( DIALOG_EXPORT_IMAGE_DATA ) ; m_ofn.nFilterIndex = _nFilterIndex ; m_ofn.Flags |= OFN_ENABLETEMPLATE ; SetHelpID( DIALOG_EXPORT_IMAGE_DATA ); // REVIEW: Setup initial directory // Obtain the current size from the component view. TpsAssert( pComponentView, "No component provided!" ) ; // REVIEW 5/1/97 GKB Eliminated call to GetPreferredAspectRatio() function and replaced // with computation based on the size of the view. Since this code is // not being called from anywhere in the application, there is no way to test // it. If the actual aspect ratio of the graphic is needed instead of the // aspect ratio of the view, it can be obtained via the graphic interface. // RRealSize viewSize = pComponentView->GetReferenceSize(); m_flScaleFactor = viewSize.m_dx / viewSize.m_dy; m_fMaintainAspect = TRUE ; m_fExportingImage = FALSE ; RImageInterface* pInterface = (RImageInterface*) pComponentView->GetInterface( kImageInterfaceId ) ; if (pInterface) { m_szExportSize.m_dx = viewSize.m_dx ; m_szExportSize.m_dy = viewSize.m_dy ; m_fExportingImage = TRUE ; ::LogicalUnitsToScreenUnits( m_szExportSize ) ; delete pInterface ; } else if (viewSize.m_dx > viewSize.m_dy) { m_szExportSize.m_dx = kDefaultWidth ; m_szExportSize.m_dy = kDefaultWidth / m_flScaleFactor ; } else { m_szExportSize.m_dy = kDefaultWidth ; m_szExportSize.m_dx = kDefaultWidth * m_flScaleFactor ; } }
////////////////////////////////////////////////////////////////////////////// // // RExportGraphicDlg::RExportGraphicDlg( RBitmapImage* pImage, CString& strFilter ) // // dialog constructor using a bitmap image // ////////////////////////////////////////////////////////////////////////////// RExportGraphicDlg::RExportGraphicDlg( RBitmapImage* pImage, CString& strFilter ) : CFileDialog( FALSE, strFilter, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_EXPLORER, strFilter, NULL ) { m_ofn.hInstance = AfxGetResourceHandle() ; m_ofn.lpTemplateName = MAKEINTRESOURCE( DIALOG_EXPORT_IMAGE_DATA ) ; m_ofn.nFilterIndex = _nFilterIndex ; m_ofn.Flags |= OFN_ENABLETEMPLATE ; SetHelpID( DIALOG_EXPORT_IMAGE_DATA ); m_szExportSize = pImage->GetSizeInLogicalUnits() ; ::LogicalUnitsToScreenUnits( m_szExportSize ) ; m_fExportingImage = TRUE ; }
LTBOOL CLTGUISlider::Create ( const char *pText, uint32 nHelpID, CUIFont *pFont, uint8 nFontSize, HTEXTURE hBarTexture, uint16 nBarOffset, uint16 nBarWidth, uint16 nBarHeight, int *pnValue) { if (!hBarTexture) return LTFALSE; m_hBar = hBarTexture; m_pnValue = pnValue; if (!SetFont(pFont,nFontSize)) { return LTFALSE; } m_nBarWidth = nBarWidth; m_nBarHeight = nBarHeight; m_nBarOffset = nBarOffset; uint32 w,h; g_pTexInterface->GetTextureDims(m_hBar,w,h); m_nArrowWidth = w / 2; m_nArrowHeight = h / 2; SetHelpID(nHelpID); if ( pText) { if (m_pText) m_pText->SetText((char *)pText); else { m_pText = g_pFontManager->CreateFormattedPolyString(m_pFont,(char *)pText,(float)m_pos.x,(float)m_pos.y); m_pText->SetCharScreenHeight(m_nFontSize); } } InitBar(); return LTTRUE; }
// Note: This routine only gets called once!! BOOL CPageClassName::OnInitDialog() { // Get document and parent sheet m_pDoc = BDoc::GetDoc(); ASSERT_VALID(m_pDoc); m_psh = DYNAMIC_DOWNCAST(CSheetWizard, GetParent()); ASSERT_VALID(m_psh); // Call base class (calls DoDataExchange) CPropertyPage::OnInitDialog(); // Set font for title m_lblTitle.SetFont(&app.m_fontControlsBold); // Set context sensitive help SetHelpID(IDD_CLASS_NAME); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
CKeyboardDlg::CKeyboardDlg(CWnd* pParent /*=NULL*/) : CWSDialog(CKeyboardDlg::IDD, pParent) { SetHelpID(CDeltaVwApp::GetProductHelpID(HIDC_KEYBOARD_SHORTCUTS)); }