This is the mail archive of the
mailing list for the Cygwin project.
Re: Can I change the windows icon from command line?
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 email@example.com:
A trivial little shell script I use for setting xterm title/icon via escape
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:
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,
hIconSm = (HICON)LoadImage(NULL, "menu_two.ico", IMAGE_ICON, 16, 16,
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 );
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:
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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple