diff --git a/atom/browser/api/atom_api_system_preferences.h b/atom/browser/api/atom_api_system_preferences.h index bfd64e80159..e0ef26a9fc4 100644 --- a/atom/browser/api/atom_api_system_preferences.h +++ b/atom/browser/api/atom_api_system_preferences.h @@ -50,11 +50,6 @@ class SystemPreferences : public mate::EventEmitter #if defined(OS_WIN) bool IsAeroGlassEnabled(); - typedef HRESULT(STDAPICALLTYPE* DwmGetColorizationColor)(DWORD*, BOOL*); - DwmGetColorizationColor dwmGetColorizationColor = - (DwmGetColorizationColor)GetProcAddress(LoadLibraryW(L"dwmapi.dll"), - "DwmGetColorizationColor"); - std::string GetAccentColor(); std::string GetColor(const std::string& color, mate::Arguments* args); diff --git a/atom/browser/api/atom_api_system_preferences_win.cc b/atom/browser/api/atom_api_system_preferences_win.cc index b3fd74d59d9..0a24d1abf45 100644 --- a/atom/browser/api/atom_api_system_preferences_win.cc +++ b/atom/browser/api/atom_api_system_preferences_win.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. +#include #include #include "atom/browser/api/atom_api_system_preferences.h" @@ -38,7 +39,7 @@ std::string SystemPreferences::GetAccentColor() { DWORD color = 0; BOOL opaque = FALSE; - if (FAILED(dwmGetColorizationColor(&color, &opaque))) { + if (FAILED(DwmGetColorizationColor(&color, &opaque))) { return ""; } diff --git a/electron.gyp b/electron.gyp index 790d0ed5e2a..922c6b25700 100644 --- a/electron.gyp +++ b/electron.gyp @@ -363,6 +363,7 @@ ], 'link_settings': { 'libraries': [ + '-ldwmapi.lib', '-limm32.lib', '-lgdi32.lib', '-loleacc.lib',