home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / MFCINC.PAK / AFXEXT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  33.6 KB  |  1,039 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1995 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. #ifndef __AFXEXT_H__
  12. #define __AFXEXT_H__
  13.  
  14. #ifndef __AFXWIN_H__
  15.     #include <afxwin.h>
  16. #endif
  17. #ifndef __AFXDLGS_H__
  18.     #include <afxdlgs.h>
  19. #endif
  20.  
  21. #ifdef _AFX_MINREBUILD
  22. #pragma component(minrebuild, off)
  23. #endif
  24. #ifndef _AFX_FULLTYPEINFO
  25. #pragma component(mintypeinfo, on)
  26. #endif
  27.  
  28. #ifdef _AFX_PACKING
  29. #pragma pack(push, _AFX_PACKING)
  30. #endif
  31.  
  32. /////////////////////////////////////////////////////////////////////////////
  33. // AFXEXT - MFC Advanced Extensions and Advanced Customizable classes
  34.  
  35. // Classes declared in this file
  36.  
  37. //CObject
  38.     //CCmdTarget;
  39.         //CWnd
  40.             //CButton
  41.                 class CBitmapButton;    // Bitmap button (self-draw)
  42.  
  43.             class CControlBar;          // control bar
  44.                 class CStatusBar;       // status bar
  45.                 class CToolBar;         // toolbar
  46.                 class CDialogBar;       // dialog as control bar
  47.  
  48.             class CSplitterWnd;         // splitter manager
  49.  
  50.             //CView
  51.                 //CScrollView
  52.                 class CFormView;        // view with a dialog template
  53.                 class CEditView;        // simple text editor view
  54.  
  55.     //CDC
  56.         class CMetaFileDC;              // a metafile with proxy
  57.  
  58. class CRectTracker;                     // tracker for rectangle objects
  59.  
  60. // information structures
  61. struct CPrintInfo;          // Printing context
  62. struct CPrintPreviewState;  // Print Preview context/state
  63. struct CCreateContext;      // Creation context
  64.  
  65. #undef AFX_DATA
  66. #define AFX_DATA AFX_CORE_DATA
  67.  
  68. /////////////////////////////////////////////////////////////////////////////
  69. // Simple bitmap button
  70.  
  71. // CBitmapButton - push-button with 1->4 bitmap images
  72. class CBitmapButton : public CButton
  73. {
  74.     DECLARE_DYNAMIC(CBitmapButton)
  75. public:
  76. // Construction
  77.     CBitmapButton();
  78.  
  79.     BOOL LoadBitmaps(LPCTSTR lpszBitmapResource,
  80.             LPCTSTR lpszBitmapResourceSel = NULL,
  81.             LPCTSTR lpszBitmapResourceFocus = NULL,
  82.             LPCTSTR lpszBitmapResourceDisabled = NULL);
  83.     BOOL LoadBitmaps(UINT nIDBitmapResource,
  84.             UINT nIDBitmapResourceSel = 0,
  85.             UINT nIDBitmapResourceFocus = 0,
  86.             UINT nIDBitmapResourceDisabled = 0);
  87.     BOOL AutoLoad(UINT nID, CWnd* pParent);
  88.  
  89. // Operations
  90.     void SizeToContent();
  91.  
  92. // Implementation:
  93. public:
  94. #ifdef _DEBUG
  95.     virtual void AssertValid() const;
  96.     virtual void Dump(CDumpContext& dc) const;
  97. #endif
  98. protected:
  99.     // all bitmaps must be the same size
  100.     CBitmap m_bitmap;           // normal image (REQUIRED)
  101.     CBitmap m_bitmapSel;        // selected image (OPTIONAL)
  102.     CBitmap m_bitmapFocus;      // focused but not selected (OPTIONAL)
  103.     CBitmap m_bitmapDisabled;   // disabled bitmap (OPTIONAL)
  104.  
  105.     virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);
  106. };
  107.  
  108. /////////////////////////////////////////////////////////////////////////////
  109. // Control Bars
  110.  
  111. // forward declarations (private to implementation)
  112. class CDockBar;
  113. class CDockContext;
  114. class CControlBarInfo;
  115. struct AFX_SIZEPARENTPARAMS;
  116.  
  117. // Layout Modes for CalcDynamicLayout
  118. #define LM_STRETCH  0x01    // same meaning as bStretch in CalcFixedLayout.  If set, ignores nLength
  119.                             // and returns dimensions based on LM_HORZ state, otherwise LM_HORZ is used
  120.                             // to determine if nLength is the desired horizontal or vertical length
  121.                             // and dimensions are returned based on nLength
  122. #define LM_HORZ     0x02    // same as bHorz in CalcFixedLayout
  123. #define LM_MRUWIDTH 0x04    // Most Recently Used Dynamic Width
  124. #define LM_HORZDOCK 0x08    // Horizontal Docked Dimensions
  125. #define LM_VERTDOCK 0x10    // Vertical Docked Dimensions
  126. #define LM_LENGTHY  0x20    // Set if nLength is a Height instead of a Width
  127. #define LM_COMMIT   0x40    // Remember MRUWidth
  128.  
  129. class CControlBar : public CWnd
  130. {
  131.     DECLARE_DYNAMIC(CControlBar)
  132. // Construction
  133. protected:
  134.     CControlBar();
  135.  
  136. // Attributes
  137. public:
  138.     int GetCount() const;
  139.  
  140.     // for styles specific to CControlBar
  141.     DWORD GetBarStyle();
  142.     void SetBarStyle(DWORD dwStyle);
  143.  
  144.     BOOL m_bAutoDelete;
  145.  
  146.     CFrameWnd* GetDockingFrame() const;
  147.     BOOL IsFloating() const;
  148.     virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
  149.     virtual CSize CalcDynamicLayout(int nLength, DWORD nMode);
  150.  
  151. // Operations
  152.     void EnableDocking(DWORD dwDockStyle);
  153.  
  154. // Overridables
  155.     virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler) = 0;
  156.  
  157. // Implementation
  158. public:
  159.     virtual ~CControlBar();
  160. #ifdef _DEBUG
  161.     virtual void AssertValid() const;
  162.     virtual void Dump(CDumpContext& dc) const;
  163. #endif
  164.     virtual void DelayShow(BOOL bShow);
  165.     virtual BOOL IsVisible() const;
  166.     virtual DWORD RecalcDelayShow(AFX_SIZEPARENTPARAMS* lpLayout);
  167.  
  168.     virtual BOOL IsDockBar() const;
  169.     virtual BOOL DestroyWindow();
  170.     virtual void OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle);
  171.  
  172.     // info about bar (for status bar and toolbar)
  173.     int m_cxLeftBorder, m_cxRightBorder;
  174.     int m_cyTopBorder, m_cyBottomBorder;
  175.     int m_cxDefaultGap;         // default gap value
  176.     UINT m_nMRUWidth;   // For dynamic resizing.
  177. #ifdef _MAC
  178.     BOOL m_bMonochrome;         // whether to draw in monochrome or color
  179. #endif
  180.  
  181.     // array of elements
  182.     int m_nCount;
  183.     void* m_pData;        // m_nCount elements - type depends on derived class
  184.  
  185.     // support for delayed hide/show
  186.     enum StateFlags
  187.         { delayHide = 1, delayShow = 2, tempHide = 4, statusSet = 8 };
  188.     UINT m_nStateFlags;
  189.  
  190.     // support for docking
  191.     DWORD m_dwStyle;    // creation style (used for layout)
  192.     DWORD m_dwDockStyle;// indicates how bar can be docked
  193.     CFrameWnd* m_pDockSite; // current dock site, if dockable
  194.     CDockBar* m_pDockBar;   // current dock bar, if dockable
  195.     CDockContext* m_pDockContext;   // used during dragging
  196.  
  197.     virtual BOOL PreTranslateMessage(MSG* pMsg);
  198.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  199.     virtual void PostNcDestroy();
  200.  
  201.     virtual void DoPaint(CDC* pDC);
  202.     void DrawBorders(CDC* pDC, CRect& rect);
  203.  
  204.     // implementation helpers
  205.     virtual LRESULT WindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam);
  206.     void CalcInsideRect(CRect& rect, BOOL bHorz) const; // adjusts borders etc
  207.     BOOL AllocElements(int nElements, int cbElement);
  208.     virtual BOOL SetStatusText(int nHit);
  209.     void ResetTimer(UINT nEvent, UINT nTime);
  210.     void EraseNonClient();
  211.  
  212. #ifdef _MAC
  213.     void OnReposition();
  214.     BOOL CheckMonochrome();
  215. #endif
  216.     void GetBarInfo(CControlBarInfo* pInfo);
  217.     void SetBarInfo(CControlBarInfo* pInfo, CFrameWnd* pFrameWnd);
  218.  
  219.     //{{AFX_MSG(CControlBar)
  220.     afx_msg void OnTimer(UINT nIDEvent);
  221.     afx_msg int OnCreate(LPCREATESTRUCT lpcs);
  222.     afx_msg void OnDestroy();
  223.     afx_msg void OnPaint();
  224.     afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  225.     afx_msg void OnWindowPosChanging(LPWINDOWPOS lpWndPos);
  226.     afx_msg LRESULT OnSizeParent(WPARAM wParam, LPARAM lParam);
  227.     afx_msg LRESULT OnHelpHitTest(WPARAM wParam, LPARAM lParam);
  228.     afx_msg void OnInitialUpdate();
  229.     afx_msg LRESULT OnIdleUpdateCmdUI(WPARAM wParam, LPARAM lParam);
  230.     afx_msg void OnLButtonDown(UINT nFlags, CPoint pt );
  231.     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint pt);
  232.     afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT nMsg);
  233.     //}}AFX_MSG
  234. #ifdef _MAC
  235.     afx_msg void OnSize(UINT nType, int cx, int cy);
  236.     afx_msg LRESULT OnMacintosh(WPARAM wParam, LPARAM lParam);
  237.     afx_msg void OnSysColorChange();
  238.     afx_msg void OnMove(int x, int y);
  239.     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  240. #endif
  241.     DECLARE_MESSAGE_MAP()
  242.  
  243.     friend class CFrameWnd;
  244.     friend class CDockBar;
  245. };
  246.  
  247. /////////////////////////////////////////////////////////////////////////////
  248. // CStatusBar control
  249.  
  250. class CStatusBarCtrl;   // forward reference (see afxcmn.h for definition)
  251. struct AFX_STATUSPANE;  // private to implementation
  252.  
  253. class CStatusBar : public CControlBar
  254. {
  255.     DECLARE_DYNAMIC(CStatusBar)
  256.  
  257. // Construction
  258. public:
  259.     CStatusBar();
  260.     BOOL Create(CWnd* pParentWnd,
  261.         DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_BOTTOM,
  262.         UINT nID = AFX_IDW_STATUS_BAR);
  263.     BOOL SetIndicators(const UINT* lpIDArray, int nIDCount);
  264.  
  265. // Attributes
  266. public:
  267.     // standard control bar things
  268.     int CommandToIndex(UINT nIDFind) const;
  269.     UINT GetItemID(int nIndex) const;
  270.     void GetItemRect(int nIndex, LPRECT lpRect) const;
  271.  
  272.     // specific to CStatusBar
  273.     void GetPaneText(int nIndex, CString& rString) const;
  274.     CString GetPaneText(int nIndex) const;
  275.     BOOL SetPaneText(int nIndex, LPCTSTR lpszNewText, BOOL bUpdate = TRUE);
  276.     void GetPaneInfo(int nIndex, UINT& nID, UINT& nStyle, int& cxWidth) const;
  277.     void SetPaneInfo(int nIndex, UINT nID, UINT nStyle, int cxWidth);
  278.     UINT GetPaneStyle(int nIndex) const;
  279.     void SetPaneStyle(int nIndex, UINT nStyle);
  280.  
  281.     // for direct access to the underlying common control
  282.     CStatusBarCtrl& GetStatusBarCtrl() const;
  283.  
  284. // Overridables
  285.     virtual void DrawItem(LPDRAWITEMSTRUCT);
  286.  
  287. // Implementation
  288. public:
  289.     virtual ~CStatusBar();
  290.     virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
  291.     BOOL PreCreateWindow(CREATESTRUCT& cs);
  292.     BOOL AllocElements(int nElements, int cbElement);
  293.     void CalcInsideRect(CRect& rect, BOOL bHorz) const;
  294.     virtual void OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle);
  295.  
  296. #ifdef _DEBUG
  297.     virtual void AssertValid() const;
  298.     virtual void Dump(CDumpContext& dc) const;
  299.     void EnableDocking(DWORD dwDockStyle);
  300. #endif
  301.     virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
  302.  
  303. protected:
  304.     int m_nMinHeight;
  305.  
  306.     AFX_STATUSPANE* _GetPanePtr(int nIndex) const;
  307.     void UpdateAllPanes(BOOL bUpdateRects, BOOL bUpdateText);
  308.     virtual BOOL OnChildNotify(UINT message, WPARAM, LPARAM, LRESULT*);
  309.  
  310.     //{{AFX_MSG(CStatusBar)
  311.     afx_msg UINT OnNcHitTest(CPoint);
  312.     afx_msg void OnNcCalcSize(BOOL, NCCALCSIZE_PARAMS*);
  313.     afx_msg void OnNcPaint();
  314.     afx_msg void OnPaint();
  315.     afx_msg void OnSize(UINT nType, int cx, int cy);
  316.     afx_msg void OnWindowPosChanging(LPWINDOWPOS);
  317.     afx_msg LRESULT OnSetText(WPARAM wParam, LPARAM lParam);
  318.     afx_msg LRESULT OnGetText(WPARAM wParam, LPARAM lParam);
  319.     afx_msg LRESULT OnGetTextLength(WPARAM wParam, LPARAM lParam);
  320.     afx_msg LRESULT OnSetMinHeight(WPARAM wParam, LPARAM lParam);
  321.     //}}AFX_MSG
  322.     DECLARE_MESSAGE_MAP()
  323. };
  324.  
  325. // Styles for status bar panes
  326. #define SBPS_NORMAL     0x0000
  327. #define SBPS_NOBORDERS  SBT_NOBORDERS
  328. #define SBPS_POPOUT     SBT_POPOUT
  329. #define SBPS_OWNERDRAW  SBT_OWNERDRAW
  330. #define SBPS_DISABLED   0x04000000
  331. #define SBPS_STRETCH    0x08000000  // stretch to fill status bar
  332.  
  333. /////////////////////////////////////////////////////////////////////////////
  334. // CToolBar control
  335.  
  336. HBITMAP AFXAPI AfxLoadSysColorBitmap(HINSTANCE hInst, HRSRC hRsrc, BOOL bMono = FALSE);
  337.  
  338. class CToolBarCtrl; // forward reference (see afxcmn.h for definition)
  339.  
  340. class CToolBar : public CControlBar
  341. {
  342.     DECLARE_DYNAMIC(CToolBar)
  343.  
  344. // Construction
  345. public:
  346.     CToolBar();
  347.     BOOL Create(CWnd* pParentWnd,
  348.         DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP,
  349.         UINT nID = AFX_IDW_TOOLBAR);
  350.  
  351.     void SetSizes(SIZE sizeButton, SIZE sizeImage);
  352.         // button size should be bigger than image
  353.     void SetHeight(int cyHeight);
  354.         // call after SetSizes, height overrides bitmap size
  355.     BOOL LoadToolBar(LPCTSTR lpszResourceName);
  356.     BOOL LoadToolBar(UINT nIDResource);
  357.     BOOL LoadBitmap(LPCTSTR lpszResourceName);
  358.     BOOL LoadBitmap(UINT nIDResource);
  359.     BOOL SetBitmap(HBITMAP hbmImageWell);
  360.     BOOL SetButtons(const UINT* lpIDArray, int nIDCount);
  361.         // lpIDArray can be NULL to allocate empty buttons
  362.  
  363. // Attributes
  364. public:
  365.     // standard control bar things
  366.     int CommandToIndex(UINT nIDFind) const;
  367.     UINT GetItemID(int nIndex) const;
  368.     virtual void GetItemRect(int nIndex, LPRECT lpRect) const;
  369.     UINT GetButtonStyle(int nIndex) const;
  370.     void SetButtonStyle(int nIndex, UINT nStyle);
  371.  
  372.     // for changing button info
  373.     void GetButtonInfo(int nIndex, UINT& nID, UINT& nStyle, int& iImage) const;
  374.     void SetButtonInfo(int nIndex, UINT nID, UINT nStyle, int iImage);
  375.     BOOL SetButtonText(int nIndex, LPCTSTR lpszText);
  376.     CString GetButtonText(int nIndex) const;
  377.     void GetButtonText(int nIndex, CString& rString) const;
  378.  
  379.     // for direct access to the underlying common control
  380.     CToolBarCtrl& GetToolBarCtrl() const;
  381.  
  382. // Implementation
  383. public:
  384.     virtual ~CToolBar();
  385.     virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
  386.     virtual CSize CalcDynamicLayout(int nLength, DWORD nMode);
  387.     virtual int OnToolHitTest(CPoint point, TOOLINFO* pTI) const;
  388.     virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
  389.     void SetOwner(CWnd* pOwnerWnd);
  390.     BOOL AddReplaceBitmap(HBITMAP hbmImageWell);
  391.     virtual void OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle);
  392.  
  393. #ifdef _DEBUG
  394.     virtual void AssertValid() const;
  395.     virtual void Dump(CDumpContext& dc) const;
  396. #endif
  397.  
  398. protected:
  399.     HRSRC m_hRsrcImageWell; // handle to loaded resource for image well
  400.     HINSTANCE m_hInstImageWell; // instance handle to load image well from
  401.     HBITMAP m_hbmImageWell; // contains color mapped button images
  402.     BOOL m_bDelayedButtonLayout; // used to manage when button layout should be done
  403.  
  404.     CSize m_sizeImage;  // current image size
  405.     CSize m_sizeButton; // current button size
  406.  
  407.     CMapStringToPtr* m_pStringMap;  // used as CMapStringToUInt
  408.  
  409.     // implementation helpers
  410.     void _GetButton(int nIndex, TBBUTTON* pButton) const;
  411.     void _SetButton(int nIndex, TBBUTTON* pButton);
  412.     CSize CalcLayout(DWORD nMode, int nLength = -1);
  413.     CSize CalcSize(TBBUTTON* pData, int nCount);
  414.     int WrapToolBar(TBBUTTON* pData, int nCount, int nWidth);
  415.     void SizeToolBar(TBBUTTON* pData, int nCount, int nLength, BOOL bVert = FALSE);
  416.  
  417.     //{{AFX_MSG(CToolBar)
  418.     afx_msg UINT OnNcHitTest(CPoint);
  419.     afx_msg void OnNcPaint();
  420.     afx_msg void OnPaint();
  421.     afx_msg void OnNcCalcSize(BOOL, NCCALCSIZE_PARAMS*);
  422.     afx_msg void OnWindowPosChanging(LPWINDOWPOS);
  423.     afx_msg void OnSysColorChange();
  424.     afx_msg LRESULT OnSetButtonSize(WPARAM, LPARAM);
  425.     afx_msg LRESULT OnSetBitmapSize(WPARAM, LPARAM);
  426.     afx_msg BOOL OnNcCreate(LPCREATESTRUCT);
  427.     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  428.     //}}AFX_MSG
  429.     DECLARE_MESSAGE_MAP()
  430. };
  431.  
  432. // Styles for toolbar buttons
  433. #define TBBS_BUTTON     MAKELONG(TBSTYLE_BUTTON, 0) // this entry is button
  434. #define TBBS_SEPARATOR  MAKELONG(TBSTYLE_SEP, 0)    // this entry is a separator
  435. #define TBBS_CHECKBOX   MAKELONG(TBSTYLE_CHECK, 0)  // this is an auto check button
  436. #define TBBS_GROUP      MAKELONG(TBSTYLE_GROUP, 0)  // marks the start of a group
  437. #define TBBS_CHECKGROUP (TBBS_GROUP|TBBS_CHECKBOX)  // normal use of TBBS_GROUP
  438.  
  439. // styles for display states
  440. #define TBBS_CHECKED    MAKELONG(0, TBSTATE_CHECKED)    // button is checked/down
  441. #define TBBS_PRESSED    MAKELONG(0, TBSTATE_PRESSED)    // button is being depressed
  442. #define TBBS_DISABLED   MAKELONG(0, TBSTATE_ENABLED)    // button is disabled
  443. #define TBBS_INDETERMINATE  MAKELONG(0, TBSTATE_INDETERMINATE)  // third state
  444. #define TBBS_HIDDEN     MAKELONG(0, TBSTATE_HIDDEN) // button is hidden
  445. #define TBBS_WRAPPED    MAKELONG(0, TBSTATE_WRAP)   // button is wrapped at this point
  446.  
  447. ////////////////////////////////////////////
  448. // CDialogBar control
  449. // This is a control bar built from a dialog template. It is a modeless
  450. // dialog that delegates all control notifications to the parent window
  451. // of the control bar [the grandparent of the control]
  452.  
  453. class CDialogBar : public CControlBar
  454. {
  455.     DECLARE_DYNAMIC(CDialogBar)
  456.  
  457. // Construction
  458. public:
  459.     CDialogBar();
  460.     BOOL Create(CWnd* pParentWnd, LPCTSTR lpszTemplateName,
  461.             UINT nStyle, UINT nID);
  462.     BOOL Create(CWnd* pParentWnd, UINT nIDTemplate,
  463.             UINT nStyle, UINT nID);
  464.  
  465. // Implementation
  466. public:
  467.     virtual ~CDialogBar();
  468.     virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
  469.     CSize m_sizeDefault;
  470.     virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
  471.  
  472. protected:
  473. #ifndef _AFX_NO_OCC_SUPPORT
  474.     // data and functions necessary for OLE control containment
  475.     _AFX_OCC_DIALOG_INFO* m_pOccDialogInfo;
  476.     LPCTSTR m_lpszTemplateName;
  477.     virtual BOOL SetOccDialogInfo(_AFX_OCC_DIALOG_INFO* pOccDialogInfo);
  478.     afx_msg LRESULT HandleInitDialog(WPARAM, LPARAM);
  479.     DECLARE_MESSAGE_MAP()
  480. #endif
  481. };
  482.  
  483. /////////////////////////////////////////////////////////////////////////////
  484. // Splitter Window
  485.  
  486. #define SPLS_DYNAMIC_SPLIT  0x0001
  487. #define SPLS_INVERT_TRACKER 0x0002  // obsolete (now ignored)
  488.  
  489. class CSplitterWnd : public CWnd
  490. {
  491.     DECLARE_DYNAMIC(CSplitterWnd)
  492.  
  493. // Construction
  494. public:
  495.     CSplitterWnd();
  496.     // Create a single view type splitter with multiple splits
  497.     BOOL Create(CWnd* pParentWnd,
  498.                 int nMaxRows, int nMaxCols, SIZE sizeMin,
  499.                 CCreateContext* pContext,
  500.                 DWORD dwStyle = WS_CHILD | WS_VISIBLE |
  501.                     WS_HSCROLL | WS_VSCROLL | SPLS_DYNAMIC_SPLIT,
  502.                 UINT nID = AFX_IDW_PANE_FIRST);
  503.  
  504.     // Create a multiple view type splitter with static layout
  505.     BOOL CreateStatic(CWnd* pParentWnd,
  506.                 int nRows, int nCols,
  507.                 DWORD dwStyle = WS_CHILD | WS_VISIBLE,
  508.                 UINT nID = AFX_IDW_PANE_FIRST);
  509.  
  510.     virtual BOOL CreateView(int row, int col, CRuntimeClass* pViewClass,
  511.             SIZE sizeInit, CCreateContext* pContext);
  512.  
  513. // Attributes
  514. public:
  515.     int GetRowCount() const;
  516.     int GetColumnCount() const;
  517.  
  518.     // information about a specific row or column
  519.     void GetRowInfo(int row, int& cyCur, int& cyMin) const;
  520.     void SetRowInfo(int row, int cyIdeal, int cyMin);
  521.     void GetColumnInfo(int col, int& cxCur, int& cxMin) const;
  522.     void SetColumnInfo(int col, int cxIdeal, int cxMin);
  523.  
  524.     // for setting and getting shared scroll bar style
  525.     DWORD GetScrollStyle() const;
  526.     void SetScrollStyle(DWORD dwStyle);
  527.  
  528.     // views inside the splitter
  529.     CWnd* GetPane(int row, int col) const;
  530.     BOOL IsChildPane(CWnd* pWnd, int* pRow, int* pCol);
  531.     BOOL IsChildPane(CWnd* pWnd, int& row, int& col); // obsolete
  532.     int IdFromRowCol(int row, int col) const;
  533.  
  534.     BOOL IsTracking();  // TRUE during split operation
  535.  
  536. // Operations
  537. public:
  538.     virtual void RecalcLayout();    // call after changing sizes
  539.  
  540. // Overridables
  541. protected:
  542.     // to customize the drawing
  543.     enum ESplitType { splitBox, splitBar, splitIntersection, splitBorder };
  544.     virtual void OnDrawSplitter(CDC* pDC, ESplitType nType, const CRect& rect);
  545.     virtual void OnInvertTracker(const CRect& rect);
  546.  
  547. public:
  548.     // for customizing scrollbar regions
  549.     virtual BOOL CreateScrollBarCtrl(DWORD dwStyle, UINT nID);
  550.  
  551.     // for customizing DYNAMIC_SPLIT behavior
  552.     virtual void DeleteView(int row, int col);
  553.     virtual BOOL SplitRow(int cyBefore);
  554.     virtual BOOL SplitColumn(int cxBefore);
  555.     virtual void DeleteRow(int rowDelete);
  556.     virtual void DeleteColumn(int colDelete);
  557.  
  558.     // determining active pane from focus or active view in frame
  559.     virtual CWnd* GetActivePane(int* pRow = NULL, int* pCol = NULL);
  560.     virtual void SetActivePane(int row, int col, CWnd* pWnd = NULL);
  561. protected:
  562.     CWnd* GetActivePane(int& row, int& col); // obsolete
  563.  
  564. public:
  565.     // high level command operations - called by default view implementation
  566.     virtual BOOL CanActivateNext(BOOL bPrev = FALSE);
  567.     virtual void ActivateNext(BOOL bPrev = FALSE);
  568.     virtual BOOL DoKeyboardSplit();
  569.  
  570.     // syncronized scrolling
  571.     virtual BOOL DoScroll(CView* pViewFrom, UINT nScrollCode,
  572.         BOOL bDoScroll = TRUE);
  573.     virtual BOOL DoScrollBy(CView* pViewFrom, CSize sizeScroll,
  574.         BOOL bDoScroll = TRUE);
  575.  
  576. // Implementation
  577. public:
  578.     virtual ~CSplitterWnd();
  579. #ifdef _DEBUG
  580.     virtual void AssertValid() const;
  581.     virtual void Dump(CDumpContext& dc) const;
  582. #endif
  583.  
  584.     // implementation structure
  585.     struct CRowColInfo
  586.     {
  587.         int nMinSize;       // below that try not to show
  588.         int nIdealSize;     // user set size
  589.         // variable depending on the available size layout
  590.         int nCurSize;       // 0 => invisible, -1 => nonexistant
  591.     };
  592.  
  593. protected:
  594.     // customizable implementation attributes (set by constructor or Create)
  595.     CRuntimeClass* m_pDynamicViewClass;
  596.     int m_nMaxRows, m_nMaxCols;
  597.  
  598.     // implementation attributes which control layout of the splitter
  599.     int m_cxSplitter, m_cySplitter;         // size of splitter bar
  600.     int m_cxBorderShare, m_cyBorderShare;   // space on either side of splitter
  601.     int m_cxSplitterGap, m_cySplitterGap;   // amount of space between panes
  602.     int m_cxBorder, m_cyBorder;             // borders in client area
  603.  
  604.     // current state information
  605.     int m_nRows, m_nCols;
  606.     BOOL m_bHasHScroll, m_bHasVScroll;
  607.     CRowColInfo* m_pColInfo;
  608.     CRowColInfo* m_pRowInfo;
  609.  
  610.     // Tracking info - only valid when 'm_bTracking' is set
  611.     BOOL m_bTracking, m_bTracking2;
  612.     CPoint m_ptTrackOffset;
  613.     CRect m_rectLimit;
  614.     CRect m_rectTracker, m_rectTracker2;
  615.     int m_htTrack;
  616.  
  617.     // implementation routines
  618.     BOOL CreateCommon(CWnd* pParentWnd, SIZE sizeMin, DWORD dwStyle, UINT nID);
  619.     int HitTest(CPoint pt) const;
  620.     void GetInsideRect(CRect& rect) const;
  621.     void GetHitRect(int ht, CRect& rect);
  622.     void TrackRowSize(int y, int row);
  623.     void TrackColumnSize(int x, int col);
  624.     void DrawAllSplitBars(CDC* pDC, int cxInside, int cyInside);
  625.     void SetSplitCursor(int ht);
  626.     CWnd* GetSizingParent();
  627.  
  628.     // starting and stopping tracking
  629.     virtual void StartTracking(int ht);
  630.     virtual void StopTracking(BOOL bAccept);
  631.  
  632.     // special command routing to frame
  633.     virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  634.     virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  635.  
  636.     //{{AFX_MSG(CSplitterWnd)
  637.     afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  638.     afx_msg void OnMouseMove(UINT nFlags, CPoint pt);
  639.     afx_msg void OnPaint();
  640.     afx_msg void OnLButtonDown(UINT nFlags, CPoint pt);
  641.     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint pt);
  642.     afx_msg void OnLButtonUp(UINT nFlags, CPoint pt);
  643.     afx_msg void OnCancelMode();
  644.     afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  645.     afx_msg void OnSize(UINT nType, int cx, int cy);
  646.     afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  647.     afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  648.     afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpcs);
  649.     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  650.     afx_msg void OnDisplayChange();
  651.     //}}AFX_MSG
  652.     DECLARE_MESSAGE_MAP()
  653. };
  654.  
  655. /////////////////////////////////////////////////////////////////////////////
  656. // CFormView - generic view constructed from a dialog template
  657.  
  658. class CFormView : public CScrollView
  659. {
  660.     DECLARE_DYNAMIC(CFormView)
  661.  
  662. // Construction
  663. protected:      // must derive your own class
  664.     CFormView(LPCTSTR lpszTemplateName);
  665.     CFormView(UINT nIDTemplate);
  666.  
  667. // Implementation
  668. public:
  669. #ifdef _DEBUG
  670.     virtual void AssertValid() const;
  671.     virtual void Dump(CDumpContext& dc) const;
  672. #endif
  673.     virtual void OnInitialUpdate();
  674.  
  675. protected:
  676.     LPCTSTR m_lpszTemplateName;
  677.     CCreateContext* m_pCreateContext;
  678.     HWND m_hWndFocus;   // last window to have focus
  679.  
  680.     virtual void OnDraw(CDC* pDC);      // default does nothing
  681.     // special case override of child window creation
  682.     virtual BOOL Create(LPCTSTR, LPCTSTR, DWORD,
  683.         const RECT&, CWnd*, UINT, CCreateContext*);
  684.     virtual BOOL PreTranslateMessage(MSG* pMsg);
  685.     virtual void OnActivateView(BOOL, CView*, CView*);
  686.     virtual void OnActivateFrame(UINT, CFrameWnd*);
  687.     BOOL SaveFocusControl();    // updates m_hWndFocus
  688.  
  689. #ifndef _AFX_NO_OCC_SUPPORT
  690.     // data and functions necessary for OLE control containment
  691.     _AFX_OCC_DIALOG_INFO* m_pOccDialogInfo;
  692.     virtual BOOL SetOccDialogInfo(_AFX_OCC_DIALOG_INFO* pOccDialogInfo);
  693.     afx_msg LRESULT HandleInitDialog(WPARAM, LPARAM);
  694. #endif
  695.  
  696.     //{{AFX_MSG(CFormView)
  697.     afx_msg int OnCreate(LPCREATESTRUCT lpcs);
  698.     afx_msg void OnSetFocus(CWnd* pOldWnd);
  699.     //}}AFX_MSG
  700.     DECLARE_MESSAGE_MAP()
  701. };
  702.  
  703. /////////////////////////////////////////////////////////////////////////////
  704. // CEditView - simple text editor view
  705.  
  706. class CEditView : public CCtrlView
  707. {
  708.     DECLARE_DYNCREATE(CEditView)
  709.  
  710. // Construction
  711. public:
  712.     CEditView();
  713.  
  714. // Attributes
  715. public:
  716.     static AFX_DATA const DWORD dwStyleDefault;
  717.     // CEdit control access
  718.     CEdit& GetEditCtrl() const;
  719.  
  720.     // presentation attributes
  721.     CFont* GetPrinterFont() const;
  722.     void SetPrinterFont(CFont* pFont);
  723. #ifndef _MAC
  724.     void SetTabStops(int nTabStops);
  725. #endif
  726.  
  727.     // other attributes
  728.     void GetSelectedText(CString& strResult) const;
  729.  
  730.     // buffer access
  731.     LPCTSTR LockBuffer() const;
  732.     void UnlockBuffer() const;
  733.     UINT GetBufferLength() const;
  734.  
  735. // Operations
  736. public:
  737.     BOOL FindText(LPCTSTR lpszFind, BOOL bNext = TRUE, BOOL bCase = TRUE);
  738.     void SerializeRaw(CArchive& ar);
  739.     UINT PrintInsideRect(CDC* pDC, RECT& rectLayout, UINT nIndexStart,
  740.         UINT nIndexStop);
  741.  
  742. // Overrideables
  743. protected:
  744.     virtual void OnFindNext(LPCTSTR lpszFind, BOOL bNext, BOOL bCase);
  745.     virtual void OnReplaceSel(LPCTSTR lpszFind, BOOL bNext, BOOL bCase,
  746.         LPCTSTR lpszReplace);
  747.     virtual void OnReplaceAll(LPCTSTR lpszFind, LPCTSTR lpszReplace,
  748.         BOOL bCase);
  749.     virtual void OnTextNotFound(LPCTSTR lpszFind);
  750.  
  751. // Implementation
  752. public:
  753.     virtual ~CEditView();
  754. #ifdef _DEBUG
  755.     virtual void AssertValid() const;
  756.     virtual void Dump(CDumpContext& dc) const;
  757. #endif
  758.     virtual void Serialize(CArchive& ar);
  759.     virtual void DeleteContents();
  760.     void ReadFromArchive(CArchive& ar, UINT nLen);
  761.     void WriteToArchive(CArchive& ar);
  762.     virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo);
  763.  
  764.     static AFX_DATA const UINT nMaxSize;
  765.         // maximum number of characters supported
  766.  
  767. protected:
  768. #ifndef _MAC
  769.     int m_nTabStops;            // tab stops in dialog units
  770. #endif
  771.     LPTSTR m_pShadowBuffer;     // special shadow buffer only used in Win32s
  772.     UINT m_nShadowSize;
  773.  
  774.     CUIntArray m_aPageStart;    // array of starting pages
  775.     HFONT m_hPrinterFont;       // if NULL, mirror display font
  776.     HFONT m_hMirrorFont;        // font object used when mirroring
  777.  
  778.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  779.     // printing support
  780.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  781.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  782.     virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
  783.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo = NULL);
  784.     BOOL PaginateTo(CDC* pDC, CPrintInfo* pInfo);
  785.  
  786.     // find & replace support
  787.     void OnEditFindReplace(BOOL bFindOnly);
  788.     BOOL InitializeReplace();
  789.     BOOL SameAsSelected(LPCTSTR lpszCompare, BOOL bCase);
  790.  
  791.     // special overrides for implementation
  792.     virtual void CalcWindowRect(LPRECT lpClientRect,
  793.         UINT nAdjustType = adjustBorder);
  794.  
  795.     //{{AFX_MSG(CEditView)
  796.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  797.     afx_msg LRESULT OnSetFont(WPARAM wParam, LPARAM lParam);
  798.     afx_msg void OnUpdateNeedSel(CCmdUI* pCmdUI);
  799.     afx_msg void OnUpdateNeedClip(CCmdUI* pCmdUI);
  800.     afx_msg void OnUpdateNeedText(CCmdUI* pCmdUI);
  801.     afx_msg void OnUpdateNeedFind(CCmdUI* pCmdUI);
  802.     afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
  803.     afx_msg BOOL OnEditChange();
  804.     afx_msg void OnEditCut();
  805.     afx_msg void OnEditCopy();
  806.     afx_msg void OnEditPaste();
  807.     afx_msg void OnEditClear();
  808.     afx_msg void OnEditUndo();
  809.     afx_msg void OnEditSelectAll();
  810.     afx_msg void OnEditFind();
  811.     afx_msg void OnEditReplace();
  812.     afx_msg void OnEditRepeat();
  813.     afx_msg LRESULT OnFindReplaceCmd(WPARAM wParam, LPARAM lParam);
  814.     afx_msg void OnDestroy();
  815.     //}}AFX_MSG
  816.     DECLARE_MESSAGE_MAP()
  817. };
  818.  
  819. /////////////////////////////////////////////////////////////////////////////
  820. // CMetaFileDC
  821.  
  822. class CMetaFileDC : public CDC
  823. {
  824.     DECLARE_DYNAMIC(CMetaFileDC)
  825.  
  826. // Constructors
  827. public:
  828.     CMetaFileDC();
  829.     BOOL Create(LPCTSTR lpszFilename = NULL);
  830. #ifndef _MAC
  831.     BOOL CreateEnhanced(CDC* pDCRef, LPCTSTR lpszFileName,
  832.         LPCRECT lpBounds, LPCTSTR lpszDescription);
  833. #endif
  834.  
  835. // Operations
  836.     HMETAFILE Close();
  837. #ifndef _MAC
  838.     HENHMETAFILE CloseEnhanced();
  839. #endif
  840.  
  841. // Implementation
  842. public:
  843.     virtual void SetAttribDC(HDC hDC);  // Set the Attribute DC
  844.  
  845. protected:
  846.     virtual void SetOutputDC(HDC hDC);  // Set the Output DC -- Not allowed
  847.     virtual void ReleaseOutputDC();     // Release the Output DC -- Not allowed
  848.  
  849. public:
  850.     virtual ~CMetaFileDC();
  851.  
  852. // Clipping Functions (use the Attribute DC's clip region)
  853.     virtual int GetClipBox(LPRECT lpRect) const;
  854.     virtual BOOL PtVisible(int x, int y) const;
  855.             BOOL PtVisible(POINT point) const;
  856.     virtual BOOL RectVisible(LPCRECT lpRect) const;
  857.  
  858. // Text Functions
  859.     virtual BOOL TextOut(int x, int y, LPCTSTR lpszString, int nCount);
  860.             BOOL TextOut(int x, int y, const CString& str);
  861.     virtual BOOL ExtTextOut(int x, int y, UINT nOptions, LPCRECT lpRect,
  862.                 LPCTSTR lpszString, UINT nCount, LPINT lpDxWidths);
  863.             BOOL ExtTextOut(int x, int y, UINT nOptions, LPCRECT lpRect,
  864.                 const CString& str, LPINT lpDxWidths);
  865.     virtual CSize TabbedTextOut(int x, int y, LPCTSTR lpszString, int nCount,
  866.                 int nTabPositions, LPINT lpnTabStopPositions, int nTabOrigin);
  867.             CSize TabbedTextOut(int x, int y, const CString& str,
  868.                 int nTabPositions, LPINT lpnTabStopPositions, int nTabOrigin);
  869.     virtual int DrawText(LPCTSTR lpszString, int nCount, LPRECT lpRect,
  870.                 UINT nFormat);
  871.             int DrawText(const CString& str, LPRECT lpRect, UINT nFormat);
  872.  
  873. // Printer Escape Functions
  874.     virtual int Escape(int nEscape, int nCount, LPCSTR lpszInData, LPVOID lpOutData);
  875.  
  876. // Viewport Functions
  877.     virtual CPoint SetViewportOrg(int x, int y);
  878.             CPoint SetViewportOrg(POINT point);
  879.     virtual CPoint OffsetViewportOrg(int nWidth, int nHeight);
  880.     virtual CSize SetViewportExt(int x, int y);
  881.             CSize SetViewportExt(SIZE size);
  882.     virtual CSize ScaleViewportExt(int xNum, int xDenom, int yNum, int yDenom);
  883.  
  884. protected:
  885.     void AdjustCP(int cx);
  886. };
  887.  
  888. /////////////////////////////////////////////////////////////////////////////
  889. // CRectTracker - simple rectangular tracking rectangle w/resize handles
  890.  
  891. class CRectTracker
  892. {
  893. public:
  894. // Constructors
  895.     CRectTracker();
  896.     CRectTracker(LPCRECT lpSrcRect, UINT nStyle);
  897.  
  898. // Style Flags
  899.     enum StyleFlags
  900.     {
  901.         solidLine = 1, dottedLine = 2, hatchedBorder = 4,
  902.         resizeInside = 8, resizeOutside = 16, hatchInside = 32,
  903.     };
  904.  
  905. // Hit-Test codes
  906.     enum TrackerHit
  907.     {
  908.         hitNothing = -1,
  909.         hitTopLeft = 0, hitTopRight = 1, hitBottomRight = 2, hitBottomLeft = 3,
  910.         hitTop = 4, hitRight = 5, hitBottom = 6, hitLeft = 7, hitMiddle = 8
  911.     };
  912.  
  913. // Attributes
  914.     UINT m_nStyle;      // current state
  915.     CRect m_rect;       // current position (always in pixels)
  916.     CSize m_sizeMin;    // minimum X and Y size during track operation
  917.     int m_nHandleSize;  // size of resize handles (default from WIN.INI)
  918.  
  919. // Operations
  920.     void Draw(CDC* pDC) const;
  921.     void GetTrueRect(LPRECT lpTrueRect) const;
  922.     BOOL SetCursor(CWnd* pWnd, UINT nHitTest) const;
  923.     BOOL Track(CWnd* pWnd, CPoint point, BOOL bAllowInvert = FALSE,
  924.         CWnd* pWndClipTo = NULL);
  925.     BOOL TrackRubberBand(CWnd* pWnd, CPoint point, BOOL bAllowInvert = TRUE);
  926.     int HitTest(CPoint point) const;
  927.     int NormalizeHit(int nHandle) const;
  928.  
  929. // Overridables
  930.     virtual void DrawTrackerRect(LPCRECT lpRect, CWnd* pWndClipTo,
  931.         CDC* pDC, CWnd* pWnd);
  932.     virtual void AdjustRect(int nHandle, LPRECT lpRect);
  933.     virtual void OnChangedRect(const CRect& rectOld);
  934.     virtual UINT GetHandleMask() const;
  935.  
  936. // Implementation
  937. public:
  938.     virtual ~CRectTracker();
  939.  
  940. protected:
  941.     BOOL m_bAllowInvert;    // flag passed to Track or TrackRubberBand
  942.     CRect m_rectLast;
  943.     CSize m_sizeLast;
  944.     BOOL m_bErase;          // TRUE if DrawTrackerRect is called for erasing
  945.     BOOL m_bFinalErase;     // TRUE if DragTrackerRect called for final erase
  946.  
  947.     // implementation helpers
  948.     int HitTestHandles(CPoint point) const;
  949.     void GetHandleRect(int nHandle, CRect* pHandleRect) const;
  950.     void GetModifyPointers(int nHandle, int**ppx, int**ppy, int* px, int*py);
  951.     virtual int GetHandleSize(LPCRECT lpRect = NULL) const;
  952.     BOOL TrackHandle(int nHandle, CWnd* pWnd, CPoint point, CWnd* pWndClipTo);
  953.     void Construct();
  954. };
  955.  
  956. /////////////////////////////////////////////////////////////////////////////
  957. // Informational data structures
  958.  
  959. struct CPrintInfo // Printing information structure
  960. {
  961.     CPrintInfo();
  962.     ~CPrintInfo();
  963.  
  964.     CPrintDialog* m_pPD;     // pointer to print dialog
  965.  
  966.     BOOL m_bPreview;         // TRUE if in preview mode
  967.     BOOL m_bDirect;          // TRUE if bypassing Print Dialog
  968.     BOOL m_bContinuePrinting;// set to FALSE to prematurely end printing
  969.     UINT m_nCurPage;         // Current page
  970.     UINT m_nNumPreviewPages; // Desired number of preview pages
  971.     CString m_strPageDesc;   // Format string for page number display
  972.     LPVOID m_lpUserData;     // pointer to user created struct
  973.     CRect m_rectDraw;        // rectangle defining current usable page area
  974.  
  975.     void SetMinPage(UINT nMinPage);
  976.     void SetMaxPage(UINT nMaxPage);
  977.     UINT GetMinPage() const;
  978.     UINT GetMaxPage() const;
  979.     UINT GetFromPage() const;
  980.     UINT GetToPage() const;
  981. };
  982.  
  983. struct CPrintPreviewState   // Print Preview context/state
  984. {
  985.     UINT nIDMainPane;          // main pane ID to hide
  986.     HMENU hMenu;               // saved hMenu
  987.     DWORD dwStates;            // Control Bar Visible states (bit map)
  988.     CView* pViewActiveOld;     // save old active view during preview
  989.     BOOL (CALLBACK* lpfnCloseProc)(CFrameWnd* pFrameWnd);
  990.     HACCEL hAccelTable;       // saved accelerator table
  991.  
  992. // Implementation
  993.     CPrintPreviewState();
  994. };
  995.  
  996. struct CCreateContext   // Creation information structure
  997.     // All fields are optional and may be NULL
  998. {
  999.     // for creating new views
  1000.     CRuntimeClass* m_pNewViewClass; // runtime class of view to create or NULL
  1001.     CDocument* m_pCurrentDoc;
  1002.  
  1003.     // for creating MDI children (CMDIChildWnd::LoadFrame)
  1004.     CDocTemplate* m_pNewDocTemplate;
  1005.  
  1006.     // for sharing view/frame state from the original view/frame
  1007.     CView* m_pLastView;
  1008.     CFrameWnd* m_pCurrentFrame;
  1009.  
  1010. // Implementation
  1011.     CCreateContext();
  1012. };
  1013.  
  1014. /////////////////////////////////////////////////////////////////////////////
  1015. // Inline function declarations
  1016.  
  1017. #ifdef _AFX_PACKING
  1018. #pragma pack(pop)
  1019. #endif
  1020.  
  1021. #ifdef _AFX_ENABLE_INLINES
  1022. #define _AFXEXT_INLINE inline
  1023. #include <afxext.inl>
  1024. #endif
  1025.  
  1026. #undef AFX_DATA
  1027. #define AFX_DATA
  1028.  
  1029. #ifdef _AFX_MINREBUILD
  1030. #pragma component(minrebuild, on)
  1031. #endif
  1032. #ifndef _AFX_FULLTYPEINFO
  1033. #pragma component(mintypeinfo, off)
  1034. #endif
  1035.  
  1036. #endif //__AFXEXT_H__
  1037.  
  1038. /////////////////////////////////////////////////////////////////////////////
  1039.