title: Displaying a form on button click in MFC application
body: <p>I have an MFC application. In this MFC there is a dialog box having some button controls. There is a button control named "play" to display Live Camera Image on another button control.  I have added one form by right click on the project and added a "pictureBox" in to this form. </p>
  
  <p>What I want is when I click on the "play" button control then this form will be opened and the live camera will be shown on the "pictureBox" instead of another button control.</p>
  
  <p>As I am new to MFC application I don't know how I will open from on click of the "play" button control.
  I have used this code for opening form</p>
  
  <pre><code>PvSimpleUISample::display^ obj;
      obj=gcnew PvSimpleUISample::display();
  </code></pre>
  
  <p>But this is showing error like
  PvSimpleUISampleDlg.cpp(740): error C2653: 'PvSimpleUISample' : is not a class or namespace name</p>
  
  <pre><code>PvSimpleUISampleDlg.cpp(740): error C2065: 'display' : undeclared identifier
  PvSimpleUISampleDlg.cpp(740): error C2065: 'obj' : undeclared identifier
  PvSimpleUISampleDlg.cpp(741): error C2065: 'obj' : undeclared identifier
  PvSimpleUISampleDlg.cpp(741): error C2653: 'PvSimpleUISample' : is not a class or namespace name
  PvSimpleUISampleDlg.cpp(741): error C2061: syntax error : identifier 'display'
  </code></pre>
  
  <p>I don't know how it can be done?</p>
  
  <p>Can anybody please help to to solve this problem.</p>
  
  <p>Any help will be appreciated.</p>
  
  <p>Thanks in Advance</p>