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.

48 lines
1.5 KiB

  1. /****************************** Module Header ******************************\
  2. * Module Name: clrect.c
  3. *
  4. * Copyright (c) 1985 - 1999, Microsoft Corporation
  5. *
  6. * This module contains the various rectangle manipulation APIs.
  7. *
  8. * History:
  9. * 04-05-91 DarrinM Pulled these routines from RTL because they call GDI.
  10. \***************************************************************************/
  11. #include "precomp.h"
  12. #pragma hdrstop
  13. /***************************************************************************\
  14. * DrawFocusRect (API)
  15. *
  16. * Draw a rectangle in the style used to indicate focus
  17. * Since this is an XOR function, calling it a second time with the same
  18. * rectangle removes the rectangle from the screen
  19. *
  20. * History:
  21. * 19-Jan-1993 mikeke Client side version
  22. \***************************************************************************/
  23. BOOL DrawFocusRect(
  24. HDC hDC,
  25. CONST RECT *pRect)
  26. {
  27. UserAssert(ghdcGray != NULL);
  28. return ClientFrame(hDC, pRect, KHBRUSH_TO_HBRUSH(gpsi->hbrGray), PATINVERT,
  29. max(1, gpsi->aiSysMet[SM_CXFOCUSBORDER]), max(1, gpsi->aiSysMet[SM_CYFOCUSBORDER]));
  30. }
  31. /***************************************************************************\
  32. * FrameRect (API)
  33. *
  34. * History:
  35. * 01-25-91 DavidPe Created.
  36. \***************************************************************************/
  37. int APIENTRY FrameRect(
  38. HDC hdc,
  39. CONST RECT *lprc,
  40. HBRUSH hbr)
  41. {
  42. return ClientFrame(hdc, lprc, hbr, PATCOPY, 1, 1);
  43. }