title: How to change the Visible Property of an image using a button in MFC application (C++ Visual Studio 2010)?
body: <p>I am trying to make a program where an image would disappear when a certain a button called hide in the application is pressed. </p>
  
  <p>I  know in Windows form application it would be something like this:</p>
  
  <pre><code>    pictureBox1-&gt;Visible=true/false;
  </code></pre>
  
  <p>But that code wouldn't work in MFC </p>
  
  <p>My code in MFC is </p>
  
  <pre><code>     Cstatic pictureBox1 =(Cstatic)Getdialogitem(IDC_IMAGE1);
       pictureBox1-&gt;Visible=false; 
  </code></pre>