title: Set bitmap into CStatic object
body: <p>I'm trying to add one bitmap into a picture box. This is what I've tried:</p>
  
  <pre><code>void DlgError::Define_Image()
  {
      // I generate all requiered elements.
      CBitmap bitmap;
  
      // Depending on the type of the message, I define the image to show.
      switch (Message_Type)
      {
          case Error: bitmap.LoadBitmap(IDB_ERROR); break;
          case Warning: break;
  
          case Information:
          default: bitmap.LoadBitmap(IDB_INFORMATION); break;
      }
  
      // I set the new picture.
      m_picture.ModifyStyle(0, SS_BITMAP);
      m_picture.SetBitmap(bitmap);
  }
  </code></pre>
  
  <p>I don't know why it's not working. I have the same code I've in some forums. Can anybody help me? I have to define some extra styles?</p>
  
  <p>The picture box has <code>Bitmap</code> as its type (Can be hanged in Picture control properties)</p>
  
  <p><strong>SOLUTION</strong></p>
  
  <p>I must say that the solution is a combination of both answers. Finally, I define one local variable and I use the next code in order to do what I want.</p>
  
  <pre><code>void DlgError::Define_Image()
  {
      // Depending on the type of the message, I define the image to show.
      switch (Message_Type)
      {
          case Error: bitmap.LoadBitmap(IDB_ERROR); break;
          case Warning: break;
  
          case Information:
          default: bitmap.LoadBitmap(IDB_INFORMATION); break;
      }
  
      // I set the new picture.
      m_picture.ModifyStyle(SS_ENHMETAFILE, SS_BITMAP);
      m_picture.SetBitmap(bitmap);
  }
  </code></pre>
  
  <p>Thanks everyone who helped me!</p>