From: Cheng Zhao Date: Fri, 20 May 2016 08:12:07 +0000 (+0900) Subject: Use LoadIconMetric to load correct icon X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0059e7bcf9a946cf7f1017a97e5e50001313777b;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Use LoadIconMetric to load correct icon --- diff --git a/atom/common/api/atom_api_native_image.cc b/atom/common/api/atom_api_native_image.cc index 92fba4b..5f15bad 100644 --- a/atom/common/api/atom_api_native_image.cc +++ b/atom/common/api/atom_api_native_image.cc @@ -4,6 +4,10 @@ #include "atom/common/api/atom_api_native_image.h" +#if defined(OS_WIN) +#include +#endif + #include #include @@ -155,9 +159,9 @@ base::win::ScopedHICON ReadICOFromPath(const base::FilePath& path) { } // Load the icon from file. - return base::win::ScopedHICON(static_cast( - LoadImage(NULL, image_path.value().c_str(), IMAGE_ICON, 0, 0, - LR_DEFAULTSIZE | LR_LOADFROMFILE))); + HICON icon = NULL; + LoadIconMetric(NULL, image_path.value().c_str(), LIM_SMALL, &icon); + return base::win::ScopedHICON(icon); } void ReadImageSkiaFromICO(gfx::ImageSkia* image, HICON icon) {