当前位置:网站首页>Set the transparent hidden taskbar and full screen display of the form
Set the transparent hidden taskbar and full screen display of the form
2022-07-04 17:44:00 【Full stack programmer webmaster】
Because of a special need Made a small program with three main functions
Set form transparency
void CSetDlg::SetTransparent()
{
::SetWindowPos(m_hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE);//TopMost
SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE,GetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE)^0x80000);
HINSTANCE hModule=LoadLibrary(“User32.DLL”);
if(hModule==NULL)
{
return;
}
typedef BOOL (WINAPI *FN_SetColor)(HWND,COLORREF,BYTE,DWORD);
FN_SetColor SetColor = NULL;
SetColor=(FN_SetColor)GetProcAddress(hModule,”SetLayeredWindowAttributes”);
if (SetColor==NULL)
{
return;
FreeLibrary(hModule);
}
SetColor(this->GetSafeHwnd(),0,50,2);
FreeLibrary(hModule);
}
Full screen display form
void CSetDlg::SetFullScreen()
{
LONG style = ::GetWindowLong(this->m_hWnd,GWL_STYLE);
style &= ~(WS_DLGFRAME | WS_THICKFRAME);
SetWindowLong(this->m_hWnd,GWL_STYLE, style);
this->ShowWindow(SW_SHOWMAXIMIZED);
CRect rect;
this->GetWindowRect(&rect);
::SetWindowPos(this->m_hWnd,HWND_NOTOPMOST,rect.left-1, rect.top-1, rect.right-rect.left + 3, rect.bottom-rect.top + 3, SWP_FRAMECHANGED);
}
Hide taskbar
void CSetDlg::SetTaskBarHide()
{
::SetWindowLong(GetSafeHwnd(),GWL_EXSTYLE, WS_EX_TOOLWINDOW);
}
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/110768.html Link to the original text :https://javaforall.cn
边栏推荐
- 聊聊异步编程的 7 种实现方式
- 智捷云——元宇宙综合解决方案服务商
- Kunming Third Ring Road Closure project will pass through these places. Is there one near your home?
- Vb无法访问数据库stocks
- 【Proteus仿真】基于VSM 串口printf调试输出示例
- Is it safe for CITIC Securities to open an account online? Is the account opening fee charged
- 数学分析_笔记_第7章:多元函数的微分学
- 【华为HCIA持续更新】SDN与FVC
- 补能的争议路线:快充会走向大一统吗?
- PingCode 性能测试之负载测试实践
猜你喜欢

Solution of dealer collaboration system in building materials industry: empowering enterprises to build core competitiveness

The Ministry of human resources and Social Security announced the new construction occupation

斑马识别成狗,AI犯错的原因被斯坦福找到了丨开源

RecastNavigation 之 Recast

一加10 Pro和iPhone 13怎么选?

就在今天丨汇丰4位专家齐聚,共讨银行核心系统改造、迁移、重构难题

解读数据安全治理能力评估框架2.0,第四批DSG评估征集中

CocosCreator事件派发使用

【测试开发】软件测试——基础篇

PingCode 性能测试之负载测试实践
随机推荐
什么是低代码开发?
关于nacos启动时防火墙开启8848的坑
It's too convenient. You can complete the code release and approval by nailing it!
国产数据库TiDB初体验:简单易用,快速上手
【Hot100】31. 下一个排列
Pytorch深度学习之环境搭建
【HCIA持续更新】网络管理与运维
简单易用的地图可视化
[HCIA continuous update] overview of WLAN workflow
整理混乱的头文件,我用include what you use
MVC模式和三层架构
超标量处理器设计 姚永斌 第5章 指令集体系 摘录
Is BigDecimal safe to calculate the amount? Look at these five pits~~
shell脚本的替换功能实现
【Hot100】32. 最长有效括号
Perfectly integrated into win11 style, Microsoft's new onedrive client is the first to see
Solution of dealer collaboration system in building materials industry: empowering enterprises to build core competitiveness
【Unity UGUI】ScrollRect 动态缩放格子大小,自动定位到中间的格子
La 18e Conférence internationale de l'IET sur le transport d'électricité en courant alternatif et en courant continu (acdc2022) s'est tenue avec succès en ligne.
利用win10计划任务程序定时自动运行jar包