Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1201 lines
37 KiB

  1. // Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1993 Microsoft Corporation,
  3. // All rights reserved.
  4. // This source code is only intended as a supplement to the
  5. // Microsoft Foundation Classes Reference and Microsoft
  6. // QuickHelp and/or WinHelp documentation provided with the library.
  7. // See these sources for detailed information regarding the
  8. // Microsoft Foundation Classes product.
  9. #ifndef __AFXEXT_H__
  10. #define __AFXEXT_H__
  11. #ifndef __AFXWIN_H__
  12. #include <afxwin.h>
  13. #endif
  14. #ifndef __AFXDLGS_H__
  15. #include <afxdlgs.h>
  16. #endif
  17. /////////////////////////////////////////////////////////////////////////////
  18. // AFXEXT - MFC Advanced Extensions and Advanced Customizable classes
  19. // Classes declared in this file
  20. //CObject
  21. //CCmdTarget;
  22. //CWnd
  23. //CButton
  24. class CBitmapButton; // Bitmap button (self-draw)
  25. class CControlBar; // control bar
  26. class CStatusBar; // status bar
  27. class CToolBar; // toolbar
  28. class CDialogBar; // dialog as control bar
  29. class CSplitterWnd; // splitter manager
  30. //CView
  31. //CScrollView
  32. class CFormView; // view with a dialog template
  33. class CEditView; // simple text editor view
  34. class CVBControl; // VBX control
  35. //CDC
  36. class CMetaFileDC; // a metafile with proxy
  37. class CRectTracker; // tracker for rectangle objects
  38. // information structures
  39. struct CPrintInfo; // Printing context
  40. struct CPrintPreviewState; // Print Preview context/state
  41. struct CCreateContext; // Creation context
  42. // AFXDLL support
  43. #undef AFXAPP_DATA
  44. #define AFXAPP_DATA AFXAPI_DATA
  45. /////////////////////////////////////////////////////////////////////////////
  46. // Simple bitmap button
  47. // CBitmapButton - push-button with 1->4 bitmap images
  48. class CBitmapButton : public CButton
  49. {
  50. DECLARE_DYNAMIC(CBitmapButton)
  51. public:
  52. // Construction
  53. CBitmapButton();
  54. BOOL LoadBitmaps(LPCSTR lpszBitmapResource,
  55. LPCSTR lpszBitmapResourceSel = NULL,
  56. LPCSTR lpszBitmapResourceFocus = NULL,
  57. LPCSTR lpszBitmapResourceDisabled = NULL);
  58. BOOL AutoLoad(UINT nID, CWnd* pParent);
  59. // Operations
  60. void SizeToContent();
  61. // Implementation:
  62. public:
  63. #ifdef _DEBUG
  64. virtual void AssertValid() const;
  65. virtual void Dump(CDumpContext& dc) const;
  66. #endif
  67. protected:
  68. // all bitmaps must be the same size
  69. CBitmap m_bitmap; // normal image (REQUIRED)
  70. CBitmap m_bitmapSel; // selected image (OPTIONAL)
  71. CBitmap m_bitmapFocus; // focused but not selected (OPTIONAL)
  72. CBitmap m_bitmapDisabled; // disabled bitmap (OPTIONAL)
  73. virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);
  74. };
  75. /////////////////////////////////////////////////////////////////////////////
  76. // Control Bars
  77. class CControlBar : public CWnd
  78. {
  79. DECLARE_DYNAMIC(CControlBar)
  80. // Construction
  81. protected:
  82. CControlBar();
  83. // Attributes
  84. public:
  85. int GetCount() const;
  86. BOOL m_bAutoDelete;
  87. // Implementation
  88. public:
  89. virtual ~CControlBar();
  90. #ifdef _DEBUG
  91. virtual void AssertValid() const;
  92. virtual void Dump(CDumpContext& dc) const;
  93. #endif
  94. virtual void DelayHide();
  95. virtual void DelayShow();
  96. virtual BOOL IsVisible() const;
  97. // works even if DelayShow or DelayHide is pending!
  98. protected:
  99. // info about bar (for status bar and toolbar)
  100. int m_cxLeftBorder;
  101. int m_cyTopBorder, m_cyBottomBorder;
  102. int m_cxDefaultGap; // default gap value
  103. CSize m_sizeFixedLayout; // fixed layout size
  104. // array of elements
  105. int m_nCount;
  106. void* m_pData; // m_nCount elements - type depends on derived class
  107. // support for delayed hide/show
  108. enum StateFlags
  109. { delayHide = 1, delayShow = 2 };
  110. UINT m_nStateFlags;
  111. virtual BOOL PreTranslateMessage(MSG* pMsg);
  112. virtual void DoPaint(CDC* pDC);
  113. virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler) = 0;
  114. virtual void PostNcDestroy();
  115. BOOL AllocElements(int nElements, int cbElement); // one time only
  116. LRESULT WindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam);
  117. void CalcInsideRect(CRect& rect) const; // adjusts borders etc
  118. //{{AFX_MSG(CControlBar)
  119. afx_msg void OnPaint();
  120. afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  121. afx_msg LRESULT OnSizeParent(WPARAM wParam, LPARAM lParam);
  122. afx_msg LRESULT OnHelpHitTest(WPARAM wParam, LPARAM lParam);
  123. afx_msg void OnInitialUpdate();
  124. afx_msg LRESULT OnIdleUpdateCmdUI(WPARAM wParam, LPARAM lParam);
  125. //}}AFX_MSG
  126. DECLARE_MESSAGE_MAP()
  127. };
  128. ////////////////////////////////////////////
  129. // CStatusBar control
  130. struct AFX_STATUSPANE; // private to implementation
  131. class CStatusBar : public CControlBar
  132. {
  133. DECLARE_DYNAMIC(CStatusBar)
  134. // Construction
  135. public:
  136. CStatusBar();
  137. BOOL Create(CWnd* pParentWnd,
  138. DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_BOTTOM,
  139. UINT nID = AFX_IDW_STATUS_BAR);
  140. BOOL SetIndicators(const UINT FAR* lpIDArray, int nIDCount);
  141. // Attributes
  142. public: // standard control bar things
  143. int CommandToIndex(UINT nIDFind) const;
  144. UINT GetItemID(int nIndex) const;
  145. void GetItemRect(int nIndex, LPRECT lpRect) const;
  146. public:
  147. void GetPaneText(int nIndex, CString& s) const;
  148. BOOL SetPaneText(int nIndex, LPCSTR lpszNewText, BOOL bUpdate = TRUE);
  149. void GetPaneInfo(int nIndex, UINT& nID, UINT& nStyle, int& cxWidth) const;
  150. void SetPaneInfo(int nIndex, UINT nID, UINT nStyle, int cxWidth);
  151. // Implementation
  152. public:
  153. virtual ~CStatusBar();
  154. inline UINT _GetPaneStyle(int nIndex) const;
  155. void _SetPaneStyle(int nIndex, UINT nStyle);
  156. #ifdef _DEBUG
  157. virtual void AssertValid() const;
  158. virtual void Dump(CDumpContext& dc) const;
  159. #endif
  160. protected:
  161. HFONT m_hFont;
  162. int m_cxRightBorder; // right borders (panes get clipped)
  163. inline AFX_STATUSPANE* _GetPanePtr(int nIndex) const;
  164. static void PASCAL DrawStatusText(HDC hDC, CRect const& rect,
  165. LPCSTR lpszText, UINT nStyle);
  166. virtual void DoPaint(CDC* pDC);
  167. virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
  168. //{{AFX_MSG(CStatusBar)
  169. afx_msg void OnSize(UINT nType, int cx, int cy);
  170. afx_msg LRESULT OnSetFont(WPARAM wParam, LPARAM lParam);
  171. afx_msg LRESULT OnGetFont(WPARAM wParam, LPARAM lParam);
  172. afx_msg LRESULT OnSetText(WPARAM wParam, LPARAM lParam);
  173. afx_msg LRESULT OnGetText(WPARAM wParam, LPARAM lParam);
  174. afx_msg LRESULT OnGetTextLength(WPARAM wParam, LPARAM lParam);
  175. //}}AFX_MSG
  176. DECLARE_MESSAGE_MAP()
  177. };
  178. // Styles for status bar panes
  179. #define SBPS_NORMAL 0x0000
  180. #define SBPS_NOBORDERS 0x0100
  181. #define SBPS_POPOUT 0x0200
  182. #define SBPS_DISABLED 0x0400
  183. #define SBPS_STRETCH 0x0800 // stretch to fill status bar - 1st pane only
  184. ////////////////////////////////////////////
  185. // CToolBar control
  186. struct AFX_TBBUTTON; // private to implementation
  187. HBITMAP AFXAPI AfxLoadSysColorBitmap(HINSTANCE hInst, HRSRC hRsrc);
  188. class CToolBar : public CControlBar
  189. {
  190. DECLARE_DYNAMIC(CToolBar)
  191. // Construction
  192. public:
  193. CToolBar();
  194. BOOL Create(CWnd* pParentWnd,
  195. DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP,
  196. UINT nID = AFX_IDW_TOOLBAR);
  197. void SetSizes(SIZE sizeButton, SIZE sizeImage);
  198. // button size should be bigger than image
  199. void SetHeight(int cyHeight);
  200. // call after SetSizes, height overrides bitmap size
  201. BOOL LoadBitmap(LPCSTR lpszResourceName);
  202. BOOL LoadBitmap(UINT nIDResource);
  203. BOOL SetButtons(const UINT FAR* lpIDArray, int nIDCount);
  204. // lpIDArray can be NULL to allocate empty buttons
  205. // Attributes
  206. public: // standard control bar things
  207. int CommandToIndex(UINT nIDFind) const;
  208. UINT GetItemID(int nIndex) const;
  209. virtual void GetItemRect(int nIndex, LPRECT lpRect) const;
  210. public:
  211. // for changing button info
  212. void GetButtonInfo(int nIndex, UINT& nID, UINT& nStyle, int& iImage) const;
  213. void SetButtonInfo(int nIndex, UINT nID, UINT nStyle, int iImage);
  214. // Implementation
  215. public:
  216. virtual ~CToolBar();
  217. inline UINT _GetButtonStyle(int nIndex) const;
  218. void _SetButtonStyle(int nIndex, UINT nStyle);
  219. #ifdef _DEBUG
  220. virtual void AssertValid() const;
  221. virtual void Dump(CDumpContext& dc) const;
  222. #endif
  223. protected:
  224. inline AFX_TBBUTTON* _GetButtonPtr(int nIndex) const;
  225. void InvalidateButton(int nIndex);
  226. void CreateMask(int iImage, CPoint offset,
  227. BOOL bHilite, BOOL bHiliteShadow);
  228. // for custom drawing
  229. struct DrawState
  230. {
  231. HBITMAP hbmMono;
  232. HBITMAP hbmMonoOld;
  233. HBITMAP hbmOldGlyphs;
  234. };
  235. BOOL PrepareDrawButton(DrawState& ds);
  236. BOOL DrawButton(HDC hdC, int x, int y, int iImage, UINT nStyle);
  237. void EndDrawButton(DrawState& ds);
  238. protected:
  239. CSize m_sizeButton; // size of button
  240. CSize m_sizeImage; // size of glyph
  241. HBITMAP m_hbmImageWell; // glyphs only
  242. int m_iButtonCapture; // index of button with capture (-1 => none)
  243. HRSRC m_hRsrcImageWell; // handle to loaded resource for image well
  244. HINSTANCE m_hInstImageWell; // instance handle to load image well from
  245. virtual void DoPaint(CDC* pDC);
  246. virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
  247. virtual int HitTest(CPoint point);
  248. //{{AFX_MSG(CToolBar)
  249. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  250. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  251. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  252. afx_msg void OnCancelMode();
  253. afx_msg LRESULT OnHelpHitTest(WPARAM wParam, LPARAM lParam);
  254. afx_msg void OnSysColorChange();
  255. //}}AFX_MSG
  256. DECLARE_MESSAGE_MAP()
  257. };
  258. // Styles for toolbar buttons
  259. #define TBBS_BUTTON 0x00 // this entry is button
  260. #define TBBS_SEPARATOR 0x01 // this entry is a separator
  261. #define TBBS_CHECKBOX 0x02 // this is an auto check/radio button
  262. // styles for display states
  263. #define TBBS_CHECKED 0x0100 // button is checked/down
  264. #define TBBS_INDETERMINATE 0x0200 // third state
  265. #define TBBS_DISABLED 0x0400 // element is disabled
  266. #define TBBS_PRESSED 0x0800 // button is being depressed - mouse down
  267. ////////////////////////////////////////////
  268. // CDialogBar control
  269. // This is a control bar built from a dialog template. It is a modeless
  270. // dialog that delegates all control notifications to the parent window
  271. // of the control bar [the grandparent of the control]
  272. class CDialogBar : public CControlBar
  273. {
  274. DECLARE_DYNAMIC(CDialogBar)
  275. // Construction
  276. public:
  277. CDialogBar();
  278. BOOL Create(CWnd* pParentWnd, LPCSTR lpszTemplateName,
  279. UINT nStyle, UINT nID);
  280. BOOL Create(CWnd* pParentWnd, UINT nIDTemplate,
  281. UINT nStyle, UINT nID);
  282. // Implementation
  283. public:
  284. virtual ~CDialogBar();
  285. #ifdef _DEBUG
  286. virtual void AssertValid() const;
  287. virtual void Dump(CDumpContext& dc) const;
  288. #endif
  289. protected:
  290. virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
  291. virtual WNDPROC* GetSuperWndProcAddr();
  292. };
  293. /////////////////////////////////////////////////////////////////////////////
  294. // Splitter Wnd
  295. #define SPLS_DYNAMIC_SPLIT 0x0001
  296. class CSplitterWnd : public CWnd
  297. {
  298. DECLARE_DYNAMIC(CSplitterWnd)
  299. // Construction
  300. public:
  301. CSplitterWnd();
  302. // Create a single view type splitter with multiple splits
  303. BOOL Create(CWnd* pParentWnd,
  304. int nMaxRows, int nMaxCols, SIZE sizeMin,
  305. CCreateContext* pContext,
  306. DWORD dwStyle = WS_CHILD | WS_VISIBLE |
  307. WS_HSCROLL | WS_VSCROLL | SPLS_DYNAMIC_SPLIT,
  308. UINT nID = AFX_IDW_PANE_FIRST);
  309. // Create a multiple view type splitter with static layout
  310. BOOL CreateStatic(CWnd* pParentWnd,
  311. int nRows, int nCols,
  312. DWORD dwStyle = WS_CHILD | WS_VISIBLE,
  313. UINT nID = AFX_IDW_PANE_FIRST);
  314. virtual BOOL CreateView(int row, int col, CRuntimeClass* pViewClass,
  315. SIZE sizeInit, CCreateContext* pContext);
  316. // Attributes
  317. public:
  318. int GetRowCount() const;
  319. int GetColumnCount() const;
  320. // information about a specific row or column
  321. void GetRowInfo(int row, int& cyCur, int& cyMin) const;
  322. void SetRowInfo(int row, int cyIdeal, int cyMin);
  323. void GetColumnInfo(int col, int& cxCur, int& cxMin) const;
  324. void SetColumnInfo(int col, int cxIdeal, int cxMin);
  325. // views inside the splitter
  326. CWnd* GetPane(int row, int col) const;
  327. BOOL IsChildPane(CWnd* pWnd, int& row, int& col);
  328. int IdFromRowCol(int row, int col) const;
  329. // Operations
  330. public:
  331. void RecalcLayout(); // call after changing sizes
  332. // Implementation Overridables
  333. protected:
  334. // to customize the drawing
  335. enum ESplitType { splitBox, splitBar, splitIntersection };
  336. virtual void OnDrawSplitter(CDC* pDC, ESplitType nType, const CRect& rect);
  337. virtual void OnInvertTracker(const CRect& rect);
  338. // for customizing scrollbar regions
  339. virtual BOOL CreateScrollBarCtrl(DWORD dwStyle, UINT nID);
  340. // for customizing DYNAMIC_SPLIT behavior
  341. virtual void DeleteView(int row, int col);
  342. virtual BOOL SplitRow(int cyBefore);
  343. virtual BOOL SplitColumn(int cxBefore);
  344. virtual void DeleteRow(int row);
  345. virtual void DeleteColumn(int row);
  346. // Implementation
  347. public:
  348. virtual ~CSplitterWnd();
  349. #ifdef _DEBUG
  350. virtual void AssertValid() const;
  351. virtual void Dump(CDumpContext& dc) const;
  352. #endif
  353. // high level command operations - called by default view implementation
  354. virtual BOOL CanActivateNext(BOOL bPrev = FALSE);
  355. virtual void ActivateNext(BOOL bPrev = FALSE);
  356. virtual BOOL DoKeyboardSplit();
  357. // implementation structure
  358. struct CRowColInfo
  359. {
  360. int nMinSize; // below that try not to show
  361. int nIdealSize; // user set size
  362. // variable depending on the available size layout
  363. int nCurSize; // 0 => invisible, -1 => nonexistant
  364. };
  365. // syncronized scrolling
  366. BOOL DoScroll(CView* pViewFrom, UINT nScrollCode, BOOL bDoScroll = TRUE);
  367. BOOL DoScrollBy(CView* pViewFrom, CSize sizeScroll, BOOL bDoScroll = TRUE);
  368. protected:
  369. // customizable implementation attributes (set by constructor or Create)
  370. CRuntimeClass* m_pDynamicViewClass;
  371. int m_nMaxRows, m_nMaxCols;
  372. int m_cxSplitter, m_cySplitter; // size of box or splitter bar
  373. // current state information
  374. int m_nRows, m_nCols;
  375. BOOL m_bHasHScroll, m_bHasVScroll;
  376. CRowColInfo* m_pColInfo;
  377. CRowColInfo* m_pRowInfo;
  378. // Tracking info - only valid when 'm_bTracking' is set
  379. BOOL m_bTracking, m_bTracking2;
  380. CPoint m_ptTrackOffset;
  381. CRect m_rectLimit;
  382. CRect m_rectTracker, m_rectTracker2;
  383. int m_htTrack;
  384. // implementation routines
  385. BOOL CreateCommon(CWnd* pParentWnd, SIZE sizeMin, DWORD dwStyle, UINT nID);
  386. void StartTracking(int ht);
  387. void StopTracking(BOOL bAccept);
  388. int HitTest(CPoint pt) const;
  389. void GetInsideRect(CRect& rect) const;
  390. void GetHitRect(int ht, CRect& rect);
  391. void TrackRowSize(int y, int row);
  392. void TrackColumnSize(int x, int col);
  393. void DrawAllSplitBars(CDC* pDC, int cxInside, int cyInside);
  394. //{{AFX_MSG(CSplitterWnd)
  395. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  396. afx_msg void OnMouseMove(UINT nFlags, CPoint pt);
  397. afx_msg void OnPaint();
  398. afx_msg void OnLButtonDown(UINT nFlags, CPoint pt);
  399. afx_msg void OnLButtonDblClk(UINT nFlags, CPoint pt);
  400. afx_msg void OnLButtonUp(UINT nFlags, CPoint pt);
  401. afx_msg void OnCancelMode();
  402. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  403. afx_msg void OnSize(UINT nType, int cx, int cy);
  404. afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  405. afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  406. //}}AFX_MSG
  407. DECLARE_MESSAGE_MAP()
  408. };
  409. /////////////////////////////////////////////////////////////////////////////
  410. // CFormView - generic view constructed from a dialog template
  411. class CFormView : public CScrollView
  412. {
  413. DECLARE_DYNAMIC(CFormView)
  414. // Construction
  415. protected: // must derive your own class
  416. CFormView(LPCSTR lpszTemplateName);
  417. CFormView(UINT nIDTemplate);
  418. // Implementation
  419. public:
  420. #ifdef _DEBUG
  421. virtual void AssertValid() const;
  422. virtual void Dump(CDumpContext& dc) const;
  423. #endif
  424. virtual void OnInitialUpdate();
  425. protected:
  426. LPCSTR m_lpszTemplateName;
  427. CCreateContext* m_pCreateContext;
  428. HWND m_hWndFocus; // last window to have focus
  429. virtual void OnDraw(CDC* pDC); // default does nothing
  430. // special case override of child window creation
  431. virtual BOOL Create(LPCSTR, LPCSTR, DWORD,
  432. const RECT&, CWnd*, UINT, CCreateContext*);
  433. virtual BOOL PreTranslateMessage(MSG* pMsg);
  434. virtual WNDPROC* GetSuperWndProcAddr();
  435. virtual void OnActivateView(BOOL, CView*, CView*);
  436. virtual void OnActivateFrame(UINT, CFrameWnd*);
  437. BOOL SaveFocusControl(); // updates m_hWndFocus
  438. //{{AFX_MSG(CFormView)
  439. afx_msg int OnCreate(LPCREATESTRUCT lpcs);
  440. afx_msg void OnSetFocus(CWnd* pOldWnd);
  441. //}}AFX_MSG
  442. DECLARE_MESSAGE_MAP()
  443. };
  444. /////////////////////////////////////////////////////////////////////////////
  445. // CEditView - simple text editor view
  446. class CEditView : public CView
  447. {
  448. DECLARE_DYNCREATE(CEditView)
  449. // Construction
  450. public:
  451. CEditView();
  452. static const DWORD dwStyleDefault;
  453. // Attributes
  454. public:
  455. // CEdit control access
  456. CEdit& GetEditCtrl() const;
  457. // presentation attributes
  458. CFont* GetPrinterFont() const;
  459. void SetPrinterFont(CFont* pFont);
  460. void SetTabStops(int nTabStops);
  461. // other attributes
  462. void GetSelectedText(CString& strResult) const;
  463. // Operations
  464. public:
  465. BOOL FindText(LPCSTR lpszFind, BOOL bNext = TRUE, BOOL bCase = TRUE);
  466. void SerializeRaw(CArchive& ar);
  467. UINT PrintInsideRect(CDC* pDC, RECT& rectLayout, UINT nIndexStart,
  468. UINT nIndexStop);
  469. // Overrideables
  470. protected:
  471. virtual void OnFindNext(LPCSTR lpszFind, BOOL bNext, BOOL bCase);
  472. virtual void OnReplaceSel(LPCSTR lpszFind, BOOL bNext, BOOL bCase,
  473. LPCSTR lpszReplace);
  474. virtual void OnReplaceAll(LPCSTR lpszFind, LPCSTR lpszReplace,
  475. BOOL bCase);
  476. virtual void OnTextNotFound(LPCSTR lpszFind);
  477. // Implementation
  478. public:
  479. virtual ~CEditView();
  480. #ifdef _DEBUG
  481. virtual void AssertValid() const;
  482. virtual void Dump(CDumpContext& dc) const;
  483. #endif
  484. virtual void OnDraw(CDC* pDC);
  485. virtual void Serialize(CArchive& ar);
  486. virtual void DeleteContents();
  487. void ReadFromArchive(CArchive& ar, UINT nLen);
  488. void WriteToArchive(CArchive& ar);
  489. virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo);
  490. static const UINT nMaxSize; // maximum number of characters supported
  491. protected:
  492. UINT m_segText; // global segment for edit control data
  493. int m_nTabStops; // tab stops in dialog units
  494. CUIntArray m_aPageStart; // array of starting pages
  495. HFONT m_hPrinterFont; // if NULL, mirror display font
  496. HFONT m_hMirrorFont; // font object used when mirroring
  497. // construction
  498. WNDPROC* GetSuperWndProcAddr();
  499. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  500. // printing support
  501. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  502. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  503. virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
  504. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo = NULL);
  505. BOOL PaginateTo(CDC* pDC, CPrintInfo* pInfo);
  506. // find & replace support
  507. void OnEditFindReplace(BOOL bFindOnly);
  508. BOOL InitializeReplace();
  509. BOOL SameAsSelected(LPCSTR lpszCompare, BOOL bCase);
  510. // buffer access
  511. LPCSTR LockBuffer() const;
  512. void UnlockBuffer() const;
  513. UINT GetBufferLength() const;
  514. // special overrides for implementation
  515. virtual void CalcWindowRect(LPRECT lpClientRect,
  516. UINT nAdjustType = adjustBorder);
  517. //{{AFX_MSG(CEditView)
  518. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  519. afx_msg void OnPaint();
  520. afx_msg LRESULT OnSetFont(WPARAM wParam, LPARAM lParam);
  521. afx_msg void OnUpdateNeedSel(CCmdUI* pCmdUI);
  522. afx_msg void OnUpdateNeedClip(CCmdUI* pCmdUI);
  523. afx_msg void OnUpdateNeedText(CCmdUI* pCmdUI);
  524. afx_msg void OnUpdateNeedFind(CCmdUI* pCmdUI);
  525. afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
  526. afx_msg void OnEditChange();
  527. afx_msg void OnEditCut();
  528. afx_msg void OnEditCopy();
  529. afx_msg void OnEditPaste();
  530. afx_msg void OnEditClear();
  531. afx_msg void OnEditUndo();
  532. afx_msg void OnEditSelectAll();
  533. afx_msg void OnEditFind();
  534. afx_msg void OnEditReplace();
  535. afx_msg void OnEditRepeat();
  536. afx_msg LRESULT OnFindReplaceCmd(WPARAM wParam, LPARAM lParam);
  537. //}}AFX_MSG
  538. DECLARE_MESSAGE_MAP()
  539. };
  540. /////////////////////////////////////////////////////////////////////////////
  541. // VBX control support
  542. #ifndef NO_VBX_SUPPORT
  543. // Implementation classes
  544. class CVBControlModel; // VBX Control Model Implementation
  545. typedef LPVOID HCTL; // Handle to a VBX Custom Control
  546. // Implementation declarations
  547. typedef char _based((_segment)_self) *BPSTR;
  548. typedef BPSTR FAR* HSZ; // Long handle to a string
  549. // definitions required by CVBControl
  550. DECLARE_HANDLE(HPIC); // Handle to a PIC structure
  551. // DDX control aliasing - stores a pointer to true C++ object
  552. void AFXAPI DDX_VBControl(CDataExchange* pDX, int nIDC, CVBControl*& rpControl);
  553. // Special DDX for subclassing since we don't permit 2 C++ windows !
  554. // DDX for VB control properties
  555. void AFXAPI DDX_VBText(CDataExchange* pDX, int nIDC, int nPropIndex,
  556. CString& value);
  557. void AFXAPI DDX_VBBool(CDataExchange* pDX, int nIDC, int nPropIndex,
  558. BOOL& value);
  559. void AFXAPI DDX_VBInt(CDataExchange* pDX, int nIDC, int nPropIndex,
  560. int& value);
  561. void AFXAPI DDX_VBLong(CDataExchange* pDX, int nIDC, int nPropIndex,
  562. LONG& value);
  563. void AFXAPI DDX_VBColor(CDataExchange* pDX, int nIDC, int nPropIndex,
  564. COLORREF& value);
  565. void AFXAPI DDX_VBFloat(CDataExchange* pDX, int nIDC, int nPropIndex,
  566. float& value);
  567. // DDX for VB read-only properties
  568. void AFXAPI DDX_VBTextRO(CDataExchange* pDX, int nIDC, int nPropIndex,
  569. CString& value);
  570. void AFXAPI DDX_VBBoolRO(CDataExchange* pDX, int nIDC, int nPropIndex,
  571. BOOL& value);
  572. void AFXAPI DDX_VBIntRO(CDataExchange* pDX, int nIDC, int nPropIndex,
  573. int& value);
  574. void AFXAPI DDX_VBLongRO(CDataExchange* pDX, int nIDC, int nPropIndex,
  575. LONG& value);
  576. void AFXAPI DDX_VBColorRO(CDataExchange* pDX, int nIDC, int nPropIndex,
  577. COLORREF& value);
  578. void AFXAPI DDX_VBFloatRO(CDataExchange* pDX, int nIDC, int nPropIndex,
  579. float& value);
  580. /////////////////////////////////////////////////////////////////////////////
  581. class CVBControl : public CWnd
  582. {
  583. DECLARE_DYNAMIC(CVBControl)
  584. // Constructors
  585. public:
  586. CVBControl();
  587. BOOL Create(LPCSTR lpszWindowName, DWORD dwStyle,
  588. const RECT& rect, CWnd* pParentWnd, UINT nID,
  589. CFile* pFile = NULL, BOOL bAutoDelete = FALSE);
  590. // Attributes
  591. // Property Access Routines
  592. BOOL SetNumProperty(int nPropIndex, LONG lValue, int index = 0);
  593. BOOL SetNumProperty(LPCSTR lpszPropName, LONG lValue, int index = 0);
  594. BOOL SetFloatProperty(int nPropIndex, float value, int index = 0);
  595. BOOL SetFloatProperty(LPCSTR lpszPropName, float value, int index = 0);
  596. BOOL SetStrProperty(int nPropIndex, LPCSTR lpszValue, int index = 0);
  597. BOOL SetStrProperty(LPCSTR lpszPropName, LPCSTR lpszValue, int index = 0);
  598. BOOL SetPictureProperty(int nPropIndex, HPIC hPic, int index = 0);
  599. BOOL SetPictureProperty(LPCSTR lpszPropName, HPIC hPic, int index = 0);
  600. LONG GetNumProperty(int nPropIndex, int index = 0);
  601. LONG GetNumProperty(LPCSTR lpszPropName, int index = 0);
  602. float GetFloatProperty(int nPropIndex, int index = 0);
  603. float GetFloatProperty(LPCSTR lpszPropName, int index = 0);
  604. CString GetStrProperty(int nPropIndex, int index = 0);
  605. CString GetStrProperty(LPCSTR lpszPropName, int index = 0);
  606. HPIC GetPictureProperty(int nPropIndex, int index = 0);
  607. HPIC GetPictureProperty(LPCSTR lpszPropName, int index = 0);
  608. // Get the index of a property
  609. int GetPropIndex(LPCSTR lpszPropName) const;
  610. LPCSTR GetPropName(int nIndex) const;
  611. // Get the index of an Event
  612. int GetEventIndex(LPCSTR lpszEventName) const;
  613. LPCSTR GetEventName(int nIndex) const;
  614. // Class name of control
  615. LPCSTR GetVBXClass() const;
  616. // Class information
  617. int GetNumProps() const;
  618. int GetNumEvents() const;
  619. BOOL IsPropArray(int nIndex) const;
  620. UINT GetPropType(int nIndex) const;
  621. DWORD GetPropFlags(int nIndex) const;
  622. // Error reporting variable
  623. // Contains the VB error code returned by a control
  624. int m_nError;
  625. // Operations
  626. // BASIC file number (channel) to CFile association
  627. static void PASCAL OpenChannel(CFile* pFile, WORD wChannel);
  628. static BOOL PASCAL CloseChannel(WORD wChannel);
  629. static CFile* PASCAL GetChannel(WORD wChannel);
  630. static void BeginNewVBHeap();
  631. void AddItem(LPCSTR lpszItem, LONG lIndex);
  632. void RemoveItem(LONG lIndex);
  633. void Refresh();
  634. void Move(RECT& rect);
  635. // Implementation
  636. public:
  637. virtual ~CVBControl();
  638. #ifdef _DEBUG
  639. virtual void AssertValid() const;
  640. virtual void Dump(CDumpContext& dc) const;
  641. #endif
  642. DWORD GetModelFlags();
  643. DWORD GetModelStyles();
  644. void ReferenceFile(BOOL bReference);
  645. static void EnableVBXFloat();
  646. static BOOL ParseWindowText(LPCSTR lpszWindowName, CString& strFileName,
  647. CString& strClassName, CString& strCaption);
  648. HCTL GetHCTL();
  649. // Control Defined Structure -- Dangerous to use directly
  650. BYTE FAR* GetUserSpace();
  651. struct CRecreateStruct // Implementation structure
  652. {
  653. char* pText;
  654. DWORD dwStyle;
  655. CRect rect;
  656. HWND hWndParent;
  657. UINT nControlID;
  658. };
  659. enum
  660. {
  661. TYPE_FROMVBX, // Coming from VBX, assume proper type
  662. TYPE_INTEGER, // int or LONG
  663. TYPE_REAL, // float
  664. TYPE_STRING,
  665. TYPE_PICTURE
  666. };
  667. virtual LRESULT DefControlProc(UINT message, WPARAM wParam, LPARAM lParam);
  668. void Recreate(CRecreateStruct& rs);
  669. CVBControlModel* GetModel();
  670. public:
  671. int GetStdPropIndex(int nStdID) const;
  672. BOOL SetPropertyWithType(int nPropIndex, WORD wType,
  673. LONG lValue, int index);
  674. LONG GetNumPropertyWithType(int nPropIndex, UINT nType, int index);
  675. HSZ GetStrProperty(int nPropIndex, int index, BOOL& bTemp);
  676. CString m_ctlName; // Read only at run-time
  677. // Trace routine to allow one library version
  678. static void CDECL Trace(BOOL bFatal, UINT nFormatIndex, ...);
  679. void VBXAssertValid() const; // non-virtual helper
  680. static BOOL EnableMemoryTracking(BOOL bTracking);
  681. protected:
  682. static CVBControl* NEW();
  683. void DELETE();
  684. virtual BOOL OnChildNotify(UINT, WPARAM, LPARAM, LRESULT*);
  685. LRESULT CallControlProc(UINT message, WPARAM wParam, LPARAM lParam);
  686. BOOL CommonInit();
  687. void SetDefaultValue(int nPropIndex, BOOL bPreHwnd);
  688. BOOL SetStdProp(WORD wPropId, WORD wType, LONG lValue);
  689. LONG GetStdNumProp(WORD wPropId);
  690. CString GetStdStrProp(WORD wPropId);
  691. BOOL SetFontProperty(WORD wPropId, LONG lData);
  692. void BuildCurFont(HDC hDC, HFONT hCurFont, LOGFONT& logFont);
  693. LONG GetNumFontProperty(WORD wPropId);
  694. WORD GetCharSet(HDC hDC, LPCSTR lpFaceName);
  695. virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  696. virtual void PostNcDestroy();
  697. void FireMouseEvent(WORD event, WORD wButton, WPARAM wParam, LPARAM lParam);
  698. BOOL CreateAndSetFont(LPLOGFONT lplf);
  699. BOOL LoadProperties(CFile* pFile, BOOL bPreHwnd);
  700. BOOL LoadProp(int nPropIndex, CFile* pFile);
  701. BOOL LoadPropData(int nPropIndex, CFile* pFile);
  702. BOOL IsPropDefault(int nPropIndex);
  703. CVBControlModel* LoadControl(LPCSTR lpszFileName, LPCSTR lpszControlName);
  704. afx_msg void OnVBXLoaded();
  705. void AllocateHCTL(size_t nSize);
  706. void DeallocateHCTL();
  707. static int ConvertFontSizeToTwips(LONG lFontSize);
  708. // This actually returns a float masquerading as a long
  709. static LONG ConvertTwipsToFontSize(int nTwips);
  710. protected:
  711. CVBControlModel* m_pModel;
  712. BOOL m_bRecreating; // Do not destroy on this NCDestroy
  713. BOOL m_bAutoDelete; // TRUE if automatically created
  714. BOOL m_bInPostNcDestroy; // TRUE if deleting from Destroy
  715. BOOL m_bLoading; // TRUE if loading properties from formfile
  716. int m_nCursorID;
  717. // variables for stack overrun protection
  718. UINT m_nInitialStack; // SP when control recieved first message
  719. UINT m_nRecursionLevel; // Level of control proc recursion
  720. BOOL m_bStackFault; // TRUE if stack fault hit
  721. UINT m_nFaultRecurse; // level at which stack faulted
  722. HBRUSH m_hbrBkgnd; // brush used in WM_CTLCOLOR
  723. HFONT m_hFontCreated; // Font created by control
  724. HCURSOR m_hcurMouse;
  725. HCTL m_hCtl; // Control handle
  726. COLORREF m_clrBkgnd;
  727. COLORREF m_clrFore;
  728. CRect m_rectCreate; // Created Size
  729. CString m_strTag;
  730. // friends required for VB API access
  731. friend LRESULT CALLBACK AFX_EXPORT _AfxVBWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
  732. friend LRESULT CALLBACK AFX_EXPORT _AfxVBProxyProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
  733. friend WORD CALLBACK AFX_EXPORT _AfxVBFireEvent(HCTL hControl, WORD idEvent, LPVOID lpParams);
  734. friend WORD CALLBACK AFX_EXPORT _AfxVBRecreateControlHwnd(HCTL hControl);
  735. DECLARE_MESSAGE_MAP()
  736. /////////////////////
  737. // Implementation
  738. // These APIs can not be referenced by applications
  739. public:
  740. DWORD Save(CFile* pFile);
  741. BOOL Load(CFile* pData);
  742. protected:
  743. BOOL m_bCreatedInDesignMode;
  744. BOOL m_bVisible;
  745. friend class CVBPopupWnd;
  746. BOOL SaveProperties(CFile* pFile, BOOL bPreHwnd);
  747. BOOL SaveProp(int nPropIndex, CFile* pFile);
  748. BOOL SavePropData(int nPropIndex, CFile* pFile);
  749. LONG InitPropPopup(WPARAM wParam, LPARAM lParam);
  750. void DoPictureDlg(int m_nPropId);
  751. void DoColorDlg(int m_nPropId);
  752. void DoFontDlg(int m_nPropId);
  753. void FillList(CListBox* pLB, LPCSTR lpszEnumList);
  754. };
  755. UINT AFXAPI AfxRegisterVBEvent(LPCSTR lpszEventName);
  756. // Values for VBX Property Types
  757. #define DT_HSZ 0x01
  758. #define DT_SHORT 0x02
  759. #define DT_LONG 0x03
  760. #define DT_BOOL 0x04
  761. #define DT_COLOR 0x05
  762. #define DT_ENUM 0x06
  763. #define DT_REAL 0x07
  764. #define DT_XPOS 0x08 // Scaled from float to long twips
  765. #define DT_XSIZE 0x09 // _SIZE scales without origin
  766. #define DT_YPOS 0x0A // _POS subtracts origin
  767. #define DT_YSIZE 0x0B // uses parent's scale properties
  768. #define DT_PICTURE 0x0C
  769. #define COLOR_SYSCOLOR 0x80000000L // defines a System color for a property
  770. #define MAKESYSCOLOR(iColor) ((COLORREF)(iColor + COLOR_SYSCOLOR))
  771. /////////////////////////////////////////////////////////////////////////////
  772. // VBX HPIC Functions
  773. /////////////////////////////////////////////////////////////////////////////
  774. // Picture structure
  775. // This structure is taken from the VB Code and used to be compatible
  776. // with that code
  777. //NOTE: This structure MUST be packed.
  778. #pragma pack(1)
  779. struct NEAR PIC
  780. {
  781. BYTE picType;
  782. union
  783. {
  784. struct
  785. {
  786. HBITMAP hbitmap; // bitmap
  787. } bmp;
  788. struct
  789. {
  790. HMETAFILE hmeta; // Metafile
  791. int xExt, yExt; // extent
  792. } wmf;
  793. struct
  794. {
  795. HICON hicon; // Icon
  796. } icon;
  797. } picData;
  798. // Implementation
  799. WORD nRefCount;
  800. BYTE picReserved[2];
  801. };
  802. #pragma pack()
  803. typedef PIC FAR* LPPIC;
  804. #define PICTYPE_NONE 0
  805. #define PICTYPE_BITMAP 1
  806. #define PICTYPE_METAFILE 2
  807. #define PICTYPE_ICON 3
  808. #define HPIC_INVALID ((HPIC)0xFFFF)
  809. HPIC AFXAPI AfxSetPict(HPIC hPic, const PIC FAR* lpPic);
  810. void AFXAPI AfxGetPict(HPIC hPic, LPPIC lpPic);
  811. void AFXAPI AfxReferencePict(HPIC hPic, BOOL bReference);
  812. #endif //!NO_VBX_SUPPORT
  813. /////////////////////////////////////////////////////////////////////////////
  814. class CMetaFileDC : public CDC
  815. {
  816. DECLARE_DYNAMIC(CMetaFileDC)
  817. // Constructors
  818. public:
  819. CMetaFileDC();
  820. BOOL Create(LPCSTR lpszFilename = NULL);
  821. // Operations
  822. HMETAFILE Close();
  823. // Implementation
  824. public:
  825. #ifdef _DEBUG
  826. virtual void AssertValid() const;
  827. virtual void Dump(CDumpContext& dc) const;
  828. #endif
  829. virtual void SetAttribDC(HDC hDC); // Set the Attribute DC
  830. protected:
  831. virtual void SetOutputDC(HDC hDC); // Set the Output DC -- Not allowed
  832. virtual void ReleaseOutputDC(); // Release the Output DC -- Not allowed
  833. public:
  834. virtual ~CMetaFileDC();
  835. // Clipping Functions (use the Attribute DC's clip region)
  836. virtual int GetClipBox(LPRECT lpRect) const;
  837. virtual BOOL PtVisible(int x, int y) const;
  838. virtual BOOL RectVisible(LPCRECT lpRect) const;
  839. // Text Functions
  840. virtual BOOL TextOut(int x, int y, LPCSTR lpszString, int nCount);
  841. virtual BOOL ExtTextOut(int x, int y, UINT nOptions, LPRECT lpRect,
  842. LPCSTR lpszString, UINT nCount, LPINT lpDxWidths);
  843. virtual CSize TabbedTextOut(int x, int y, LPCSTR lpszString, int nCount,
  844. int nTabPositions, LPINT lpnTabStopPositions, int nTabOrigin);
  845. virtual int DrawText(LPCSTR lpszString, int nCount, LPRECT lpRect,
  846. UINT nFormat);
  847. // Printer Escape Functions
  848. virtual int Escape(int nEscape, int nCount, LPCSTR lpszInData, LPVOID lpOutData);
  849. // Viewport Functions
  850. virtual CPoint SetViewportOrg(int x, int y);
  851. virtual CPoint OffsetViewportOrg(int nWidth, int nHeight);
  852. virtual CSize SetViewportExt(int x, int y);
  853. virtual CSize ScaleViewportExt(int xNum, int xDenom, int yNum, int yDenom);
  854. protected:
  855. void AdjustCP(int cx);
  856. };
  857. /////////////////////////////////////////////////////////////////////////////
  858. // CRectTracker - simple rectangular tracking rectangle w/resize handles
  859. class CRectTracker
  860. {
  861. public:
  862. // Constructors
  863. CRectTracker();
  864. CRectTracker(LPCRECT lpSrcRect, UINT nStyle);
  865. // Style Flags
  866. enum StyleFlags
  867. {
  868. solidLine = 1, dottedLine = 2, hatchedBorder = 4,
  869. resizeInside = 8, resizeOutside = 16, hatchInside = 32,
  870. };
  871. // Hit-Test codes
  872. enum TrackerHit
  873. {
  874. hitNothing = -1,
  875. hitTopLeft = 0, hitTopRight = 1, hitBottomRight = 2, hitBottomLeft = 3,
  876. hitTop = 4, hitRight = 5, hitBottom = 6, hitLeft = 7, hitMiddle = 8
  877. };
  878. // Attributes
  879. UINT m_nStyle; // current state
  880. CRect m_rect; // current position (always in pixels)
  881. CSize m_sizeMin; // minimum X and Y size during track operation
  882. int m_nHandleSize; // size of resize handles (default from WIN.INI)
  883. // Operations
  884. void Draw(CDC* pDC) const;
  885. void GetTrueRect(LPRECT lpTrueRect) const;
  886. BOOL SetCursor(CWnd* pWnd, UINT nHitTest) const;
  887. BOOL Track(CWnd* pWnd, CPoint point, BOOL bAllowInvert = FALSE,
  888. CWnd* pWndClipTo = NULL);
  889. BOOL TrackRubberBand(CWnd* pWnd, CPoint point, BOOL bAllowInvert = TRUE);
  890. int HitTest(CPoint point) const;
  891. int NormalizeHit(int nHandle) const;
  892. // Overridables
  893. virtual void DrawTrackerRect(LPCRECT lpRect, CWnd* pWndClipTo,
  894. CDC* pDC, CWnd* pWnd);
  895. virtual void AdjustRect(int nHandle, LPRECT lpRect);
  896. virtual void OnChangedRect(const CRect& rectOld);
  897. // Implementation
  898. public:
  899. virtual ~CRectTracker();
  900. protected:
  901. BOOL m_bAllowInvert; // flag passed to Track or TrackRubberBand
  902. // implementation helpers
  903. int HitTestHandles(CPoint point) const;
  904. UINT GetHandleMask() const;
  905. void GetHandleRect(int nHandle, CRect* pHandleRect) const;
  906. void GetModifyPointers(int nHandle, int**ppx, int**ppy, int* px, int*py);
  907. int GetHandleSize() const;
  908. BOOL TrackHandle(int nHandle, CWnd* pWnd, CPoint point, CWnd* pWndClipTo);
  909. void Construct();
  910. };
  911. /////////////////////////////////////////////////////////////////////////////
  912. // Informational data structures
  913. struct CPrintInfo // Printing information structure
  914. {
  915. CPrintInfo();
  916. ~CPrintInfo();
  917. CPrintDialog* m_pPD; // pointer to print dialog
  918. BOOL m_bPreview; // TRUE if in preview mode
  919. BOOL m_bContinuePrinting;// set to FALSE to prematurely end printing
  920. UINT m_nCurPage; // Current page
  921. UINT m_nNumPreviewPages; // Desired number of preview pages
  922. CString m_strPageDesc; // Format string for page number display
  923. LPVOID m_lpUserData; // pointer to user created struct
  924. CRect m_rectDraw; // rectangle defining current usable page area
  925. void SetMinPage(UINT nMinPage);
  926. void SetMaxPage(UINT nMaxPage);
  927. UINT GetMinPage() const;
  928. UINT GetMaxPage() const;
  929. UINT GetFromPage() const;
  930. UINT GetToPage() const;
  931. };
  932. struct CPrintPreviewState // Print Preview context/state
  933. {
  934. UINT nIDMainPane; // main pane ID to hide
  935. HMENU hMenu; // saved hMenu
  936. DWORD dwStates; // Control Bar Visible states (bit map)
  937. CView* pViewActiveOld; // save old active view during preview
  938. BOOL (CALLBACK* lpfnCloseProc)(CFrameWnd* pFrameWnd);
  939. HACCEL hAccelTable; // saved accelerator table
  940. // Implementation
  941. CPrintPreviewState();
  942. };
  943. struct CCreateContext // Creation information structure
  944. // All fields are optional and may be NULL
  945. {
  946. // for creating new views
  947. CRuntimeClass* m_pNewViewClass; // runtime class of view to create or NULL
  948. CDocument* m_pCurrentDoc;
  949. // for creating MDI children (CMDIChildWnd::LoadFrame)
  950. CDocTemplate* m_pNewDocTemplate;
  951. // for sharing view/frame state from the original view/frame
  952. CView* m_pLastView;
  953. CFrameWnd* m_pCurrentFrame;
  954. // Implementation
  955. CCreateContext();
  956. };
  957. /////////////////////////////////////////////////////////////////////////////
  958. // VB inlines must ALWAYS be inlined if included at all
  959. #ifndef NO_VBX_SUPPORT
  960. #define _AFXVBX_INLINE inline
  961. #include <afxext.inl>
  962. #undef _AFXVBX_INLINE
  963. #endif
  964. /////////////////////////////////////////////////////////////////////////////
  965. // Inline function declarations
  966. #ifdef _AFX_ENABLE_INLINES
  967. #define _AFXEXT_INLINE inline
  968. #include <afxext.inl>
  969. #endif
  970. #undef AFXAPP_DATA
  971. #define AFXAPP_DATA NEAR
  972. /////////////////////////////////////////////////////////////////////////////
  973. #endif //__AFXEXT_H__