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.

63 lines
2.4 KiB

  1. //
  2. // flshare.h
  3. //
  4. typedef struct {
  5. RECT rcFormat; // Format rectangle.
  6. int cxTabLength; // Tab length in pixels.
  7. int iXSign;
  8. int iYSign;
  9. int cyLineHeight; // Height of a line based on DT_EXTERNALLEADING
  10. int cxMaxWidth; // Width of the format rectangle.
  11. int cxMaxExtent; // Width of the longest line drawn.
  12. int cxRightMargin; // Right margin in pixels (with proper sign) on DT_NOPREFIX flag.
  13. int cxOverhang; // Character overhang.
  14. } DRAWTEXTDATA, *LPDRAWTEXTDATA;
  15. typedef struct {
  16. RECT rcFormat; // Format rectangle.
  17. int cyTabLength; // Tab length in pixels.
  18. int iXSign;
  19. int iYSign;
  20. int cxLineHeight; // Height of a line based on DT_EXTERNALLEADING
  21. int cyMaxWidth; // Width of the format rectangle.
  22. int cyMaxExtent; // Width of the longest line drawn.
  23. int cyBottomMargin; // Right margin in pixels (with proper sign) on DT_NOPREFIX flag.
  24. int cyOverhang; // Character overhang.
  25. } DRAWTEXTDATAVERT, *LPDRAWTEXTDATAVERT;
  26. #define CR 13
  27. #define LF 10
  28. #define DT_HFMTMASK 0x03
  29. #define DT_VFMTMASK 0x0C
  30. // FE support both Kanji and English mnemonic characters,
  31. // toggled from control panel. Both mnemonics are embedded in menu
  32. // resource templates. The following prefixes guide their parsing.
  33. #define CH_ENGLISHPREFIX 0x1E
  34. #define CH_KANJIPREFIX 0x1F
  35. #define CH_PREFIX L'&'
  36. #define CCHELLIPSIS 3
  37. extern const WCHAR szEllipsis[];
  38. // Max length of a full path is around 260. But, most of the time, it will
  39. // be less than 128. So, we alloc only this much on stack. If the string is
  40. // longer, we alloc from local heap (which is slower).
  41. //
  42. // BOGUS: For international versions, we need to give some more margin here.
  43. //
  44. #define MAXBUFFSIZE 128
  45. HFONT GetBiDiFont(HDC hdc);
  46. BOOL UserIsFELineBreakEnd(WCHAR wch);
  47. BOOL UserIsFullWidth(WCHAR wChar);
  48. LPCWSTR GetNextWordbreak(LPCWSTR lpch, LPCWSTR lpchEnd, DWORD dwFormat, LPDRAWTEXTDATA lpDrawInfo);
  49. LPCWSTR DT_AdjustWhiteSpaces(LPCWSTR lpStNext, LPINT lpiCount, UINT wFormat);
  50. LONG GetPrefixCount( LPCWSTR lpstr, int cch, LPWSTR lpstrCopy, int charcopycount);
  51. int KKGetPrefixWidth(HDC hdc, LPCWSTR lpStr, int cch);
  52. LPWSTR PathFindFileName(LPCWSTR pPath, int cchText);