[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

VC++: Trying to change taskbar icons using notifyIcon1 and imageList1

bahnfire

10/30/2008 7:36:00 AM

Hi,

I am using Visual C++ Express 2008 and am trying to change the taskbar
icon that I am using (notifyIcon1) as some state changes (button
press, etc) in my form/app. I have read that I can use imageList1 and
have the following:

//
// notifyIcon1
//
this->notifyIcon1->Icon = (cli::safe_cast<System::Drawing::Icon^
>(resources->GetObject(L"notifyIcon1.Icon")));

this->notifyIcon1->Text = L"Right-click to access";
this->notifyIcon1->Visible = true;

//
// imageList1
//
this->imageList1->ImageStream =
(cli::safe_cast<System::Windows::Forms::ImageListStreamer^
>(resources->GetObject(L"imageList1.ImageStream")));

this->imageList1->TransparentColor =
System::Drawing::Color::Transparent;
this->imageList1->Images->SetKeyName(0, L"one.ico");
this->imageList1->Images->SetKeyName(1, L"two.ico");
this->imageList1->Images->SetKeyName(2, L"three.ico");
this->imageList1->Images->SetKeyName(3, L"g=four.ico");
this->imageList1->Images->SetKeyName(4, L"five.ico");

I have read that I am supposed to use the following 'notifyIcon1->Icon
= Icon->FromHandle();', but all of the examples that I have seen are
for VB and VC#.

I would appreciate any help.

Thanks!
2 Answers

Ian Collins

10/30/2008 8:31:00 AM

0

bahnfire wrote:
> Hi,
>
> I am using Visual C++ Express 2008 and am trying to change the taskbar
> icon

Then you should ask on a windows group rather than here.

--
Ian Collins

bahnfire

10/31/2008 2:51:00 AM

0

On Oct 30, 1:30 am, Ian Collins <ian-n...@hotmail.com> wrote:
> bahnfire wrote:
> > Hi,
>
> > I am using Visual C++ Express 2008 and am trying to change the taskbar
> > icon
>
> Then you should ask on a windows group rather than here.
>
> --
> Ian Collins

Thanks! Message posted on microsoft.public.dotnet.languages.vc.