Windows NT 4.0 source code leak
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.

92 lines
3.3 KiB

4 years ago
  1. /***************************************************************************
  2. *
  3. * TEXTOUT.H
  4. *
  5. * Copyright (C) Microsoft Corporation 1989.
  6. * All Rights reserved.
  7. *
  8. *****************************************************************************
  9. *
  10. * Program Description: TextOut window specific layer.
  11. *
  12. *****************************************************************************
  13. *
  14. * Revision History: Created 02/23/89 by Maha
  15. * 10/19/90 RobertBu - Added prototype for DisplayAnnoSym() and PtAnnoLim().
  16. *
  17. *
  18. *****************************************************************************
  19. *
  20. * Known Bugs:
  21. * Created by Maha on 02/23/89
  22. * HDS's in these macro made as QDE as suggested by matt on
  23. * 03/05/89
  24. ****************************************************************************/
  25. /**************************************************************************
  26. 1. WORD FindTextHeight( qde, qchBuf, iIdx, iCount)
  27. Input:
  28. qde - Pointer to displaye environment.
  29. qchBuf - pointer to text string
  30. iIdx - index to the first byte from where on width is to be
  31. calculated.
  32. iCount - No. of characters to be considered from iIdx position
  33. onwards.
  34. Output:
  35. Returns the height of the string.
  36. ***************************************************************************/
  37. #define FindTextHeight( qde, qchBuf, iIdx, iCount ) \
  38. HIWORD(GetTextExtent( qde -> hds, qchBuf+iIdx, iCount ))
  39. /**************************************************************************
  40. 3.BOOL DisplayText( qde, qchBuf, iIdx, iCount, ix, iy )
  41. Input:
  42. qde - Pointer to displaye environment.
  43. qchBuf - pointer to text string
  44. iIdx - index to the first byte from where on width is to be
  45. calculated.
  46. iCount - No. of characters to be considered from iIdx position
  47. onwards.
  48. ix - x position where text is to be displayed.
  49. iy - y position
  50. Output:
  51. NULL
  52. Displays count no. of characters starting from iIdx position from the
  53. text buffer at (ix,iy) location.
  54. ***************************************************************************/
  55. #define DisplayText( qde, qchBuf, iIdx, iCount, ix, iy) \
  56. SetBkMode( qde -> hds, TRANSPARENT); (BOOL)TextOut( qde -> hds, ix, iy, qchBuf + iIdx, iCount )
  57. /**************************************************************************
  58. 4.BOOL DisplayString( qde, qchBuf, ix, iy )
  59. Input:
  60. qde - Pointer to displaye environment.
  61. qchBuf - pointer to null terminated string.
  62. ix - x position where text is to be displayed.
  63. iy - y position
  64. Output:
  65. TRUE/FALSE
  66. Displays the string at the (ix, iy) postion.
  67. ***************************************************************************/
  68. #define DisplayString( qde, qchBuf, ix, iy ) \
  69. SetBkMode( qde -> hds, TRANSPARENT); (BOOL)TextOut( qde -> hds, ix, iy, qchBuf, cbString( qchBuf ) )
  70. /**************************************************************************
  71. 5. BOOL GetFontInfo(qde, qMet)
  72. Input:
  73. qde - Pointer to displaye environment.
  74. qMet - pointer to the font metrics structure.
  75. Output:
  76. TRUE/FALSE
  77. ***************************************************************************/
  78. #define GetFontInfo( qde, qtm ) \
  79. (BOOL)GetTextMetrics( qde->hds, qtm )
  80. typedef TEXTMETRIC TM, FAR *QTM;
  81. VOID PASCAL DisplayAnnoSym(HWND, HDC, INT, INT, INT);