Source code of Windows XP (NT5)
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.

40 lines
1.0 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 1998, 1999, 2000
  4. *
  5. * TITLE: SSUTIL.H
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: ShaunIv
  10. *
  11. * DATE: 1/13/1999
  12. *
  13. * DESCRIPTION: Useful utility functions
  14. *
  15. *******************************************************************************/
  16. #ifndef __SSUTIL_H_INCLUDED
  17. #define __SSUTIL_H_INCLUDED
  18. #include <windows.h>
  19. #include <uicommon.h>
  20. namespace ScreenSaverUtil
  21. {
  22. bool SetIcons( HWND hWnd, HINSTANCE hInstance, int nResId );
  23. bool IsValidRect( RECT &rc );
  24. void EraseDiffRect( HDC hDC, const RECT &oldRect, const RECT &diffRect, HBRUSH hBrush );
  25. bool SelectDirectory( HWND hWnd, LPCTSTR pszPrompt, TCHAR szDirectory[] );
  26. HPALETTE SelectPalette( HDC hDC, HPALETTE hPalette, BOOL bForceBackground );
  27. void NormalizeRect( RECT &rc );
  28. template <class T>
  29. void Swap( T &a, T &b )
  30. {
  31. T temp = a;
  32. a = b;
  33. b = temp;
  34. }
  35. } // Namespace
  36. #endif //__SSUTIL_H_INCLUDED