Problem loading an image resource in Managed C++ under .net 1.1.

K

Ken Varn

I have searched for this problem on the web. It seems to be asked often,
but I have not found a solution.

I have a managed C++ app. written using .NET Framework 1.1. The app.needs
to load an Image into a PictureBox on a Windows Form window. I used Visual
Studio 2003 to create the form and added the PictureBox to it. I then
assigned a JPEG image from a file to the PictureBox (VS 2003 embedded the
JPEG image into the resource resx file automatically). When my application
runs, I get an exception thrown at the time the code tries to load the image
with resources->GetObject(). The exception is a
MissingManifestResourceException and the message is "Could not find any
resources appropriate for the specified culture...". What do I need to do
to correct this problem?



--
---------------------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
MailID = varnk
Domain = diebold.com
---------------------------------------------
 
B

Ben Voigt [C++ MVP]

Ken said:
I have searched for this problem on the web. It seems to be asked
often, but I have not found a solution.

I have a managed C++ app. written using .NET Framework 1.1. The
app.needs to load an Image into a PictureBox on a Windows Form
window. I used Visual Studio 2003 to create the form and added the
PictureBox to it. I then assigned a JPEG image from a file to the
PictureBox (VS 2003 embedded the JPEG image into the resource resx
file automatically). When my application runs, I get an exception
thrown at the time the code tries to load the image with
resources->GetObject(). The exception is a
MissingManifestResourceException and the message is "Could not find
any resources appropriate for the specified culture...". What do I
need to do to correct this problem?

A good first start would be downloading VC++ 2008 Express Edition.

C++ support was totally broken in .NET 1.x. Microsoft did a lot of work to
make it better when hosted on .NET 2.0, but eventually trashed Managed
Extensions for C++ in favor of the new, reliable C++/CLI compiler which
debuted in Visual Studio 2005.
 

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

Top