Re: More icon res in LV

new topic     » goto parent     » topic index » view thread      » older message » newer message

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>

> 
> 
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu