Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

0 views
Skip to first unread message

bahnfire

unread,
Oct 30, 2008, 3:36:17 AM10/30/08
to
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!

Ian Collins

unread,
Oct 30, 2008, 4:30:32 AM10/30/08
to
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

unread,
Oct 30, 2008, 10:50:43 PM10/30/08
to

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

0 new messages