[program-l] Re: MMC, tree view icons.

  • From: Nick Adamson <Nick.Adamson@xxxxxxxxxxxxxxxxxxxxxx>
  • To: "'program-l@xxxxxxxxxxxxx'" <program-l@xxxxxxxxxxxxx>
  • Date: Tue, 10 Jan 2006 08:57:04 -0000

Hi Will.

I've got it solved now.

That's exactly how I do it for all the icons that are in the results pain
and all the nodes in the content pain apart from the static one.

it looks like the static one is a bit of a special case and you have to
provide a different set of icons for it and you load these in in your
implementation of the IAbout class for some apparent reason.

This is because the LoadImageList function call is done once you select the
plug in and the image is displayed before then.

It does make some sort of sense to do it this way however I'm still confused
about why it's in the IAbout implementation rather than one of the others.

Thanks for all the ideas and help on this one will.
Cheers.
Nick.



-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx
[mailto:program-l-bounce@xxxxxxxxxxxxx]On Behalf Of Will Pearson
Sent: 09 January 2006 18:45
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: MMC, tree view icons.


Hi Nick,

You should be able to add icons using IImageList::ImageListSetIcon, to add a

single icon, and IImageList::ImageListSetStrip, to ad multiple icons.  If 
the index you specify to be associated with the icon is currently being used

it will be overwritten with the new icon.  To get the IImageList interface, 
call IConsole2::QueryScopeImageList.

Will
----- Original Message ----- 
From: "Nick Adamson" <Nick.Adamson@xxxxxxxxxxxxxxxxxxxxxx>
To: <program-l@xxxxxxxxxxxxx>
Sent: Monday, January 09, 2006 9:20 AM
Subject: [program-l] Re: MMC, tree view icons.


> Hi Will.
>
> Thanks again for getting back to me.
>
> I'm loading the image in the normal way in the resource script. I think 
> the
> problem is in where I pass the image array back to MMC. As far as I
> understand it you can only pass 1 image array back to MMC and then you
> reference any of the different images in that array when MMC calls the
> GetBitmapIndex function or what ever it's called, I don't have the code in
> front of me at the moment but his is how it's working for all the other
> images I've got.
>
> I'm going to take a look in to how the MMC samples do it, maybe there's a
> way of adding images from a second file to the bitmap list, if that 
> doesn't
> work I'm going to end up putting the icon I want at the end of my bitmap
> file which should work.
>
> Any more ideas?
> Cheers.
> Nick.
>
>
> -----Original Message-----
> From: program-l-bounce@xxxxxxxxxxxxx
> [mailto:program-l-bounce@xxxxxxxxxxxxx]On Behalf Of Will Pearson
> Sent: 09 January 2006 09:05
> To: program-l@xxxxxxxxxxxxx
> Subject: [program-l] Re: MMC, tree view icons.
>
>
> Hi Nick,
>
> I would think there's a mismatch between the virtual index of the 
> imagelist
> where the icon image has been stored and the virtual index that the 
> results
> pane item is trying to use.
>
> How are you inserting the item into the results pane?
>
> Will
> ----- Original Message ----- 
> From: "Nick Adamson" <Nick.Adamson@xxxxxxxxxxxxxxxxxxxxxx>
> To: <program-l@xxxxxxxxxxxxx>
> Sent: Friday, January 06, 2006 3:53 PM
> Subject: [program-l] MMC, tree view icons.
>
>
>> Hi All.
>>
>> I'm working on an MMC plug in and I've pretty much got most of the
>> problems
>> licked however I've been asked to use a specific icon for the top node of
>> the tree. I've been given the icon file but can't seem to get the snap-in
>> to
>> use it.
>>
>> the first item in the list view is console root. When this is selected 
>> the
>> name of my utility is in the results pain on the right. it's next to my
>> application name where I want to have the icon.
>>
>> On all the other nodes we've got the icons coming from 1 set of bitmaps
>> which I've got working with out any problems.
>>
>> Any ideas?
>> Cheers.
>> Nick.
>>
>>
>>
>>
>> Nick Adamson
>> Software Engineer
>> General Dynamics UK LTD
>>
>> Email: nick.adamson@xxxxxxxxxxxxxxxxxxxxxx
>> Tel: 01495 236467
>> http://www.generaldynamics.uk.com
>>
>> This email and any files attached are intended for the addressee and may
>> contain information of a confidential nature.  If you are not the 
>> intended
>> recipient, be aware that this email was sent to you in error and you
>> should
>> not disclose, distribute, print, copy or make other use of this email or
>> its
>> attachments.  Such actions, in fact, may be unlawful.  In compliance with
>> the various Regulations and Acts, General Dynamics UK Limited reserves 
>> the
>> right to monitor (and examine for viruses) all emails and email
>> attachments,
>> both inbound and outbound.  Email communications and their attachments 
>> may
>> not be secure or error- or virus-free and the company does not accept
>> liability or responsibility for such matters or the consequences thereof.
>> Registered Office: 100 New Bridge Street, London EC4V 6JA.  Registered in
>> England and Wales No: 1911653.
>> ** To leave the list, click on the immediately-following link:-
>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
>> ** If this link doesn't work then send a message to:
>> ** program-l-request@xxxxxxxxxxxxx
>> ** and in the Subject line type
>> ** unsubscribe
>> ** For other list commands such as vacation mode, click on the
>> ** immediately-following link:-
>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
>> ** or send a message, to
>> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
>>
>
> ** To leave the list, click on the immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
> ** If this link doesn't work then send a message to:
> ** program-l-request@xxxxxxxxxxxxx
> ** and in the Subject line type
> ** unsubscribe
> ** For other list commands such as vacation mode, click on the
> ** immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
> ** or send a message, to
> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
> This email and any files attached are intended for the addressee and may
> contain information of a confidential nature.  If you are not the intended
> recipient, be aware that this email was sent to you in error and you 
> should
> not disclose, distribute, print, copy or make other use of this email or 
> its
> attachments.  Such actions, in fact, may be unlawful.  In compliance with
> the various Regulations and Acts, General Dynamics UK Limited reserves the
> right to monitor (and examine for viruses) all emails and email 
> attachments,
> both inbound and outbound.  Email communications and their attachments may
> not be secure or error- or virus-free and the company does not accept
> liability or responsibility for such matters or the consequences thereof.
> Registered Office: 100 New Bridge Street, London EC4V 6JA.  Registered in
> England and Wales No: 1911653.
> ** To leave the list, click on the immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
> ** If this link doesn't work then send a message to:
> ** program-l-request@xxxxxxxxxxxxx
> ** and in the Subject line type
> ** unsubscribe
> ** For other list commands such as vacation mode, click on the
> ** immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
> ** or send a message, to
> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
> 

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
This email and any files attached are intended for the addressee and may
contain information of a confidential nature.  If you are not the intended
recipient, be aware that this email was sent to you in error and you should
not disclose, distribute, print, copy or make other use of this email or its
attachments.  Such actions, in fact, may be unlawful.  In compliance with
the various Regulations and Acts, General Dynamics UK Limited reserves the
right to monitor (and examine for viruses) all emails and email attachments,
both inbound and outbound.  Email communications and their attachments may
not be secure or error- or virus-free and the company does not accept
liability or responsibility for such matters or the consequences thereof.
Registered Office: 100 New Bridge Street, London EC4V 6JA.  Registered in
England and Wales No: 1911653.
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: