各位大哥:
    我在SDK下用鼠标画了两个矩形,由于两个矩形有重叠,重叠部分不能显示出来,假如后面画的矩形比较大的话(如覆盖整个屏幕),那么前面画的图就全部被覆盖掉了,不能显示.我现在要把覆盖掉的部分显示出来,就象透明的一样.怎么解决?

解决方案 »

  1.   

    int SetROP2(
      HDC hdc,         // handle to DC
      int fnDrawMode   // drawing mode
    );
      

  2.   

    The SetROP2 function sets the current foreground mix mode. GDI uses the foreground mix mode to combine pens and interiors of filled objects with the colors already on the screen. The foreground mix mode defines how colors from the brush or pen and the colors in the existing image are to be combined. int SetROP2(
      HDC hdc,         // handle to DC
      int fnDrawMode   // drawing mode
    );