comparison win/dw.c @ 102:372a7581b312

Minor changes to the container code on windows.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 16 Aug 2002 22:26:17 +0000
parents 636c37ca7238
children 2892fe8a023e
comparison
equal deleted inserted replaced
101:a5da1ac53b34 102:372a7581b312
5512 5512
5513 for(z=0;z<count;z++) 5513 for(z=0;z<count;z++)
5514 { 5514 {
5515 if(titles[z]) 5515 if(titles[z])
5516 { 5516 {
5517 lvc.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM /*| LVCF_FORMAT*/; 5517 lvc.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
5518 lvc.pszText = titles[z]; 5518 lvc.pszText = titles[z];
5519 lvc.cchTextMax = strlen(titles[z]); 5519 lvc.cchTextMax = strlen(titles[z]);
5520 lvc.fmt = flags[z]; 5520 lvc.fmt = flags[z];
5521 lvc.cx = 75; 5521 lvc.cx = 75;
5522 lvc.iSubItem = count; 5522 lvc.iSubItem = count;
5523 SendMessage(handle, LVM_INSERTCOLUMN, (WPARAM)z + l, (LPARAM)&lvc); 5523 SendMessage(handle, LVM_INSERTCOLUMN, (WPARAM)z + l, (LPARAM)&lvc);
5524 } 5524 }
5525 } 5525 }
5526 ListView_SetExtendedListViewStyle(handle, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); 5526 ListView_SetExtendedListViewStyle(handle, LVS_EX_FULLROWSELECT);
5527 return TRUE; 5527 return TRUE;
5528 } 5528 }
5529 5529
5530 /* 5530 /*
5531 * Sets up the filesystem columns, note: filesystem always has an icon/filename field. 5531 * Sets up the filesystem columns, note: filesystem always has an icon/filename field.
5973 { 5973 {
5974 ContainerInfo *cinfo = (ContainerInfo *)GetWindowLong(handle, GWL_USERDATA); 5974 ContainerInfo *cinfo = (ContainerInfo *)GetWindowLong(handle, GWL_USERDATA);
5975 ULONG *flags; 5975 ULONG *flags;
5976 LV_ITEM lvi; 5976 LV_ITEM lvi;
5977 5977
5978 if(cinfo && cinfo->columns > 0) 5978 if(cinfo && cinfo->columns == 1)
5979 {
5980 ListView_SetColumnWidth(handle, 0, LVSCW_AUTOSIZE);
5981 }
5982 else if(cinfo && cinfo->columns > 1)
5979 { 5983 {
5980 int z, index; 5984 int z, index;
5981 ULONG *flags = cinfo->flags, *columns = calloc(sizeof(ULONG), cinfo->columns); 5985 ULONG *flags = cinfo->flags, *columns = calloc(sizeof(ULONG), cinfo->columns);
5982 char *text = malloc(1024); 5986 char *text = malloc(1024);
5983 5987