00001 // This code is a part of the NanoSoft NSViews C++ Library. 00002 // Copyright (C) 1996 NanoSoft Corporation. All rights reserved. 00003 00004 #ifndef __NSFlexPropertySheetView_h__ 00005 #define __NSFlexPropertySheetView_h__ 00006 00007 #include "NSViewsAfxExt.h" 00008 00009 class CNSFlexPropertySheet; 00010 00011 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00012 00013 // CNSFlexPropertySheetView, while adding the control repositioning behavior of 00014 // the other classes in this library, does a lot more. It adds a property sheet 00015 // that can live in a view - something that Microsoft did not include in MFC. 00016 // The basic idea is that a CNSFlexPropertySheet is enclosed in a CScrollView. 00017 // The CNSFlexPropertyPage property pages that live in the property sheet 00018 // include two functions, GetDocument() and OnUpdate() that make each page look 00019 // like a CView from a programming point of view. With this approach, 00020 // programming an individual page in the property sheet is almost like 00021 // programming a CFormView. 00022 00023 // Make sure to use a CNSFlexMDIChildWnd as the frame window for a 00024 // CNSFlexPropertySheetView! See the MFC CFormView and CScrollView 00025 // documentation for additional information. 00026 00027 class AFX_EXT_NSVIEWS CNSFlexPropertySheetView : public CScrollView 00028 { 00029 00030 DECLARE_DYNAMIC(CNSFlexPropertySheetView) 00031 00032 // -------------------------------------------------------------------------- 00033 00034 public: 00035 00036 // Constructor. 00037 CNSFlexPropertySheetView(UINT nSelectPage = 0); 00038 // nSelectPage - The index of the page that will initially be on top. 00039 // Default is the first page added to the sheet. 00040 00041 // Destructor. 00042 virtual ~CNSFlexPropertySheetView(); 00043 00044 // Get the CNSFlexPropertySheet contained in this CNSFlexPropertySheetView. 00045 CNSFlexPropertySheet* GetFlexPropertySheet(); 00046 00047 // -------------------------------------------------------------------------- 00048 00049 public: 00050 00051 // ClassWizard 00052 //{{AFX_VIRTUAL(CNSFlexPropertySheetView) 00053 public: 00054 virtual void OnInitialUpdate(); 00055 virtual BOOL PreTranslateMessage(MSG* pMsg); 00056 protected: 00057 virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); 00058 virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 00059 //}}AFX_VIRTUAL 00060 00061 protected: 00062 00063 // ClassWizard 00064 //{{AFX_MSG(CNSFlexPropertySheetView) 00065 afx_msg void OnSize(UINT nType, int cx, int cy); 00066 afx_msg void OnSetFocus(CWnd* pOldWnd); 00067 //}}AFX_MSG 00068 DECLARE_MESSAGE_MAP() 00069 00070 private: 00071 00072 CNSFlexPropertySheet* m_pFlexPropertySheet; 00073 }; 00074 00075 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00076 00077 #endif
1.5.1