Open image..

Hi,

How do you Open a file image in C++, not like LoadFromFile("");
But like.......the user would click...File->OPen->and choose a file of there choice and place it into a Tpicture Box.

I can do the Open dialog box, but then i click on a image too load it, it wont load.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
	//if
   //	OpenPicture1->Execute();
	//{



		TPicture * pct = new TPicture;
		Graphics::TBitmap *bmpPicture = new Graphics::TBitmap;

	  
		bmpPicture->LoadFromFile(OpenPicture1->Execute();
		pct->Graphic = bmpPicture;



		LecERD->Picture = pct;
	//} 


LecERD is where i want the image to be in the GUI. Anyinfo would help, thanks
Topic archived. No new replies allowed.