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

B

bahnfire

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!
 
I

Ian Collins

bahnfire said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top