Correctly set window icon from ICO

This commit is contained in:
Cheng Zhao 2016-05-20 19:46:05 +09:00
parent ea2807c890
commit d26480b74e
6 changed files with 34 additions and 13 deletions

View file

@ -73,6 +73,14 @@ const char* AppCommandToString(int command_id) {
} // namespace
void NativeWindowViews::SetIcon(HICON small_icon, HICON app_icon) {
HWND hwnd = GetAcceleratedWidget();
SendMessage(hwnd, WM_SETICON, ICON_SMALL,
reinterpret_cast<LPARAM>(small_icon));
SendMessage(hwnd, WM_SETICON, ICON_BIG,
reinterpret_cast<LPARAM>(app_icon));
}
bool NativeWindowViews::ExecuteWindowsCommand(int command_id) {
std::string command = AppCommandToString(command_id);
NotifyWindowExecuteWindowsCommand(command);