windows-nt/Source/XPSP1/NT/shell/ext/sshow/ssutil.cpp

18 lines
416 B
C++
Raw Normal View History

2020-09-26 03:20:57 -05:00
#include "precomp.h"
#pragma hdrstop
#include "ssutil.h"
#include <shlobj.h>
HPALETTE ScreenSaverUtil::SelectPalette( HDC hDC, HPALETTE hPalette, BOOL bForceBackground )
{
HPALETTE hOldPalette = NULL;
if (hDC && hPalette)
{
hOldPalette = ::SelectPalette( hDC, hPalette, bForceBackground );
RealizePalette( hDC );
SetBrushOrgEx( hDC, 0,0, NULL );
}
return hOldPalette;
}