当前位置:网站首页>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
边栏推荐
- NFT liquidity market security issues occur frequently - Analysis of the black incident of NFT trading platform quixotic
- 《吐血整理》保姆级系列教程-玩转Fiddler抓包教程(2)-初识Fiddler让你理性认识一下
- 金额计算用 BigDecimal 就万无一失了?看看这五个坑吧~~
- With an annual income of more than 8 million, he has five full-time jobs. He still has time to play games
- 公司要上监控,Zabbix 和 Prometheus 怎么选?这么选准没错!
- Datakit -- the real unified observability agent
- Talk about seven ways to realize asynchronous programming
- 关于nacos启动时防火墙开启8848的坑
- 简单易用的地图可视化
- 第十八届IET交直流輸電國際會議(ACDC2022)於線上成功舉辦
猜你喜欢

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

Ks007 realizes personal blog system based on JSP

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

【HCIA持续更新】网络管理与运维

居家打工年入800多万,一共五份全职工作,他还有时间打游戏

Superscalar processor design yaoyongbin Chapter 5 instruction set excerpt

CocosCreator事件派發使用

智捷云——元宇宙综合解决方案服务商

KS007基于JSP实现人个人博客系统

leetcode:421. The maximum XOR value of two numbers in the array
随机推荐
7 RSA Cryptosystem
长城证券安全不 证券开户
OPPO小布推出预训练大模型OBERT,晋升KgCLUE榜首
图像检索(image retrieval)
防火墙基础透明模式部署和双机热备
中断的顶半部和底半部介绍以及实现方式(tasklet 和 工作队列)
你应该懂些CI/CD
Leetcode list summary
Blood spitting finishing nanny level series tutorial - play Fiddler bag grabbing tutorial (2) - first meet fiddler, let you have a rational understanding
长城证券开户安全吗 证券账户怎么开通
KS007基于JSP实现人个人博客系统
Superscalar processor design yaoyongbin Chapter 7 register rename excerpt
R language plot visualization: plot visualization of multiple variable violin plot in R with plot
PingCode 性能测试之负载测试实践
ARTS_20220628
The 18th IET AC / DC transmission International Conference (acdc2022) was successfully held online
With an annual income of more than 8 million, he has five full-time jobs. He still has time to play games
无心剑中译伊丽莎白·毕肖普《一门技艺》
如何进行MDM的产品测试
上网成瘾改变大脑结构:语言功能受影响,让人话都说不利索