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.

118 lines
6.7 KiB

  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. // Inlines for AFXCMN2.H
  11. #ifdef _AFXCMN2_INLINE
  12. _AFXCMN2_INLINE CRichEdit2Ctrl::CRichEdit2Ctrl()
  13. { }
  14. _AFXCMN2_INLINE BOOL CRichEdit2Ctrl::CanUndo() const
  15. { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_CANUNDO, 0, 0); }
  16. _AFXCMN2_INLINE int CRichEdit2Ctrl::GetLineCount() const
  17. { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, EM_GETLINECOUNT, 0, 0); }
  18. _AFXCMN2_INLINE BOOL CRichEdit2Ctrl::GetModify() const
  19. { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_GETMODIFY, 0, 0); }
  20. _AFXCMN2_INLINE void CRichEdit2Ctrl::SetModify(BOOL bModified /* = TRUE */)
  21. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETMODIFY, bModified, 0);}
  22. _AFXCMN2_INLINE void CRichEdit2Ctrl::GetRect(LPRECT lpRect) const
  23. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_GETRECT, 0, (LPARAM)lpRect); }
  24. _AFXCMN2_INLINE CPoint CRichEdit2Ctrl::GetCharPos(long lChar) const
  25. { ASSERT(::IsWindow(m_hWnd)); CPoint pt; ::SendMessage(m_hWnd, EM_POSFROMCHAR, (WPARAM)&pt, (LPARAM)lChar); return pt;}
  26. _AFXCMN2_INLINE void CRichEdit2Ctrl::SetOptions(WORD wOp, DWORD dwFlags)
  27. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETOPTIONS, (WPARAM)wOp, (LPARAM)dwFlags); }
  28. _AFXCMN2_INLINE void CRichEdit2Ctrl::EmptyUndoBuffer()
  29. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_EMPTYUNDOBUFFER, 0, 0); }
  30. _AFXCMN2_INLINE void CRichEdit2Ctrl::ReplaceSel(LPCTSTR lpszNewText, BOOL bCanUndo)
  31. {ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_REPLACESEL, (WPARAM) bCanUndo, (LPARAM)lpszNewText); }
  32. _AFXCMN2_INLINE void CRichEdit2Ctrl::SetRect(LPCRECT lpRect)
  33. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETRECT, 0, (LPARAM)lpRect); }
  34. _AFXCMN2_INLINE BOOL CRichEdit2Ctrl::Undo()
  35. { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_UNDO, 0, 0); }
  36. _AFXCMN2_INLINE void CRichEdit2Ctrl::Clear()
  37. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_CLEAR, 0, 0); }
  38. _AFXCMN2_INLINE void CRichEdit2Ctrl::Copy()
  39. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_COPY, 0, 0); }
  40. _AFXCMN2_INLINE void CRichEdit2Ctrl::Cut()
  41. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_CUT, 0, 0); }
  42. _AFXCMN2_INLINE void CRichEdit2Ctrl::Paste()
  43. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_PASTE, 0, 0); }
  44. _AFXCMN2_INLINE BOOL CRichEdit2Ctrl::SetReadOnly(BOOL bReadOnly /* = TRUE */ )
  45. { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_SETREADONLY, bReadOnly, 0L); }
  46. _AFXCMN2_INLINE int CRichEdit2Ctrl::GetFirstVisibleLine() const
  47. { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, EM_GETFIRSTVISIBLELINE, 0, 0L); }
  48. _AFXCMN2_INLINE BOOL CRichEdit2Ctrl::DisplayBand(LPRECT pDisplayRect)
  49. { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_DISPLAYBAND, 0, (LPARAM)pDisplayRect); }
  50. _AFXCMN2_INLINE void CRichEdit2Ctrl::GetSel(CHARRANGE &cr) const
  51. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_EXGETSEL, 0, (LPARAM)&cr); }
  52. _AFXCMN2_INLINE void CRichEdit2Ctrl::LimitText(long nChars)
  53. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_EXLIMITTEXT, 0, nChars); }
  54. _AFXCMN2_INLINE long CRichEdit2Ctrl::LineFromChar(long nIndex) const
  55. { ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_EXLINEFROMCHAR, 0, nIndex); }
  56. _AFXCMN2_INLINE void CRichEdit2Ctrl::SetSel(CHARRANGE &cr)
  57. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_EXSETSEL, 0, (LPARAM)&cr); }
  58. #ifndef _CHICAGO_
  59. _AFXCMN2_INLINE long CRichEdit2Ctrl::FindText(DWORD dwFlags, FINDTEXTEX* pFindText) const
  60. { ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_FINDTEXTEX, dwFlags, (LPARAM)pFindText); }
  61. #endif // !_CHICAGO_
  62. _AFXCMN2_INLINE long CRichEdit2Ctrl::FormatRange(FORMATRANGE* pfr, BOOL bDisplay)
  63. { ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_FORMATRANGE, (WPARAM)bDisplay, (LPARAM)pfr); }
  64. _AFXCMN2_INLINE long CRichEdit2Ctrl::GetEventMask() const
  65. { ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_GETEVENTMASK, 0, 0L); }
  66. _AFXCMN2_INLINE long CRichEdit2Ctrl::GetLimitText() const
  67. { ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_GETLIMITTEXT, 0, 0L); }
  68. _AFXCMN2_INLINE long CRichEdit2Ctrl::GetSelText(LPSTR lpBuf) const
  69. { ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_GETSELTEXT, 0, (LPARAM)lpBuf); }
  70. _AFXCMN2_INLINE void CRichEdit2Ctrl::HideSelection(BOOL bHide, BOOL bPerm)
  71. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_HIDESELECTION, bHide, bPerm); }
  72. _AFXCMN2_INLINE void CRichEdit2Ctrl::RequestResize()
  73. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_REQUESTRESIZE, 0, 0L); }
  74. _AFXCMN2_INLINE WORD CRichEdit2Ctrl::GetSelectionType() const
  75. { ASSERT(::IsWindow(m_hWnd)); return (WORD)::SendMessage(m_hWnd, EM_SELECTIONTYPE, 0, 0L); }
  76. _AFXCMN2_INLINE COLORREF CRichEdit2Ctrl::SetBackgroundColor(BOOL bSysColor, COLORREF cr)
  77. { ASSERT(::IsWindow(m_hWnd)); return (COLORREF)::SendMessage(m_hWnd, EM_SETBKGNDCOLOR, bSysColor, cr); }
  78. _AFXCMN2_INLINE DWORD CRichEdit2Ctrl::SetEventMask(DWORD dwEventMask)
  79. { ASSERT(::IsWindow(m_hWnd)); return (DWORD)::SendMessage(m_hWnd, EM_SETEVENTMASK, 0, dwEventMask); }
  80. _AFXCMN2_INLINE BOOL CRichEdit2Ctrl::SetOLECallback(IRichEditOleCallback* pCallback)
  81. { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_SETOLECALLBACK, 0, (LPARAM)pCallback); }
  82. _AFXCMN2_INLINE BOOL CRichEdit2Ctrl::SetTargetDevice(HDC hDC, long lLineWidth)
  83. { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_SETTARGETDEVICE, (WPARAM)hDC, lLineWidth); }
  84. _AFXCMN2_INLINE BOOL CRichEdit2Ctrl::SetTargetDevice(CDC &dc, long lLineWidth)
  85. { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_SETTARGETDEVICE, (WPARAM)dc.m_hDC, lLineWidth); }
  86. _AFXCMN2_INLINE long CRichEdit2Ctrl::StreamIn(int nFormat, EDITSTREAM &es)
  87. { ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_STREAMIN, nFormat, (LPARAM)&es); }
  88. _AFXCMN2_INLINE long CRichEdit2Ctrl::StreamOut(int nFormat, EDITSTREAM &es)
  89. { ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, EM_STREAMOUT, nFormat, (LPARAM)&es); }
  90. _AFXCMN2_INLINE long CRichEdit2Ctrl::GetTextLength() const
  91. { ASSERT(::IsWindow(m_hWnd)); return (long)::SendMessage(m_hWnd, WM_GETTEXTLENGTH, NULL, NULL); }
  92. #endif //_AFXCMN2_INLINE
  93. /////////////////////////////////////////////////////////////////////////////