From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63635 invoked by alias); 2 Nov 2017 06:47:33 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 63618 invoked by uid 89); 2 Nov 2017 06:47:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=AWL,BAYES_60,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=02.11.2017, 02112017, 01112017, 01.11.2017 X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (217.72.192.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Nov 2017 06:47:31 +0000 Received: from [192.168.178.45] ([95.91.246.210]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.183]) with ESMTPSA (Nemesis) id 0LvRqd-1dAAgF2JF5-010fQd for ; Thu, 02 Nov 2017 07:47:28 +0100 Subject: Re: Can I change the windows icon from command line? To: cygwin@cygwin.com References: <23034.14121.700138.215194@gargle.gargle.HOWL> <24a5fd8b-b9d1-b7c0-1c0c-b0ec96159ce8@towo.net> <7362515c-61fe-bf66-2871-cbf4a11883b5@SystematicSw.ab.ca> From: Thomas Wolff Message-ID: Date: Thu, 02 Nov 2017 06:47:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <7362515c-61fe-bf66-2871-cbf4a11883b5@SystematicSw.ab.ca> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-UI-Out-Filterresults: notjunk:1;V01:K0:BgaiFLizYBk=:tZhU2YJHAttWNjjqe3MJ66 /8tj285vtjtWxcbherpxg19akYN9o2b/KA0xvkPHnN3Ug276eTWhIlf9g445FMeqy1aMbxSGP vpWaR0NDMeFdY4pIXGyp7ELiuHgaMiqRIn4DQ1WwG15/HICEpDtiLofDG5nVX97G2qeFZSiJ1 gCde8cAfax+dwfG0fc3jYAhzOeoWglIXi1vy0Y82F4iA2bZQqJRSLQsK0buvNvYqApeyoi3sW sTi/Tv0c7dQg9LALuo2hpJbxJyUElh/MMzCwhwwzvcNBZFfcgiOpfqb7AC3+XvN2Sxr69mu/D +j41N0F2yt3uUWWkfjj/qzD8Oluj0zSkBSnWwk5sOg0QQnvvokiW7b9QftGlGpbU2bVrIMyli vUQPilYiyXI6FLn/+WooIsuHk1kL4CCHL61OfJXCgfoHxoGX8nAIROMljelN0oW7+2WGsFuNP s6uFeVHHqB52ss2piDzNOGP8b4dOids8DuUrRCfMDtCxkzy7S7cmnaXUUqGOty6JULGx09adR aOnfpMrr/ksSJWF9IN6iOOUl3/639iI9He5ygMwKBj6b0WS0a8jCVVw2Vmq570Oqp341OH1yW O8arTFvyG4PigMC39gN66eUop9BTGloVTctayhDyDV/Fy8ukdQ3FYoWqQBa6NZ+97cOwHYeZ5 D7QYfMp0lGV6WGjkBH3WqWkRzGMsjTjVoN/l4HufZbY5mLAt5nyZgEc04mjRlx9uq+oP1tt+t Twtbyj8oUAeYUGWFaObZ2uKmsCFFslJyG7s4J0VlVy3XEjUy6n3BcLSkMBk= X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00020.txt.bz2 Am 02.11.2017 um 03:39 schrieb Brian Inglis: > On 2017-11-01 15:10, Thomas Wolff wrote: >> Am 01.11.2017 um 22:05 schrieb bzs@theworld.com: >>> A trivial little shell script I use for setting xterm title/icon via escape >>> sequences: >>> ... >> That sequence is setting the icon *label*, not the icon. Mintty cannot support >> it because there is no corresponding Windows function. > But there is a sequence of Windows functions from: > > http://www.cplusplus.com/forum/general/28470/ > > summarizing (but this is from 2010 so may need tweaks): > > "There are two icons in the window, 32x32 and 16x16. > If you want to change the the icon at the task bar and title bar you should do: > > hIcon = (HICON)LoadImage(NULL, "menu_two.ico", IMAGE_ICON, 32, 32, > LR_LOADFROMFILE); > hIconSm = (HICON)LoadImage(NULL, "menu_two.ico", IMAGE_ICON, 16, 16, > LR_LOADFROMFILE); > > LoadImage just loads the icon from the file. You need to assign the icon to the > window. You do this by sending a WM_SETICON message: > > SendMessage( yourwnd, WM_SETICON, ICON_SMALL, (LPARAM)hIconSm ); > SendMessage( yourwnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon ); > > Reference: http://msdn.microsoft.com/en-us/library/ms632643(VS.85).aspx > > I found out the difference with the ICON_SMALL and ICON_BIG, if you only set > ICON_SMALL then the Alt-Tab icon is stretched and looks bad. > If you set the ICON_BIG as well as ICON_SMALL, then everything looks nice." > > For Xwindow icons, some approaches from google, depending on needs: > > http://www.ideatrash.net/2014/10/howto-get-custom-icons-with-each-new.html > http://www.troubleshooters.com/linux/terminal_icon.htm > http://blog.samadamday.com/2014/automatically-set-windows-icons-based-on-gnome-theme/ > https://superuser.com/questions/344320/how-do-i-change-the-icon-of-an-xterm > http://www.leonerd.org.uk/code/xseticon/ Thanks, Brian, for the links and the sample code which will make it easier. This is about changing the icon, to get that sorted out. I referred to changing the icon label (an existing sequence supported by xterm), i.e. the text shown in the taskbar, which cannot be changed in Windows as far as I know as it's always the same as the window title. Thomas -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple