windows-nt/Source/XPSP1/NT/shell/ext/sshow/ssutil.cpp
2020-09-26 16:20:57 +08:00

18 lines
416 B
C++

#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;
}