经常搜到设置窗体透明度的函数,却不见获取窗体透明度的函数,我自己的MSDN()也没有.
   另外,是否最后的vc6的2001.10的MDSN含有设置窗体透明度的函数的说明?我的MSDN不知道如何获知它的版本?

解决方案 »

  1.   

    The GetLayeredWindowAttributes function retrieves the opacity and transparency color key of a layered window.BOOL GetLayeredWindowAttributes(
      HWND hwnd,           // handle to the layered window
      COLORREF *pcrKey,    // color key
      BYTE *pbAlpha,       // Alpha value
      DWORD *pdwFlags      // layering flags
    );
      

  2.   

    //=======================================
    SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE,
    GetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE)^0x80000);
    HINSTANCE hInst = LoadLibrary("User32.DLL"); //显式加载DLL
    if(hInst) 
    {            
    typedef BOOL (WINAPI *MYFUNC)(HWND,COLORREF,BYTE,DWORD);          
    MYFUNC fun = NULL;     
    fun=(MYFUNC)GetProcAddress(hInst, "GetLayeredWindowAttributes");//取得GetLayeredWindowAttributes函数指针
    if(fun)fun(this->GetSafeHwnd(),&pcrKey,&pbAlpha,&pdwFlags );   
                                           //变量意思见楼上得 
    FreeLibrary(hInst); 
    }
    //=========================================
      

  3.   

    请问以上两位是否在新的MSDN里面查找到的?