L o a d i n g . . .
主打一个C++
文章详情

mfc窗口设置窗口背景透明度

Posted on 2019-06-08 03:29:30 by 主打一个C++

//黑色背景,透明度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);


*转载请注明出处:原文链接:https://cpp.vin/page/118.html

作者近期文章
提示
×
确定
数据库执行: 7次 总耗时: 0.02s
页面加载耗时: 



wechat +447752296473
wechat cpp-blog