在OnPaint函数里
CPointDC dc(this);
CBrush rBrush;
rBrush.CreateSolidBrush(RGB(255,0,0));
dc.SetBkMode(0);//设置0或1的效果都一样啊?
CRgn r;
r.CreatePolygonRgn(Point,6,1);
dc.FillRgn(&r,&rBrush);
r.DeleteObject();
dc.DrawText(Point,rect,0x25);
rBrush.DeleteObject();

解决方案 »

  1.   

    TRANSPARENT 是1
    OPAQUE 是 20不知是什么
      

  2.   

    CDC::SetBkMode
    This method sets the background mode. The background mode defines whether the system removes background colors on the drawing surface before drawing text, hatched brushes, or any pen style that is not a solid line.int SetBkMode( 
    int nBkMode ); 
    Parameters
    nBkMode 
    The mode to set. This parameter can be either of the following values: 
    OPAQUE   Background is filled with the background color before the text, hatched brush, or pen is drawn. This is the default background mode. 
    TRANSPARENT   Background is not changed before drawing. 
    看看msdn上说的,你写一个0是什么意思?
      

  3.   

    楼主看看该函数的背景模式吧/* Background Modes */
    #define TRANSPARENT         1
    #define OPAQUE              2
    #define BKMODE_LAST         2只有1和2