希望大虾们最好是贴点源代码,谢谢!

解决方案 »

  1.   

    SetLayeredWindowAttributes 
    http://hi.baidu.com/130503/blog/item/0f504123a724d342ac34dee3.html
      

  2.   

    SetLayeredWindowAttributes 
    设置窗体透明
      

  3.   

    void CQQDlg::TransparencyFuc (int Trans)
    {
    #define LWA_COLORKEY  0x00000001
    #define WS_EX_LAYERED  0x00080000
        #define LWA_ALPHA   0x00000002
        #define GWL_EXSTYLE  -20
    typedef BOOL (WINAPI *lpfnSetLayeredWindowAttributes)(HWND hWnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags);
    lpfnSetLayeredWindowAttributes SetLayeredWindowAttributes; HMODULE hUser32 = GetModuleHandle("user32.dll");
    SetLayeredWindowAttributes = (lpfnSetLayeredWindowAttributes)GetProcAddress(hUser32,"SetLayeredWindowAttributes"); SetWindowLong(GetSafeHwnd(), GWL_EXSTYLE, GetWindowLong(GetSafeHwnd(), GWL_EXSTYLE) | WS_EX_LAYERED);
        SetLayeredWindowAttributes(GetSafeHwnd(), 0, Trans, LWA_ALPHA);
    FreeLibrary(hUser32);}
    我曾经仿QQ界面时,写的改变透明度的函数!希望对你有用!
      

  4.   

    是子对话框啊...SetLayeredWindowAttributes无效的...
      

  5.   

    是挂接在CWnd类上的一个子对话框...要设置可以控制透明度的..
      

  6.   

    typedef BOOL (WINAPI *lpfnSetLayeredWindowAttributes)
                (HWND hWnd, COLORREF cr, BYTE bAlpha, DWORD dwFlags);lpfnSetLayeredWindowAttributes g_pSetLayeredWindowAttributes = NULL;{
    if (!g_pSetLayeredWindowAttributes)
    {
             HMODULE hUser32 = GetModuleHandle(_T("USER32.DLL"));
         g_pSetLayeredWindowAttributes = (lpfnSetLayeredWindowAttributes)
                            GetProcAddress(hUser32, "SetLayeredWindowAttributes");   
            
        if (g_pSetLayeredWindowAttributes)
    {
     SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);

    }
    else return ;
    }
    g_pSetLayeredWindowAttributes(m_hWnd, 0, bAlpha, LWA_ALPHA);
    }
      

  7.   

    用带Alpha通道的位图自绘面板,其实很多软件都是这么做的,比如QQ的皮肤位图
      

  8.   

    http://blog.sina.com.cn/s/blog_4bbf906f01008hxr.html
    这个不知道可不可以
      

  9.   

    建议去http://www.vckbase.com/看看。