1. More icon res in LV
- Posted by cafromsw at yahoo.com Jan 08, 2003
- 567 views
I have been doing more research into my icon resolution problem, mostly because I hate it when I don't understand something and can't figure it out. I have decided to inlcude a sample program and a screenshot of the output on my computers. I tried it on 5 WinME systems and a dual boot laptop with WinXP. Here is the code I used for the screenshot: ---------------------------- include win32lib.ew constant Win1 = createEx( Window, "LV Test", 0, Default, Default, 400, 300, 0, 0) constant LV1 = createEx( ListView, {"Column 1"}, Win1, 4, 10, 300, 100, or_all({LVS_REPORT,LVS_SHOWSELALWAYS}), 0) constant LV2 = createEx( ListView, {"Column 1"}, Win1, 4, 120, 300, 100, or_all({LVS_REPORT,LVS_SHOWSELALWAYS}), 0) object OK seq ic ic = {} seq sq sq = {} ic &= addIcon(extractIcon({"shell32.dll",1})) -- disks04.ico is from win32lib\demo it contains, in order, a 32x32 icon and a 16x16 icon -- place in same directory as lv_test.exw ic &= addIcon(extractIcon("disks04.ico")) --ic &= addIcon(extractIcon({"disks04.ico", 1})) -- appears to be same as above --ic &= addIcon(extractIcon({"disks04.ico", 2})) -- does not work -- disks04a.ico is just the 16x16 icon taken from the above file -- place in same directory as lv_test.exw ic &= addIcon(extractIcon("disks04a.ico")) for i = 1 to 3 do OK = addLVItem(LV1, ic[i], "test line" & sprint(i)) sq = append(sq, {"test line" & sprint(i)}) end for loadLVInfo(LV2, sq) WinMain(Win1, Normal) here is a link to the screen shot http://home.attbi.com/~sea.star/pics/scr1.jpg and here are the to icon files to make it easier for anyone wishing to experiement http://home.attbi.com/~sea.star/pics/DISKS04.ICO http://home.attbi.com/~sea.star/pics/DISKS04a.ico To the left is my test program with ListViews and to the right is an Explorer set to View-Details. Test line 1 is the icon pulled from shell32.dll and should match lv_test.exw.zzz (is it possible that there is a 32x32 and 16x16 pair in shell32.dll and I am getting the first of the pair?) It also looks like the fist pixel line isn't being drawn. Test line 2 in the icon pulled with ic &= addIcon(extractIcon("disks04.ico")) and should match either of the .ICO files. Again it looks like I am getting the first of a 32x32 and 16x16 pair. This also looks like the first line isn't being drawn. Test line 3 was pulled from an .ICO file with just a 16x16 icon in it. It now looks like the 16x16 icon but still appears 'out of focus' as if it is being masked slightly or maybe drawn over itself but offset by one pixel. Does anyone else get these or similar results with ListViews? Am I one the right track in thinking that it is an extractIcon or imageList kind of problem. Thanks again, sorry for the long post. Chris cafromsw at yahoo.com
2. Re: More icon res in LV
- Posted by jordah at btopenworld.com Jan 09, 2003
- 523 views
hi all, The image lists were designed to hold images of same dimensions ie if u made an image list of 16 X 16 all images larger will be cropped and those smaller will appear "as-is". Also the imagelist functions require a handle because their need to make one large bitmap(memory/compatible) that contains all the images. Using Stretchblt alone,is no use because it actually creates another memory bitmap that is identical to original but stretched using specified raster operations. The only possible way known to me at the moment is using the output memory bitmap in the output DC from stretchblt(). so use GetObjects() to obtain the handle of the bitmap from the outputDC. Then use that handle. I hope i make some sense. Jordah ferguson ----- Original Message ----- From: "Jonas Temple" <jktemple at yhti.net> To: "EUforum" <EUforum at topica.com> Sent: Wednesday, January 08, 2003 9:49 PM Subject: RE: More icon res in LV > > I ran into this when I worked on my xpm icon library (available in > Recent Contributions). What I found was that when you add an icon to an > image list for displaying in a list view if the image is larger/smaller > than 16x16 (assuming report view) then this somehow messed up the images > in the image list. I created my list view with ICON style and then used > stretchBlt to ensure the image was 32x32. > > I thought this took care of the problem and then recently found out this > trick worked on Win2K but didn't work on Win98. :( Back to the drawing > board. > > Unless anyone else has any wisdom on this, I would suggest making sure > that all icons you add to the image list for a list view are 16x16. If > I remember correctly the image you were referencing in shell32.dll is > larger than 16x16. > > Jonas > cafromsw at yahoo.com wrote: > > I have been doing more research into my icon > > resolution problem, mostly because I hate it when I > > don't understand something and can't figure it out. I > > have decided to inlcude a sample program and a > > screenshot of the output on my computers. I tried it > > on 5 WinME systems and a dual boot laptop with WinXP. > > Here is the code I used for the screenshot: > > > > ---------------------------- > > include win32lib.ew > > > > constant Win1 = createEx( Window, "LV Test", 0, > > Default, Default, 400, 300, 0, 0) > > > > constant LV1 = createEx( ListView, {"Column 1"}, Win1, > > 4, 10, 300, 100, > > > > or_all({LVS_REPORT,LVS_SHOWSELALWAYS}), 0) > > > > constant LV2 = createEx( ListView, {"Column 1"}, Win1, > > 4, 120, 300, 100, > > > > or_all({LVS_REPORT,LVS_SHOWSELALWAYS}), 0) > > > > object OK > > seq ic ic = {} > > seq sq sq = {} > > > > ic &= addIcon(extractIcon({"shell32.dll",1})) > > > > -- disks04.ico is from win32lib\demo it contains, in > > order, a 32x32 icon and a 16x16 icon > > -- place in same directory as lv_test.exw > > ic &= addIcon(extractIcon("disks04.ico")) > > --ic &= addIcon(extractIcon({"disks04.ico", 1})) -- > > appears to be same as above > > --ic &= addIcon(extractIcon({"disks04.ico", 2})) -- > > does not work > > > > -- disks04a.ico is just the 16x16 icon taken from the > > above file > > -- place in same directory as lv_test.exw > > ic &= addIcon(extractIcon("disks04a.ico")) > > > > for i = 1 to 3 do > > OK = addLVItem(LV1, ic[i], "test line" & sprint(i)) > > sq = append(sq, {"test line" & sprint(i)}) > > end for > > > > loadLVInfo(LV2, sq) > > > > WinMain(Win1, Normal) > > > > here is a link to the screen shot > > http://home.attbi.com/~sea.star/pics/scr1.jpg > > and here are the to icon files to make it easier for > > anyone wishing to experiement > > http://home.attbi.com/~sea.star/pics/DISKS04.ICO > > http://home.attbi.com/~sea.star/pics/DISKS04a.ico > > > > To the left is my test program with ListViews and to > > the right is an Explorer set to View-Details. > > > > Test line 1 is the icon pulled from shell32.dll and > > should match lv_test.exw.zzz (is it possible that > > there is a 32x32 and 16x16 pair in shell32.dll and I > > am getting the first of the pair?) It also looks like > > the fist pixel line isn't being drawn. > > > > Test line 2 in the icon pulled with > > ic &= addIcon(extractIcon("disks04.ico")) > > and should match either of the .ICO files. Again it > > looks like I am getting the first of a 32x32 and 16x16 > > pair. This also looks like the first line isn't being > > drawn. > > > > Test line 3 was pulled from an .ICO file with just a > > 16x16 icon in it. It now looks like the 16x16 icon > > but still appears 'out of focus' as if it is being > > masked slightly or maybe drawn over itself but offset > > by one pixel. > > <snip> > >
3. Re: More icon res in LV
- Posted by cafromsw at yahoo.com Jan 09, 2003
- 542 views
Thanks for the feedback. I still can't tell if I am the only one with this problem, or if I am using win32lib incorrectly. I was hoping to hear from someone involved in the project to find out. If Windows can display a 32x32 icon properly in an LVS_REPORT ListView it seems reasonable that I should be able to as well. I will see if I can figure out how to use stretchBlt() to reduce it to a 16x16 icon. Sorry about the mangled code below but Yahoo mail didn't take the paste properly. Chris cafromsw at yahoo.com --- jordah at btopenworld.com wrote: > > hi all, > The image lists were designed to hold images of > same dimensions ie if u > made an image list of 16 X 16 all images larger will > be cropped and those > smaller will appear "as-is". Also the imagelist > functions require a handle > because their need to make one large > bitmap(memory/compatible) that contains > all the images. Using Stretchblt alone,is no use > because it actually creates > another memory bitmap that is identical to original > but stretched using > specified raster operations. The only possible way > known to me at the moment > is using the output memory bitmap in the output DC > from stretchblt(). so use > GetObjects() to obtain the handle of the bitmap from > the outputDC. Then use > that handle. I hope i make some sense. > > Jordah ferguson > > ----- Original Message ----- > From: "Jonas Temple" <jktemple at yhti.net> > To: "EUforum" <EUforum at topica.com> > Sent: Wednesday, January 08, 2003 9:49 PM > Subject: RE: More icon res in LV > > > > I ran into this when I worked on my xpm icon > library (available in > > Recent Contributions). What I found was that when > you add an icon to an > > image list for displaying in a list view if the > image is larger/smaller > > than 16x16 (assuming report view) then this > somehow messed up the images > > in the image list. I created my list view with > ICON style and then used > > stretchBlt to ensure the image was 32x32. > > > > I thought this took care of the problem and then > recently found out this > > trick worked on Win2K but didn't work on Win98. > :( Back to the drawing > > board. > > > > Unless anyone else has any wisdom on this, I would > suggest making sure > > that all icons you add to the image list for a > list view are 16x16. If > > I remember correctly the image you were > referencing in shell32.dll is > > larger than 16x16. > > > > Jonas > > cafromsw at yahoo.com wrote: > > > I have been doing more research into my icon > > > resolution problem, mostly because I hate it > when I > > > don't understand something and can't figure it > out. I > > > have decided to inlcude a sample program and a > > > screenshot of the output on my computers. I > tried it > > > on 5 WinME systems and a dual boot laptop with > WinXP. > > > Here is the code I used for the screenshot: > > > > > > ---------------------------- > > > include win32lib.ew > > > > > > constant Win1 = createEx( Window, "LV Test", 0, > > > Default, Default, 400, 300, 0, 0) > > > > > > constant LV1 = createEx( ListView, {"Column 1"}, > Win1, > > > 4, 10, 300, 100, > > > > > > or_all({LVS_REPORT,LVS_SHOWSELALWAYS}), 0) > > > > > > constant LV2 = createEx( ListView, {"Column 1"}, > Win1, > > > 4, 120, 300, 100, > > > > > > or_all({LVS_REPORT,LVS_SHOWSELALWAYS}), 0) > > > > > > object OK > > > seq ic ic = {} > > > seq sq sq = {} > > > > > > ic &= addIcon(extractIcon({"shell32.dll",1})) > > > > > > -- disks04.ico is from win32lib\demo it > contains, in > > > order, a 32x32 icon and a 16x16 icon > > > -- place in same directory as lv_test.exw > > > ic &= addIcon(extractIcon("disks04.ico")) <snip> > > > >
4. Re: More icon res in LV
- Posted by jordah at btopenworld.com Jan 09, 2003
- 492 views
----- Original Message ----- From: <cafromsw at yahoo.com> To: "EUforum" <EUforum at topica.com> Subject: Re: More icon res in LV > > Thanks for the feedback. I still can't tell if I am > the only one with this problem, or if I am using > win32lib incorrectly. I was hoping to hear from > someone involved in the project to find out. U don't have to be a win32lib programmer to understand how things work in win32lib moreso windows! > If > Windows can display a 32x32 icon properly in an > LVS_REPORT ListView it seems reasonable that I should > be able to as well. I will see if I can figure out > how to use stretchBlt() to reduce it to a 16x16 icon. > Sorry about the mangled code below but Yahoo mail > didn't take the paste properly. Chris it all depends at times on the number of colors an icon or image has. if a high quality image ie having 256 or more colors is reduced to 16 X 16. there is bound to be some color loss. Try using an icon editor and try converting a 32X32(16bit) icon to 16 X 16 and u'll see what i mean. this is not windows fault. it all boils down to resolution. there is no way u will shrink an icon by half and expect same quality. it will have to lose have the color data. eg 32 X 32 displayed as 16 X 16. will cause loss, what about the other colours of the 16 pixels. thuink about it. Jordah > cafromsw at yahoo.com > > --- jordah at btopenworld.com wrote: > > > > hi all, > > The image lists were designed to hold images of > > same dimensions ie if u > > made an image list of 16 X 16 all images larger will > > be cropped and those > > smaller will appear "as-is". Also the imagelist > > functions require a handle > > because their need to make one large > > bitmap(memory/compatible) that contains > > all the images. Using Stretchblt alone,is no use > > because it actually creates > > another memory bitmap that is identical to original > > but stretched using > > specified raster operations. The only possible way > > known to me at the moment > > is using the output memory bitmap in the output DC > > from stretchblt(). so use > > GetObjects() to obtain the handle of the bitmap from > > the outputDC. Then use > > that handle. I hope i make some sense. > > > > Jordah ferguson > > > > ----- Original Message ----- > > From: "Jonas Temple" <jktemple at yhti.net> > > To: "EUforum" <EUforum at topica.com> > > Sent: Wednesday, January 08, 2003 9:49 PM > > Subject: RE: More icon res in LV > > > > > > > I ran into this when I worked on my xpm icon > > library (available in > > > Recent Contributions). What I found was that when > > you add an icon to an > > > image list for displaying in a list view if the > > image is larger/smaller > > > than 16x16 (assuming report view) then this > > somehow messed up the images > > > in the image list. I created my list view with > > ICON style and then used > > > stretchBlt to ensure the image was 32x32. > > > > > > I thought this took care of the problem and then > > recently found out this > > > trick worked on Win2K but didn't work on Win98. > > :( Back to the drawing > > > board. > > > > > > Unless anyone else has any wisdom on this, I would > > suggest making sure > > > that all icons you add to the image list for a > > list view are 16x16. If > > > I remember correctly the image you were > > referencing in shell32.dll is > > > larger than 16x16. > > > > > > Jonas > > > cafromsw at yahoo.com wrote: > > > > I have been doing more research into my icon > > > > resolution problem, mostly because I hate it > > when I > > > > don't understand something and can't figure it > > out. I > > > > have decided to inlcude a sample program and a > > > > screenshot of the output on my computers. I > > tried it > > > > on 5 WinME systems and a dual boot laptop with > > WinXP. > > > > Here is the code I used for the screenshot: > > > > > > > > ---------------------------- > > > > include win32lib.ew > > > > > > > > constant Win1 = createEx( Window, "LV Test", 0, > > > > Default, Default, 400, 300, 0, 0) > > > > > > > > constant LV1 = createEx( ListView, {"Column 1"}, > > Win1, > > > > 4, 10, 300, 100, > > > > > > > > or_all({LVS_REPORT,LVS_SHOWSELALWAYS}), 0) > > > > > > > > constant LV2 = createEx( ListView, {"Column 1"}, > > Win1, > > > > 4, 120, 300, 100, > > > > > > > > or_all({LVS_REPORT,LVS_SHOWSELALWAYS}), 0) > > > > > > > > object OK > > > > seq ic ic = {} > > > > seq sq sq = {} > > > > > > > > ic &= addIcon(extractIcon({"shell32.dll",1})) > > > > > > > > -- disks04.ico is from win32lib\demo it > > contains, in <snip> > >
5. Re: More icon res in LV
- Posted by cafromsw at yahoo.com Jan 09, 2003
- 508 views
I may have confused the issue somewhere along the way, if so I am sorry. I am trying to make a window that looks like a Win9x Explorer window in 'view detail' mode. I am assuming (possible incorrectly) that Windows gets it's icons from shell32.dll, that's why I was using those icons. I thought that all of the Windows 'default' icons are kept there. When Windows displays the icons they look correct. When I display them in my app they look wrong. That's why a put a screenshot on my website, to see if other people get the same results. So I am thinking that either Windows gets it's 16x16 icons from somewhere else or it manipulates the 32x32 in some way that win32lib doesn't. Chris cafromsw at yahoo.com --- jordah at btopenworld.com wrote: > > > ----- Original Message ----- > From: <cafromsw at yahoo.com> > To: "EUforum" <EUforum at topica.com> > Sent: Thursday, January 09, 2003 6:51 PM > Subject: Re: More icon res in LV > > > > Thanks for the feedback. I still can't tell if I > am > > the only one with this problem, or if I am using > > win32lib incorrectly. I was hoping to hear from > > someone involved in the project to find out. > > U don't have to be a win32lib programmer to > understand how things work in > win32lib moreso windows! > > > If > > Windows can display a 32x32 icon properly in an > > LVS_REPORT ListView it seems reasonable that I > should > > be able to as well. I will see if I can figure > out > > how to use stretchBlt() to reduce it to a 16x16 > icon. > > Sorry about the mangled code below but Yahoo mail > > didn't take the paste properly. Chris > > it all depends at times on the number of colors an > icon or image has. if a > high quality image ie having 256 or more colors is > reduced to 16 X 16. there > is bound to be some color loss. Try using an icon > editor and try converting > a 32X32(16bit) icon to 16 X 16 and u'll see what i > mean. this is not windows > fault. it all boils down to resolution. there is no > way u will shrink an > icon by half and expect same quality. it will have > to lose have the color > data. eg 32 X 32 displayed as 16 X 16. will cause > loss, what about the other > colours of the 16 pixels. thuink about it. > > Jordah > > cafromsw at yahoo.com > > > > --- jordah at btopenworld.com wrote: > > > > > > hi all, > > > The image lists were designed to hold images > of > > > same dimensions ie if u > > > made an image list of 16 X 16 all images larger > will > > > be cropped and those > > > smaller will appear "as-is". Also the imagelist > > > functions require a handle > > > because their need to make one large > > > bitmap(memory/compatible) that contains > > > all the images. Using Stretchblt alone,is no use > > > because it actually creates > > > another memory bitmap that is identical to > original > > > but stretched using > > > specified raster operations. The only possible > way > > > known to me at the moment > > > is using the output memory bitmap in the output > DC > > > from stretchblt(). so use > > > GetObjects() to obtain the handle of the bitmap > from > > > the outputDC. Then use > > > that handle. I hope i make some sense. > > > > > > Jordah ferguson > > > > > > ----- Original Message ----- > > > From: "Jonas Temple" <jktemple at yhti.net> > > > To: "EUforum" <EUforum at topica.com> > > > Sent: Wednesday, January 08, 2003 9:49 PM > > > Subject: RE: More icon res in LV > > > > > > > > > > I ran into this when I worked on my xpm icon > > > library (available in > > > > Recent Contributions). What I found was that > when > > > you add an icon to an > > > > image list for displaying in a list view if > the > > > image is larger/smaller > > > > than 16x16 (assuming report view) then this > > > somehow messed up the images > > > > in the image list. I created my list view > with > > > ICON style and then used <snip> > > > >
6. Re: More icon res in LV
- Posted by jordah at btopenworld.com Jan 09, 2003
- 492 views
hi Chris, I think i now get what u are saying. Give me a link to ur website. Jordah ----- Original Message ----- From: <cafromsw at yahoo.com> To: "EUforum" <EUforum at topica.com> Subject: Re: More icon res in LV > > I may have confused the issue somewhere along the way, > if so I am sorry. I am trying to make a window that > looks like a Win9x Explorer window in 'view detail' > mode. I am assuming (possible incorrectly) that > Windows gets it's icons from shell32.dll, that's why I > was using those icons. I thought that all of the > Windows 'default' icons are kept there. When Windows > displays the icons they look correct. When I display > them in my app they look wrong. That's why a put a > screenshot on my website, to see if other people get > the same results. So I am thinking that either > Windows gets it's 16x16 icons from somewhere else or > it manipulates the 32x32 in some way that win32lib > doesn't. Chris cafromsw at yahoo.com > > --- jordah at btopenworld.com wrote: > > > > > > ----- Original Message ----- > > From: <cafromsw at yahoo.com> > > To: "EUforum" <EUforum at topica.com> > > Sent: Thursday, January 09, 2003 6:51 PM > > Subject: Re: More icon res in LV > > > > > > > Thanks for the feedback. I still can't tell if I > > am > > > the only one with this problem, or if I am using > > > win32lib incorrectly. I was hoping to hear from > > > someone involved in the project to find out. > > > > U don't have to be a win32lib programmer to > > understand how things work in > > win32lib moreso windows! > > > > > If > > > Windows can display a 32x32 icon properly in an > > > LVS_REPORT ListView it seems reasonable that I > > should > > > be able to as well. I will see if I can figure > > out > > > how to use stretchBlt() to reduce it to a 16x16 > > icon. > > > Sorry about the mangled code below but Yahoo mail > > > didn't take the paste properly. Chris > > > > it all depends at times on the number of colors an > > icon or image has. if a > > high quality image ie having 256 or more colors is > > reduced to 16 X 16. there > > is bound to be some color loss. Try using an icon > > editor and try converting > > a 32X32(16bit) icon to 16 X 16 and u'll see what i > > mean. this is not windows > > fault. it all boils down to resolution. there is no > > way u will shrink an > > icon by half and expect same quality. it will have > > to lose have the color > > data. eg 32 X 32 displayed as 16 X 16. will cause > > loss, what about the other > > colours of the 16 pixels. thuink about it. > > > > Jordah > > > cafromsw at yahoo.com > > > > > > --- jordah at btopenworld.com wrote: > > > > > > > > hi all, > > > > The image lists were designed to hold images > > of > > > > same dimensions ie if u > > > > made an image list of 16 X 16 all images larger > > will > > > > be cropped and those > > > > smaller will appear "as-is". Also the imagelist > > > > functions require a handle > > > > because their need to make one large > > > > bitmap(memory/compatible) that contains > > > > all the images. Using Stretchblt alone,is no use > > > > because it actually creates > > > > another memory bitmap that is identical to > > original > > > > but stretched using > > > > specified raster operations. The only possible > > way > > > > known to me at the moment > > > > is using the output memory bitmap in the output > > DC > > > > from stretchblt(). so use > > > > GetObjects() to obtain the handle of the bitmap > > from > > > > the outputDC. Then use > > > > that handle. I hope i make some sense. > > > > > > > > Jordah ferguson > > > > > > > > ----- Original Message ----- > > > > From: "Jonas Temple" <jktemple at yhti.net> > > > > To: "EUforum" <EUforum at topica.com> > > > > Sent: Wednesday, January 08, 2003 9:49 PM <snip> > >
7. Re: More icon res in LV
- Posted by Bernie Ryan <xotron at bluefrognet.net> Jan 09, 2003
- 482 views
A window's icon should contain a 16x16, 32x32 and 48x48. This icon can also contain these 3 icons in in different pallete sizes ( 9 possible combinations. When windows displays an icon it selects the appropriate icon to display OR it tries to select, adjust the icon size to fit and use the nearest pallet size that is available. Bernie
8. Re: More icon res in LV
- Posted by cafromsw at yahoo.com Jan 10, 2003
- 521 views
Here's the link from my original post. The .jpg is just click and view, the .ico's are rightclick-save-rename. I can U/L the code again as well if needed but it's pretty bare bones just enough to get the ListView up and running. http://home.attbi.com/~sea.star/pics/scr1.jpg http://home.attbi.com/~sea.star/pics/DISKS04.ICO http://home.attbi.com/~sea.star/pics/DISKS04a.ico Chris cafromsw at yahoo.com --- jordah at btopenworld.com wrote: > > hi Chris, > I think i now get what u are saying. > Give me a link to ur website. > > Jordah > ----- Original Message ----- > From: <cafromsw at yahoo.com> > To: "EUforum" <EUforum at topica.com> > Sent: Thursday, January 09, 2003 9:48 PM > Subject: Re: More icon res in LV > > > > I may have confused the issue somewhere along the > way, > > if so I am sorry. I am trying to make a window > that > > looks like a Win9x Explorer window in 'view > detail' > > mode. I am assuming (possible incorrectly) that > > Windows gets it's icons from shell32.dll, that's > why I > > was using those icons. I thought that all of the > > Windows 'default' icons are kept there. When > Windows > > displays the icons they look correct. When I > display > > them in my app they look wrong. That's why a put > a > > screenshot on my website, to see if other people > get > > the same results. So I am thinking that either > > Windows gets it's 16x16 icons from somewhere else > or > > it manipulates the 32x32 in some way that win32lib > > doesn't. Chris cafromsw at yahoo.com
9. Re: More icon res in LV
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jan 10, 2003
- 527 views
Chris, When I run your program under Win98 1st ed., I seem to get similar results, except I get the Windows flag instead of a picture of a window in the icon. Sent a pic in .doc of what I got direct to you. Dan Moyer ----- Original Message ----- From: <cafromsw at yahoo.com> To: "EUforum" <EUforum at topica.com> Subject: More icon res in LV > > I have been doing more research into my icon > resolution problem, mostly because I hate it when I > don't understand something and can't figure it out. I > have decided to inlcude a sample program and a > screenshot of the output on my computers. I tried it > on 5 WinME systems and a dual boot laptop with WinXP. > Here is the code I used for the screenshot: > > ---------------------------- > include win32lib.ew > > constant Win1 = createEx( Window, "LV Test", 0, > Default, Default, 400, 300, 0, 0) > > constant LV1 = createEx( ListView, {"Column 1"}, Win1, > 4, 10, 300, 100, > > or_all({LVS_REPORT,LVS_SHOWSELALWAYS}), 0) > > constant LV2 = createEx( ListView, {"Column 1"}, Win1, > 4, 120, 300, 100, > > or_all({LVS_REPORT,LVS_SHOWSELALWAYS}), 0) > > object OK > seq ic ic = {} > seq sq sq = {} > > ic &= addIcon(extractIcon({"shell32.dll",1})) > > -- disks04.ico is from win32lib\demo it contains, in > order, a 32x32 icon and a 16x16 icon > -- place in same directory as lv_test.exw > ic &= addIcon(extractIcon("disks04.ico")) > --ic &= addIcon(extractIcon({"disks04.ico", 1})) -- > appears to be same as above > --ic &= addIcon(extractIcon({"disks04.ico", 2})) -- > does not work > > -- disks04a.ico is just the 16x16 icon taken from the > above file > -- place in same directory as lv_test.exw > ic &= addIcon(extractIcon("disks04a.ico")) > > for i = 1 to 3 do > OK = addLVItem(LV1, ic[i], "test line" & sprint(i)) > sq = append(sq, {"test line" & sprint(i)}) > end for > > loadLVInfo(LV2, sq) > > WinMain(Win1, Normal) > > here is a link to the screen shot > http://home.attbi.com/~sea.star/pics/scr1.jpg > and here are the to icon files to make it easier for > anyone wishing to experiement > http://home.attbi.com/~sea.star/pics/DISKS04.ICO > http://home.attbi.com/~sea.star/pics/DISKS04a.ico > > To the left is my test program with ListViews and to > the right is an Explorer set to View-Details. > > Test line 1 is the icon pulled from shell32.dll and > should match lv_test.exw.zzz (is it possible that > there is a 32x32 and 16x16 pair in shell32.dll and I > am getting the first of the pair?) It also looks like > the fist pixel line isn't being drawn. > > Test line 2 in the icon pulled with > ic &= addIcon(extractIcon("disks04.ico")) > and should match either of the .ICO files. Again it > looks like I am getting the first of a 32x32 and 16x16 > pair. This also looks like the first line isn't being > drawn. > > Test line 3 was pulled from an .ICO file with just a > 16x16 icon in it. It now looks like the 16x16 icon > but still appears 'out of focus' as if it is being > masked slightly or maybe drawn over itself but offset > by one pixel. > > Does anyone else get these or similar results with > ListViews? Am I one the right track in thinking that > it is an extractIcon or imageList kind of problem. > > Thanks again, sorry for the long post. Chris > cafromsw at yahoo.com > > > > TOPICA - Start your own email discussion group. FREE! >