home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 19.ddi / MFC / INCLUDE / AFXPEN.H_ / AFXPEN.H
Encoding:
C/C++ Source or Header  |  1993-02-08  |  3.1 KB  |  120 lines

  1. // Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992 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 Microsoft
  7. // QuickHelp and/or WinHelp documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11.  
  12. #ifndef __AFXPEN_H__
  13. #define __AFXPEN_H__
  14.  
  15. #ifndef __AFXWIN_H__
  16. #include "afxwin.h"
  17. #endif
  18.  
  19. /////////////////////////////////////////////////////////////////////////////
  20. // AFXPEN - MFC PEN Windows support
  21.  
  22. // Classes declared in this file
  23.  
  24.     //CEdit
  25.         class CHEdit;           // Handwriting Edit control
  26.             class CBEdit;       // Boxed Handwriting Edit control
  27.  
  28. /////////////////////////////////////////////////////////////////////////////
  29.  
  30. #include "penwin.h"
  31.  
  32. // AFXDLL support
  33. #undef AFXAPP_DATA
  34. #define AFXAPP_DATA     AFXAPI_DATA
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CHEdit - Handwriting Edit control
  38.  
  39. class CHEdit : public CEdit
  40. {
  41.     DECLARE_DYNAMIC(CHEdit)
  42.  
  43. // Constructors
  44. public:
  45.     CHEdit();
  46.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  47.  
  48. // Attributes
  49.     // inflation between client area and writing window
  50.     BOOL GetInflate(LPRECTOFS lpRectOfs);
  51.     BOOL SetInflate(LPRECTOFS lpRectOfs);
  52.  
  53.     // Recognition context (lots of options here)
  54.     BOOL GetRC(LPRC lpRC);
  55.     BOOL SetRC(LPRC lpRC);
  56.  
  57.     // Underline mode (HEdit only)
  58.     BOOL GetUnderline();
  59.     BOOL SetUnderline(BOOL bUnderline = TRUE);
  60.  
  61. // Operations
  62.     HPENDATA GetInkHandle();
  63.     BOOL SetInkMode(HPENDATA hPenDataInitial = NULL);       // start inking
  64.     BOOL StopInkMode(UINT hep);
  65.  
  66. // Implementation
  67. public:
  68.     virtual ~CHEdit();
  69. protected:
  70.     virtual WNDPROC* GetSuperWndProcAddr();
  71. };
  72.  
  73. /////////////////////////////////////////////////////////////////////////////
  74. // CBEdit - Boxed Handwriting Edit control
  75.  
  76. class CBEdit : public CHEdit
  77. {
  78.     DECLARE_DYNAMIC(CBEdit)
  79.  
  80. // Constructors
  81. public:
  82.     CBEdit();
  83.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  84.  
  85. // Attributes
  86.     // converting from logical to byte positions
  87.     DWORD CharOffset(UINT nCharPosition);       // logical -> byte
  88.     DWORD CharPosition(UINT nCharOffset);       // byte -> logical
  89.  
  90.     // BOXLAYOUT info
  91.     void GetBoxLayout(LPBOXLAYOUT lpBoxLayout);
  92.     BOOL SetBoxLayout(LPBOXLAYOUT lpBoxLayout);
  93.  
  94. // Operations
  95.     void DefaultFont(BOOL bRepaint);            // set default font
  96.  
  97. // Implementation
  98. public:
  99.     virtual ~CBEdit();
  100. protected:
  101.     virtual WNDPROC* GetSuperWndProcAddr();
  102. private:
  103.     BOOL GetUnderline();            // disabled in CBEdit
  104.     BOOL SetUnderline(BOOL bUnderline); // disabled in CBEdit
  105. };
  106.  
  107. /////////////////////////////////////////////////////////////////////////////
  108. // Inline function declarations
  109.  
  110. #ifdef _AFX_ENABLE_INLINES
  111. #define _AFXPEN_INLINE inline
  112. #include "afxpen.inl"
  113. #endif
  114.  
  115. #undef AFXAPP_DATA
  116. #define AFXAPP_DATA     NEAR
  117.  
  118. /////////////////////////////////////////////////////////////////////////////
  119. #endif //__AFXPEN_H__
  120.