comparison win/dw.c @ 1717:8228b3cf8f37

Same fix on Windows as I just committed on OS/2.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 08 May 2012 18:14:48 +0000
parents 873304f581be
children 47e322354293
comparison
equal deleted inserted replaced
1716:b39c137cc6f5 1717:8228b3cf8f37
6620 HICON icon=0; 6620 HICON icon=0;
6621 HICON oldicon = (HICON)SendMessage(handle, STM_GETIMAGE, IMAGE_ICON, 0); 6621 HICON oldicon = (HICON)SendMessage(handle, STM_GETIMAGE, IMAGE_ICON, 0);
6622 char *file; 6622 char *file;
6623 FILE *fp; 6623 FILE *fp;
6624 6624
6625 if ( id ) 6625 if (data)
6626 {
6627 hbitmap = LoadBitmap( DWInstance, MAKEINTRESOURCE(id) );
6628 icon = LoadImage( DWInstance, MAKEINTRESOURCE(id), IMAGE_ICON, 0, 0, LR_SHARED );
6629 }
6630 else if (data)
6631 { 6626 {
6632 file = _tempnam( _dw_alternate_temp_dir, "dw" ); 6627 file = _tempnam( _dw_alternate_temp_dir, "dw" );
6633 if ( file != NULL ) 6628 if ( file != NULL )
6634 { 6629 {
6635 fp = fopen( file, "wb" ); 6630 fp = fopen( file, "wb" );
6655 _unlink( file ); 6650 _unlink( file );
6656 free( file ); 6651 free( file );
6657 } 6652 }
6658 if (icon == 0 && hbitmap == 0) 6653 if (icon == 0 && hbitmap == 0)
6659 return; 6654 return;
6655 }
6656 else if ( id )
6657 {
6658 hbitmap = LoadBitmap( DWInstance, MAKEINTRESOURCE(id) );
6659 icon = LoadImage( DWInstance, MAKEINTRESOURCE(id), IMAGE_ICON, 0, 0, LR_SHARED );
6660 } 6660 }
6661 6661
6662 if ( icon ) 6662 if ( icon )
6663 { 6663 {
6664 SendMessage( handle, BM_SETIMAGE, 6664 SendMessage( handle, BM_SETIMAGE,