由于设置了WS_EX_LAYERED风格后,在WIN7setparent()到桌面progman下窗口不显示。所以,必须要找其他方法来实现窗口透明,请问有几种可以让窗口透明的方法?至于opacity属性,就不用说了,也是靠WS_EX_LAYERED实现的,用SPY++一看就明白了

解决方案 »

  1.   

    用API呀,你去查下,好久不用了,忘了?
      

  2.   


    BOOL SetLayeredWindowAttributes(
      HWND hwnd,           // handle to the layered window
      COLORREF crKey,      // specifies the color key
      BYTE bAlpha,         // value for the blend function
      DWORD dwFlags        // action
    );
    //Minimum operating systems Windows 2000 不知道WIN7能用不
      

  3.   

    opacity应该用到SetLayeredWindowAttributes
      

  4.   


    错,在WINXP下,WS_EX_LAYERED可以在setparent到progman后显示。只在WIN7下不显示
      

  5.   


    SetLayeredWindowAttributes的前提就是设置WS_EX_LAYERED