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.

72 lines
1.6 KiB

  1. /*++
  2. *
  3. * WOW v1.0
  4. *
  5. * Copyright (c) 1991, Microsoft Corporation
  6. *
  7. * WUTEXT.C
  8. * WOW32 16-bit User API support
  9. *
  10. * History:
  11. * Created 07-Mar-1991 by Jeff Parsons (jeffpar)
  12. --*/
  13. #include "precomp.h"
  14. #pragma hdrstop
  15. MODNAME(wutext.c);
  16. ULONG FASTCALL WU32GetTabbedTextExtent(PVDMFRAME pFrame)
  17. {
  18. ULONG ul;
  19. PSZ psz2;
  20. PINT p5;
  21. register PGETTABBEDTEXTEXTENT16 parg16;
  22. INT BufferT[256];
  23. GETARGPTR(pFrame, sizeof(GETTABBEDTEXTEXTENT16), parg16);
  24. GETPSZPTR(parg16->f2, psz2);
  25. p5 = STACKORHEAPALLOC(parg16->f4 * sizeof(INT), sizeof(BufferT), BufferT);
  26. getintarray16(parg16->f5, parg16->f4, p5);
  27. ul = GETDWORD16(GetTabbedTextExtent(HDC32(parg16->f1), psz2,
  28. INT32(parg16->f3), INT32(parg16->f4), p5 ));
  29. STACKORHEAPFREE(p5, BufferT);
  30. FREEPSZPTR(psz2);
  31. FREEARGPTR(parg16);
  32. RETURN(ul);
  33. }
  34. ULONG FASTCALL WU32TabbedTextOut(PVDMFRAME pFrame)
  35. {
  36. ULONG ul;
  37. PSZ psz4;
  38. PINT p7;
  39. register PTABBEDTEXTOUT16 parg16;
  40. INT BufferT[256];
  41. GETARGPTR(pFrame, sizeof(TABBEDTEXTOUT16), parg16);
  42. GETPSZPTR(parg16->f4, psz4);
  43. p7 = STACKORHEAPALLOC(parg16->f6 * sizeof(INT), sizeof(BufferT), BufferT);
  44. getintarray16(parg16->f7, parg16->f6, p7);
  45. ul = GETLONG16(TabbedTextOut(
  46. HDC32(parg16->f1),
  47. INT32(parg16->f2),
  48. INT32(parg16->f3),
  49. psz4,
  50. INT32(parg16->f5),
  51. INT32(parg16->f6),
  52. p7,
  53. INT32(parg16->f8)
  54. ));
  55. STACKORHEAPFREE(p7, BufferT);
  56. FREEPSZPTR(psz4);
  57. FREEARGPTR(parg16);
  58. RETURN(ul);
  59. }