Hi, using Managed C++ (.Net 2.0), I want to embed some images within an
executable using a .resX file, and upon an event (in this case a combo
box changing), I want the picture box to update with a different one.
I tried the following code:
System::ComponentModel::ComponentResourceManager^ resources =
(gcnew
System::ComponentModel::ComponentResourceManager(f ormDebayer::typeid));
pictureDebayer->Image =
(cli::safe_cast<System::Drawing::Image^>(resources->GetObject(comboDebayer->Text)));
The combobox contains the same names as the image names in the resX
file.
It works when I put the images into the form's resX file, but not when
I make a separate resX file with the images inside (in this case,
pictures.resX). I would keep it in the form's resX file, but whenever I
change a control in the form, the images disappear from the resX file.
If anyone could let me know the proper way to do this, I would really
appreciate it.
Thanks,
Steve