Displaying icon in StatusBarPanel

  • Thread starter Thread starter kelvin.koogan
  • Start date Start date
K

kelvin.koogan

I want to dynamically change the icon displayed in a status bar panel.
I've created the icons in the resource file, app.rc, e.g. IDI_MYICON.
How can I load this icon and display it in the StatusBarPanel?

The auto-generated code does:

this->StatusBarPanel->Icon = (__try_cast<System::Drawing::Icon *
(resources->GetObject(S"StatusBarPanel.Icon")));

But this loads the icon from form1.resX and the icons I've defined
aren't in there.

TIA,
KK
 
I want to dynamically change the icon displayed in a status bar panel.
I've created the icons in the resource file, app.rc, e.g. IDI_MYICON.
How can I load this icon and display it in the StatusBarPanel?

The auto-generated code does:

this->StatusBarPanel->Icon = (__try_cast<System::Drawing::Icon *


But this loads the icon from form1.resX and the icons I've defined
aren't in there.

TIA,
KK

You can add the Icons into the Form1.Resx file manually in order to
access them through resources->GetObject.

Evan
 
You can add the Icons into the Form1.Resx file manually in order to
access them through resources->GetObject.

Evan

Sorry to be an idiot, but how do I add icons to Form1.resX manually?
Do you mean literally cutting and pasting with a text editor?

TIA,
KK
 
Back
Top