Fix compilation warnings introduced by VS 2015

This commit is contained in:
Cheng Zhao 2016-05-10 13:09:41 +09:00
parent 2497c73009
commit e77582baee
4 changed files with 16 additions and 4 deletions

View file

@ -623,7 +623,9 @@ void NativeWindowViews::SetBackgroundColor(const std::string& color_name) {
// Set the background color of native window.
HBRUSH brush = CreateSolidBrush(skia::SkColorToCOLORREF(background_color));
ULONG_PTR previous_brush = SetClassLongPtr(
GetAcceleratedWidget(), GCLP_HBRBACKGROUND, (LONG)brush);
GetAcceleratedWidget(),
GCLP_HBRBACKGROUND,
reinterpret_cast<LONG_PTR>(brush));
if (previous_brush)
DeleteObject((HBRUSH)previous_brush);
#endif