Mercurial > dwindows
changeset 583:67dfd0cea50d
Fixed a slight regression in the unified icon bitmap code.
dw_window_set_bitmap() would only send the BM_SETIMAGE (button) message
so static controls would not be set. I now also send STM_SETIMAGE which
should be safe.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 20 May 2005 11:28:16 +0000 |
parents | ce08e7a56724 |
children | 420c6c94abc7 |
files | win/dw.c |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/win/dw.c Fri May 20 05:53:06 2005 +0000 +++ b/win/dw.c Fri May 20 11:28:16 2005 +0000 @@ -4925,17 +4925,23 @@ SendMessage(handle, BM_SETIMAGE, (WPARAM) IMAGE_ICON, (LPARAM) icon); + SendMessage(handle, STM_SETIMAGE, + (WPARAM) IMAGE_ICON, + (LPARAM) icon); } else if(hbitmap) { SendMessage(handle, BM_SETIMAGE, (WPARAM) IMAGE_BITMAP, (LPARAM) hbitmap); - } - - if(oldbitmap) + SendMessage(handle, STM_SETIMAGE, + (WPARAM) IMAGE_BITMAP, + (LPARAM) hbitmap); + } + + if(hbitmap && oldbitmap) DeleteObject(oldbitmap); - if(oldicon) + else if(icon && oldicon) DeleteObject(oldicon); }