//黑色背景,透明度200,255为不透明
this->SetBackgroundColor(RGB(0, 0, 0));
//设置窗口为Layered窗口
SetWindowLong(this->m_hWnd, GWL_EXSTYLE, GetWindowLong(this->m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
//或:this->ModifyStyleEx(0, WS_EX_LAYERED);
//透明度200
::SetLayeredWindowAttributes(this->m_hWnd, RGB(0, 0, 0), 200, LWA_ALPHA);
评论 0
友善交流,让讨论变得更有价值。