Re: Win32Lib: TabItem icons (to Ad and Matt)

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

> From: Brian Broker

<snip>

> You know... I think I'm going to defer this demo to Matt
> Lewis, since he
> implemented ImageLists in Win32Lib.  I'd rather not reinvent
> the wheel on
> this one; and Matt could probably tell us both the best way
> to do this.  It
> seems to me that the image list routines are geared for
> specific controls
> (not including Tab controls), but I'm sure that some routines could be
> utilized to accomplish Tab icons.

> I guess I was hoping for more generalized routines (and/or
> more comments in
> the Win32Lib source to guide me) when I made my reply...
>
> If Matt can't help, then I'll take a stab at it when I have
> more time to
> study the latest Win32Lib source.

I don't really have time right now to get that all up, but let me explain
image lists in win32lib.  There are 5 different lists that are created by
win32lib automatically for different controls:

ILlarge
ILsmall
himlFTBDefault
himlFTBHot
himlFTBDisabled

The IL... lists and the himl... lists are for different purposes, but are an
attempt to 'standardize' the use of images in win32lib.  They can be used
for multiple controls.  For instance, ILlarge and small are used for
ListView, TreeView and ComboBoxEx.  The himl... lists are currently only
used for FlatToolBar buttons.

Basically, each control that uses images has different specifications.  For
the FlatToolBar, you provide handles to the control to three different
imagelists, and you assign a button the index of the images you're looking
for.  So the images need to have the same index in each list.  That's why
you have to supply 3 images to add to the image list when supplying these.

I'd suggest simply using either ILlarge or ILsmall (probably ILsmall for
default, but add an option to change to ILlarge if desired).  It *should* be
as simple as sending the TCM_SETIMAGELIST and sending the TCM_SETITEM
message with an appropriate TC_ITEM structure to change the images.

My goal was to be able to reuse the imagelists for other controls (and I
think it works :), but since some use different types of imagelists...

Let me know if you have any other questions.

Matt Lewis

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

Search



Quick Links

User menu

Not signed in.

Misc Menu