当前位置:网站首页>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
边栏推荐
- 上网成瘾改变大脑结构:语言功能受影响,让人话都说不利索
- gatling 之性能测试
- Hidden corners of coder Edition: five things that developers hate most
- Leetcode list summary
- [test development] software testing - Basics
- 大规模服务异常日志检索
- NFT liquidity market security issues occur frequently - Analysis of the black incident of NFT trading platform quixotic
- PingCode 性能测试之负载测试实践
- 中断的顶半部和底半部介绍以及实现方式(tasklet 和 工作队列)
- Kunming Third Ring Road Closure project will pass through these places. Is there one near your home?
猜你喜欢
码农版隐秘的角落:作为开发者最讨厌的5件
What is low code development?
超大规模数仓集群在大型商业银行的落地实践
解读数据安全治理能力评估框架2.0,第四批DSG评估征集中
Hidden corners of coder Edition: five things that developers hate most
VSCode修改缩进不成功,一保存就缩进四个空格
上网成瘾改变大脑结构:语言功能受影响,让人话都说不利索
离线、开源版的 Notion—— 笔记软件Anytype 综合评测
The Ministry of human resources and Social Security announced the new construction occupation
超标量处理器设计 姚永斌 第6章 指令解码 摘录
随机推荐
ble HCI 流控机制
What are cache penetration, cache breakdown, and cache avalanche
Internet addiction changes brain structure: language function is affected, making people unable to speak neatly
[unity ugui] scrollrect dynamically scales the grid size and automatically locates the middle grid
【每日一题】556. 下一个更大元素 III
国产数据库TiDB初体验:简单易用,快速上手
图像检索(image retrieval)
Easy to use map visualization
Is it safe for Bank of China Securities to open an account online?
Pytorch深度学习之环境搭建
Electronic pet dog - what is the internal structure?
如何进行MDM的产品测试
数学分析_笔记_第7章:多元函数的微分学
Detectron2 installation method
【系统分析师之路】第七章 复盘系统设计(结构化开发方法)
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.
Using win10 scheduling task program to automatically run jar package at fixed time
整理混乱的头文件,我用include what you use
MVC mode and three-tier architecture
【测试开发】软件测试——基础篇