您的位置:首页 > 其它

设置窗口透明

2008-10-14 15:07 204 查看
BOOL CSelectDlg::OnInitDialog()
{
    BOOL bRet = FALSE;
    long lStyle = 0;
    
    bRet = __super::OnInitDialog();

    lStyle = GetWindowLong(this->m_hWnd, GWL_EXSTYLE);
    //lStyle &= ~(WS_DLGFRAME | WS_THICKFRAME); //取消边框
    lStyle ^= 0x80000; //设置透明

    SetWindowLong(this->m_hWnd, GWL_EXSTYLE, lStyle); 

    SetLayeredWindowAttributes(0, 0, LWA_ALPHA);

    return bRet;
}
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: