GUI issue while connection to root using visual studio

Hi

I writing a c++ program and connect to root using dynamic link. I have the following code:

TApplication theApp(myChar,&argc,argv);
gStyle->SetPalette(1,0);
TF1 f1(“func1”,“sin(x)/x”,0,10);
f1.Draw();

I can see the window but it isn’t clickable, moreover there are many wrong things in the window. Can someone please let know what is the correct way of doing it?

Thanks,
Idan

Hi Idan,

Add theApp.Run()at the end of your code.

Cheers, Bertrand.