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.

119 lines
3.1 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 __AFXPEN_H__
  10. #define __AFXPEN_H__
  11. #ifndef __AFXWIN_H__
  12. #include <afxwin.h>
  13. #endif
  14. /////////////////////////////////////////////////////////////////////////////
  15. // AFXPEN - MFC PEN Windows support
  16. // Classes declared in this file
  17. //CEdit
  18. class CHEdit; // Handwriting Edit control
  19. class CBEdit; // Boxed Handwriting Edit control
  20. /////////////////////////////////////////////////////////////////////////////
  21. #include <penwin.h>
  22. // AFXDLL support
  23. #undef AFXAPP_DATA
  24. #define AFXAPP_DATA AFXAPI_DATA
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CHEdit - Handwriting Edit control
  27. class CHEdit : public CEdit
  28. {
  29. DECLARE_DYNAMIC(CHEdit)
  30. // Constructors
  31. public:
  32. CHEdit();
  33. BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  34. // Attributes
  35. // inflation between client area and writing window
  36. BOOL GetInflate(LPRECTOFS lpRectOfs);
  37. BOOL SetInflate(LPRECTOFS lpRectOfs);
  38. // Recognition context (lots of options here)
  39. BOOL GetRC(LPRC lpRC);
  40. BOOL SetRC(LPRC lpRC);
  41. // Underline mode (HEdit only)
  42. BOOL GetUnderline();
  43. BOOL SetUnderline(BOOL bUnderline = TRUE);
  44. // Operations
  45. HPENDATA GetInkHandle();
  46. BOOL SetInkMode(HPENDATA hPenDataInitial = NULL); // start inking
  47. BOOL StopInkMode(UINT hep);
  48. // Implementation
  49. public:
  50. virtual ~CHEdit();
  51. protected:
  52. virtual WNDPROC* GetSuperWndProcAddr();
  53. };
  54. /////////////////////////////////////////////////////////////////////////////
  55. // CBEdit - Boxed Handwriting Edit control
  56. class CBEdit : public CHEdit
  57. {
  58. DECLARE_DYNAMIC(CBEdit)
  59. // Constructors
  60. public:
  61. CBEdit();
  62. BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
  63. // Attributes
  64. // converting from logical to byte positions
  65. DWORD CharOffset(UINT nCharPosition); // logical -> byte
  66. DWORD CharPosition(UINT nCharOffset); // byte -> logical
  67. // BOXLAYOUT info
  68. void GetBoxLayout(LPBOXLAYOUT lpBoxLayout);
  69. BOOL SetBoxLayout(LPBOXLAYOUT lpBoxLayout);
  70. // Operations
  71. void DefaultFont(BOOL bRepaint); // set default font
  72. // Implementation
  73. public:
  74. virtual ~CBEdit();
  75. protected:
  76. virtual WNDPROC* GetSuperWndProcAddr();
  77. private:
  78. BOOL GetUnderline(); // disabled in CBEdit
  79. BOOL SetUnderline(BOOL bUnderline); // disabled in CBEdit
  80. };
  81. /////////////////////////////////////////////////////////////////////////////
  82. // Inline function declarations
  83. #ifdef _AFX_ENABLE_INLINES
  84. #define _AFXPEN_INLINE inline
  85. #include <afxpen.inl>
  86. #endif
  87. #undef AFXAPP_DATA
  88. #define AFXAPP_DATA NEAR
  89. /////////////////////////////////////////////////////////////////////////////
  90. #endif //__AFXPEN_H__