如何实现WIN2K下鼠标光标那样的阴影效果(win98下)

解决方案 »

  1.   

    你不说我还从来没有注意到呢
    我想它应该就在生成鼠标的cur中吧
    如果是的话,你把这个鼠标带到98中使用,或者替换调98的系统鼠标应该就可以了
      

  2.   

    鼠标阴影,半透明窗口这些UI特性好象2k以上才支持,自己弄不容易
      

  3.   

    //阴影背景
    CRect rc(300,300,700,700);
    WORD bits[8] = { 0x0055, 0x00aa, 0x0055, 0x00aa,
     0x0055, 0x00aa, 0x0055, 0x00aa };
    CBitmap bmbrush;
    CBrush brush; // need a monochrome pattern bitmap
    bmbrush.CreateBitmap( 8, 8, 1, 1, &bits ); // create the pattern brush
    brush.CreatePatternBrush( &bmbrush ); CBrush *poldbrush = pDC->SelectObject( &brush ); // turn every other pixel to black
    COLORREF clrbk = pDC->SetBkColor( RGB(255,255,255) );
    COLORREF clrtext = pDC->SetTextColor( RGB(0,0,0) );
    // 0x00a000c9 is the rop code to and the brush with the destination

    pDC->PatBlt(rc.left, rc.top, rc.Width(), rc.Height(), (DWORD)0x00a000c6); //dpa - raster code pDC->SetBkColor( RGB(0,0,0) );
    pDC->SetTextColor( RGB(64,64,64) );
    // pDC->SetTextColor( RGB(0,0,0) );
    // 0x00fa0089 is the rop code to or the brush with the destination
    pDC->PatBlt(rc.left, rc.top, rc.Width(), rc.Height(), (DWORD)0x00fa0089); //dpo - raster code // restore the device context
    pDC->SelectObject( poldbrush );
    pDC->SetBkColor( clrbk );
    pDC->SetTextColor( clrtext );
      

  4.   

    对Alpha通道进行卷积运算就可以计算模糊的影子