现在只能用Cbrush类了,但搜遍资料也没发现他能做成透明,请问这个类是否有这个功能?

解决方案 »

  1.   

    // Initialize a LOGBRUSH structure.
    LOGBRUSH logBrush;
    logBrush.lbStyle = BS_NULL;//BS_NULL is same as BS_HOLLOW// Declare an uninitialized CBrush ...
    CBrush brush;
    // ... and initialize it with the LOGBRUSH.
    brush.CreateBrushIndirect(&logBrush);
      

  2.   

    楼上的动作好快.同意,在loStyle中设置BS_NULL
      

  3.   

    LOGBRUSH logbr; memset(&logbr , 0 , sizeof(LOGBRUSH)); logbr.lbColor = RGB(255,0,0);//这里改变位图背景 logbr.lbStyle = BS_NULL; HBRUSH hBrush = CreateBrushIndirect(&logbr); HBRUSH oldbr = (HBRUSH)SelectObject(dcMem , hBrush);.....
      

  4.   

    pDC->SelectStockObject(NULL_BRUSH);