title: C++ MFC How to Draw Alpha transparent Rectangle
body: <p>in a C++ MFC application. using the <strong>dc</strong>  of ( <code>CPaintDC dc(this);</code> )</p>
  
  <p>How do i draw a rectangle ( <code>LPRECT</code> ) with an alpha transparency  that i can adjust.?</p>
  
  <p><strong>Following is an example c# code which i need to convert into C++</strong></p>
  
  <pre><code>private void pictureBox1_Paint(object sender, PaintEventArgs e)  
  {
      Graphics g = e.Graphics;
      Color color = Color.FromArgb(75,Color.Red); //sets color Red with 75% alpha transparency
  
      Rectangle rectangle = new Rectangle(100,100,400,400);
      g.FillRectangle(new SolidBrush(color), rectangle); //draws the rectangle with the color set.
  } 
  </code></pre>