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.

17 lines
416 B

  1. #include "precomp.h"
  2. #pragma hdrstop
  3. #include "ssutil.h"
  4. #include <shlobj.h>
  5. HPALETTE ScreenSaverUtil::SelectPalette( HDC hDC, HPALETTE hPalette, BOOL bForceBackground )
  6. {
  7. HPALETTE hOldPalette = NULL;
  8. if (hDC && hPalette)
  9. {
  10. hOldPalette = ::SelectPalette( hDC, hPalette, bForceBackground );
  11. RealizePalette( hDC );
  12. SetBrushOrgEx( hDC, 0,0, NULL );
  13. }
  14. return hOldPalette;
  15. }