Mercurial > dwindows
comparison win/dw.c @ 336:a2f72b5d5d0a
Minor change to dw_window_set_icon() on OS/2 and Windows.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 10 Apr 2003 12:05:36 +0000 |
parents | 0a15a1f3fbed |
children | e9a424e641ff |
comparison
equal
deleted
inserted
replaced
335:97029f1f29de | 336:a2f72b5d5d0a |
---|---|
4502 * handle: Handle to the window. | 4502 * handle: Handle to the window. |
4503 * id: An ID to be used to specify the icon. | 4503 * id: An ID to be used to specify the icon. |
4504 */ | 4504 */ |
4505 void API dw_window_set_icon(HWND handle, ULONG id) | 4505 void API dw_window_set_icon(HWND handle, ULONG id) |
4506 { | 4506 { |
4507 HICON hicon = LoadIcon(DWInstance, MAKEINTRESOURCE(id)); | 4507 HICON hicon = id < 65536 ? LoadIcon(DWInstance, MAKEINTRESOURCE(id)) : (HICON)id; |
4508 | 4508 |
4509 SendMessage(handle, WM_SETICON, | 4509 SendMessage(handle, WM_SETICON, |
4510 (WPARAM) IMAGE_ICON, | 4510 (WPARAM) IMAGE_ICON, |
4511 (LPARAM) hicon); | 4511 (LPARAM) hicon); |
4512 } | 4512 } |