"pictureBox" Bild laden

Thorben

Grünschnabel
Hi,
ich schreibe grad ein Programm mit VS, C++ Windows Anwendung,
und ich möchte in meine Form ein Bild einfügen, dass nach meiner Meinung am logischsten mit einer "pictureBox" geht.
Nun habe ich die pictureBox eingefügt, habe ein Bild in sie geladen, welches auch angezeigt wird, nur beim kompilieren kommt der Fehler:
pictureBox1->Image <Nicht definierter Wert>

So sieht die pictureBox aus:
Code:
			this->pictureBox1->Image = (__try_cast<System::Drawing::Image *  >(resources->GetObject(S"pictureBox1.Image")));
			this->pictureBox1->Location = System::Drawing::Point(264, 96);
			this->pictureBox1->Name = S"pictureBox1";
			this->pictureBox1->Size = System::Drawing::Size(88, 80);
			this->pictureBox1->TabIndex = 41;
			this->pictureBox1->TabStop = false;
kann mir jemand helfen ?
 
Schau dir doch mal die Klasse CBitmap an

Dann defenierst du einen bereich, und gebst dem ne variable!

z.B.

CBitmap bitmap;
bitmap.LoadBitmap("c:\\test.jpg");
m_pic.SetBitmap(bitmap);
 
Zurück