Alphabetical Class Index   File Members   Compound Members   File List  

CHoopsFrm.h
00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc.
00002 //
00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
00004 // and considered a trade secret as defined under civil and criminal statutes.
00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
00006 // unauthorized use or misappropriation of its trade secrets.  Use of this information
00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
00009 
00010 // CHoopsFrm.h : interface of the CHoopsFrame class, derived from CMDIFrameWnd(MDI)/CFrameWnd(SDI)
00011 // Manages palette creation and sharing per HOOPS MDI requirements
00012 
00013 #include "HMFCGlobals.h"
00014 
00015 #ifndef hoops_frame
00016 #define hoops_frame
00017 
00018 #ifdef HOOPS_MFC_SDI
00019 #define CBaseHoopsFrameWnd CFrameWnd
00020 #else
00021 #define CBaseHoopsFrameWnd CMDIFrameWnd
00022 #endif
00023 
00024 class CFullScreenHandler {
00025 public:
00026     CFullScreenHandler();
00027     ~CFullScreenHandler();
00028 
00029     void Maximize(CFrameWnd* pFrame, CWnd* pView);
00030     void Restore(CFrameWnd* pFrame);
00031     BOOL InFullScreenMode() { return !m_rcRestore.IsRectEmpty(); }
00032     CSize GetMaxSize(CWnd* pView);
00033 
00034 protected:
00035     CRect m_rcRestore;
00036     CRect m_MaxSize;
00037     DWORD m_styleRestore;
00038     bool m_maximized;
00039 };
00040 
00042 
00047 class HMFC_API CHoopsFrame : public CBaseHoopsFrameWnd
00048 {
00049 // Attributes
00050 
00051 protected:
00052 
00053     CPalette    *m_pPalette; 
00055     BOOL        m_bSharePalette;  
00062     void DockControlBarLeftOf(CToolBar* Bar,CToolBar* LeftOf);
00063 
00064 public:
00065     CHoopsFrame();
00066 
00067 #ifdef HOOPS_MFC_SDI
00068     DECLARE_DYNCREATE(CHoopsFrame)  
00069 #else
00070     DECLARE_DYNAMIC(CHoopsFrame);   
00071 #endif
00072 
00073 
00078     CHoopsFrame(BOOL share); 
00079 
00080 
00081 // Operations
00082 public:
00084     CPalette    *GetSharedPalette() {return m_pPalette;};
00085 
00087     BOOL        IsPaletteShared() {return m_bSharePalette;};
00088 
00090     void        SetPaletteShared(BOOL share);
00091 
00092 
00093  
00094 // Overrides
00095     // ClassWizard generated virtual function overrides
00096     //{{AFX_VIRTUAL(CHoopsFrame)
00097     public:
00098     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);  
00099     //}}AFX_VIRTUAL
00100 
00101 // Implementation
00102 public:
00103     virtual ~CHoopsFrame();
00104 #ifdef _DEBUG
00105     virtual void AssertValid() const;
00106     virtual void Dump(CDumpContext& dc) const;
00107 #endif
00108     void OnViewFullScreen();
00109 
00110 protected:  // control bar embedded members
00111     CStatusBar  m_wndStatusBar;  
00112     CToolBar    m_wndToolBar;    
00113 
00114 // Generated message map functions
00115 protected:
00116     //{{AFX_MSG(CHoopsFrame)
00117     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);  
00118     afx_msg BOOL OnQueryNewPalette();                   
00119     afx_msg void OnPaletteChanged(CWnd* pFocusWnd);     
00120     afx_msg void OnMove(int x, int y);          
00121     afx_msg virtual BOOL OnWndMsg( UINT message, WPARAM wParam, LPARAM lParam, LRESULT *pResult);   
00122     afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpmmi);
00123     //}}AFX_MSG
00124     DECLARE_MESSAGE_MAP()
00125 };
00126 
00127 #endif
00128