title: How to change font size and font of static control when the property is transparent
body: <p>I create two CStatic controls. One property is set to transparent mode; another one is normal.
  After I change font size, one is OK, it is changed, but the set transparent mode one is not changed in size.</p>
  
  <p>Does anybody know why?</p>
  
  <pre><code>//////////////////////////////////////////////////
  /* Resource File */
  LTEXT           "This Is Normal Text.",IDC_FONT2,7,119,303,21,WS_BORDER
  LTEXT           "This Include Transparent.",IDC_FONT,7,7,306,21,WS_BORDER | NOT WS_GROUP | WS_TABSTOP,WS_EX_TRANSPARENT
  
  
  /* FontTest.CPP */
  class CFontSizeDlg : public CDialogEx
  {
  public:
      CStatic m_myFont;
      CStatic m_myFont2;
  }
  
  /* FontTest.CPP */
  void CFontSizeDlg::DoDataExchange(CDataExchange* pDX)
  {
      CDialogEx::DoDataExchange(pDX);
      DDX_Control(pDX, IDC_FONT, m_myFont);
      DDX_Control(pDX, IDC_FONT2, m_myFont2);
  }
  
  void CFontSizeDlg::OnBnClickedButton2()
  {
      CFont hNewFont;
      LOGFONT lf;                        // Used to create the CFont.
  
      CFont *currentFont = GetFont();
      currentFont-&gt;GetLogFont(&amp;lf);
      lf.lfHeight = 25;
      lf.lfWidth = 10;
  
      hNewFont.DeleteObject();
      hNewFont.CreateFontIndirect(&amp;lf);    // Create the font.
  
       // Use the font to paint a control.
      m_myFont2.SetFont(&amp;hNewFont);
      m_myFont.SetFont(&amp;hNewFont);
  
      // hNewFont.Detach(); // will create GDI leak
      hNewFont.DeleteObject();
  }
  </code></pre>