谢谢

解决方案 »

  1.   

    long   style   =   ::GetWindowLong(GetDlgItem(IDC_RICHEDIT)->GetSafeHwnd(),   GWL_STYLE);   
    style   &=   WS_EX_TRANSPARENT;   
    ::SetWindowLong(GetDlgItem(IDC_RICHEDIT)->GetSafeHwnd(),   GWL_STYLE,   style); 
      

  2.   

    在OnCtlColor里面进行处理HBRUSH CPenWidthsDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
    {
       // Call the base class implementation first! Otherwise, it may
       // undo what we're trying to accomplish here.
       HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);   // Are we painting the IDC_MYSTATIC control? We can use
       // CWnd::GetDlgCtrlID() to perform the most efficient test.
       if (pWnd->GetDlgCtrlID() == IDC_EDIT)
       {
          // Set the text color to red
          pDC->SetTextColor(RGB(255, 0, 0));      // Set the background mode for text to transparent 
          // so background will show thru.
          pDC->SetBkMode(TRANSPARENT);      // Return handle to our CBrush object
          return (HBRUSH)::GetStockObject(NULL_BRUSH);
       }   return hbr;
    }
      

  3.   

    右键属性中extended styles 里面有transparent 这个属性。
      

  4.   

    是RichEdit控件,不是Edit啊。大哥
      

  5.   

    利用普通的透明,其实就是更改richiedit的背景色为窗口北京色,不是真正的透明。要想实现很好的效果就得自己重载richedit.比如北京是图片。上述透明方案无效 别怕麻烦 go...