CEditMapPropSheet::CEditMapPropSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage) :CPropertySheet(pszCaption, pParentWnd, iSelectPage) { m_iFeaturesFlag = W3Z_PROP_ALLENABLED; m_bIsInited = FALSE; AddPages(); }
CFileDetailDialog::CFileDetailDialog(const CSearchFile* file, UINT uPshInvokePage, CListCtrlItemWalk* pListCtrl) : CListViewWalkerPropertySheet(pListCtrl) { m_uPshInvokePage = uPshInvokePage; m_aItems.Add(const_cast<CSearchFile*>(file)); m_psh.dwFlags &= ~PSH_HASHELP; m_psh.dwFlags |= PSH_NOAPPLYNOW; AddPages(); }
CFileDetailDialog::CFileDetailDialog(const CSimpleArray<CPartFile*>* paFiles, UINT uPshInvokePage, CListCtrlItemWalk* pListCtrl) : CListViewWalkerPropertySheet(pListCtrl) { m_uPshInvokePage = uPshInvokePage; for (int i = 0; i < paFiles->GetSize(); i++) m_aItems.Add((*paFiles)[i]); m_psh.dwFlags &= ~PSH_HASHELP; AddPages(); }
CWarpTextSheet::CWarpTextSheet(WarpTextObject* pObject, CPmwView* pView, UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage) : CPmwPropertySheet(nIDCaption, pParentWnd, iSelectPage), m_TextPage(pView), m_ShapePage(pView), m_EffectsPage(pView) { m_pPreviewObject = NULL; m_pObject = pObject; AddPages(); }
CFileDetailDialog::CFileDetailDialog(CTypedPtrList<CPtrList, CSearchFile*>& paFiles, UINT uPshInvokePage, CListCtrlItemWalk* pListCtrl) : CListViewWalkerPropertySheet(pListCtrl) { m_uPshInvokePage = uPshInvokePage; POSITION pos = paFiles.GetHeadPosition(); while (pos) m_aItems.Add(paFiles.GetNext(pos)); m_psh.dwFlags &= ~PSH_HASHELP; AddPages(); }
BOOL CDlgTabFrame::OnInitDialog() { CDialog::OnInitDialog(); AddPages(); // Start on the first page SetPage( m_dwPg ); m_tab.SetCurSel( m_dwPg ); // Restore position if ( *m_szRestore != NULL ) CFG().RestoreWindowPos( GetSafeHwnd(), "Positions", m_szRestore, FALSE ); // Size everything correctly Size(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
CPrefDialog::CPrefDialog(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage) :CPropertySheet(pszCaption, pParentWnd, iSelectPage) { m_pDoc = NULL; m_TabLocal = new CPrefLocal; m_TabLocalNetwork = new CPrefLocalNetwork; m_TabLocalFirewall = new CPrefLocalFirewall; m_TabConnect = new CPrefConnect; m_TabConnectServers = new CPrefConnectServers; m_TabConnectScreen = new CPrefConnectScreen; m_TabSearch = new CPrefSearch; m_TabSearchScreen = new CPrefSearchScreen; m_TabSearchBlock = new CPrefSearchBlock; m_TabShare = new CPrefShare; m_TabTransfer = new CPrefTransfer; m_TabBandwidth = new CPrefBandwidth; m_TabChat = new CPrefChat; m_TabPlugins = new CPrefPlugins; AddPages(); }
BOOL CDlgTabFrame::SetPage(DWORD pg) { // Do we need to add the pages? if ( m_dwPages == 0 ) AddPages(); // Is page within reason? if ( pg >= TABDLG_MAXPAGES || m_pg[ pg ] == NULL ) return FALSE; // Lose current page if ( m_pg[ m_dwPg ] != NULL && IsWindow( m_pg[ m_dwPg ]->GetSafeHwnd() ) ) { // Current page must approve page switches if ( m_pg[ m_dwPg ]->SendMessage( WM_PG_CHANGE, 1, 0L ) ) return FALSE; // Lose the page m_pg[ m_dwPg ]->DestroyWindow(); } // end if CWnd *pHelp = GetDlgItem( IDC_HELPBTN ); // Enable / Disable help button if ( pHelp != NULL ) { // Show help button if link if ( m_help[ pg ][ 0 ] != 0 ) { pHelp->ShowWindow( SW_SHOWNORMAL ); char link[ CWF_STRSIZE * 2 ]; CWinFile::BuildPath( link, m_helproot, m_help[ pg ] ); pHelp->EnableWindow( CWinFile::DoesExist( link ) ); } // end if // Hide help button if no help else pHelp->ShowWindow( SW_HIDE ); } // end if // Set title text // m_title.SetTitle( m_name[ pg ] ); // m_title.RedrawWindow(); // Create dialog if ( !IsWindow( m_pg[ pg ]->GetSafeHwnd() ) ) m_pg[ pg ]->Create( m_idd[ pg ], &m_blank ); // Save current page m_dwPg = pg; Size(); // Show the dialog box m_pg[ pg ]->ShowWindow( SW_SHOWNA ); m_pg[ pg ]->RedrawWindow(); return TRUE; }