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.

50 lines
2.0 KiB

  1. #pragma once
  2. #include "wtypes.h"
  3. #include "tom.h"
  4. // NOTES:
  5. //
  6. // Here is a list of items that have been found while investigating richedit
  7. // problems with different versions, but were never implemented because we didn't
  8. // need them in the code. Hopefully, this list will expand so someone in the future
  9. // will be able to use any and all info we have found regarding richedit versions
  10. // where we didn't need to write a wrapper.
  11. //
  12. // 1- EM_GETCHARFORMAT passing in a false is suppose to return the default charformat
  13. // for the richedit. This works on all versions, except v1. V1 returns a
  14. // charformat with the mask set to 0.
  15. //
  16. // 2- TOM (Text Object Model) wasn't implemented in v1.
  17. //
  18. // 3- With richedit 1 and 2, the thumb doesn't show up in the scroll bar if the
  19. // richedit isn't big enough to show a certain size. This is why the max
  20. // number of rows for the multi-line richedits in the header is set to 4. For
  21. // the default fonts, 3 rows aren't big enough to show the thumb.
  22. //
  23. // Add more if not handled in the functions below.
  24. BOOL FInitRichEdit(BOOL fInit);
  25. LPCSTR GetREClassStringA(void);
  26. LPCWSTR GetREClassStringW(void);
  27. HWND CreateREInDialogA(HWND hwndParent, int iID);
  28. LONG RichEditNormalizeCharPos(HWND hwnd, LONG lByte, LPCSTR pszText);
  29. LONG GetRichEditTextLen(HWND hwnd);
  30. void SetRichEditText(HWND hwnd, LPWSTR pwchBuff, BOOL fReplaceSel, ITextDocument *pDoc, BOOL fReadOnly);
  31. DWORD GetRichEditText(HWND hwnd, LPWSTR pwchBuff, DWORD cchNumChars, BOOL fSelection, ITextDocument *pDoc);
  32. void SetFontOnRichEdit(HWND hwnd, HFONT hfont);
  33. LRESULT RichEditExSetSel(HWND hwnd, CHARRANGE *pchrg);
  34. LRESULT RichEditExGetSel(HWND hwnd, CHARRANGE *pchrg);
  35. void RichEditProtectENChange(HWND hwnd, DWORD *pdwOldMask, BOOL fProtect);
  36. // @hack [dhaws] {55073} Do RTL mirroring only in special richedit versions.
  37. void RichEditRTLMirroring(HWND hwndHeader, BOOL fSubject, LONG *plExtendFlags, BOOL fPreRECreation);