comparison win/dw.c @ 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 e4c5b03c7ce8
children 420c6c94abc7
comparison
equal deleted inserted replaced
582:ce08e7a56724 583:67dfd0cea50d
4923 if(icon) 4923 if(icon)
4924 { 4924 {
4925 SendMessage(handle, BM_SETIMAGE, 4925 SendMessage(handle, BM_SETIMAGE,
4926 (WPARAM) IMAGE_ICON, 4926 (WPARAM) IMAGE_ICON,
4927 (LPARAM) icon); 4927 (LPARAM) icon);
4928 SendMessage(handle, STM_SETIMAGE,
4929 (WPARAM) IMAGE_ICON,
4930 (LPARAM) icon);
4928 } 4931 }
4929 else if(hbitmap) 4932 else if(hbitmap)
4930 { 4933 {
4931 SendMessage(handle, BM_SETIMAGE, 4934 SendMessage(handle, BM_SETIMAGE,
4932 (WPARAM) IMAGE_BITMAP, 4935 (WPARAM) IMAGE_BITMAP,
4933 (LPARAM) hbitmap); 4936 (LPARAM) hbitmap);
4934 } 4937 SendMessage(handle, STM_SETIMAGE,
4935 4938 (WPARAM) IMAGE_BITMAP,
4936 if(oldbitmap) 4939 (LPARAM) hbitmap);
4940 }
4941
4942 if(hbitmap && oldbitmap)
4937 DeleteObject(oldbitmap); 4943 DeleteObject(oldbitmap);
4938 if(oldicon) 4944 else if(icon && oldicon)
4939 DeleteObject(oldicon); 4945 DeleteObject(oldicon);
4940 } 4946 }
4941 4947
4942 4948
4943 /* 4949 /*