当前位置:网站首页>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
边栏推荐
- Solve the El input input box For number number input problem, this method can also be used to replace the problem of removing the arrow after type= "number"
- KS007基于JSP实现人个人博客系统
- 一加10 Pro和iPhone 13怎么选?
- RecastNavigation 之 Recast
- What are cache penetration, cache breakdown, and cache avalanche
- PingCode 性能测试之负载测试实践
- 整理混乱的头文件,我用include what you use
- 设置窗体透明 隐藏任务栏 与全屏显示
- 电子宠物小狗-内部结构是什么?
- Master the use of auto analyze in data warehouse
猜你喜欢
Chow Tai Fook fulfills the "centenary commitment" and sincerely serves to promote green environmental protection
Easy to use map visualization
Difference between redis' memory obsolescence strategy and expiration deletion strategy
雨量预警广播自动化数据平台BWII 型广播预警监测仪
整理混乱的头文件,我用include what you use
Offline and open source version of notation -- comprehensive evaluation of note taking software anytype
Ks007 realizes personal blog system based on JSP
[test development] software testing - Basics
Load test practice of pingcode performance test
一加10 Pro和iPhone 13怎么选?
随机推荐
Superscalar processor design yaoyongbin Chapter 5 instruction set excerpt
【HCIA持续更新】广域网技术
What is low code development?
Pytorch深度学习之环境搭建
【HCIA持续更新】WLAN工作流程概述
Easy to use map visualization
设置窗体透明 隐藏任务栏 与全屏显示
超标量处理器设计 姚永斌 第5章 指令集体系 摘录
【华为HCIA持续更新】SDN与FVC
居家打工年入800多万,一共五份全职工作,他还有时间打游戏
缓存穿透、缓存击穿、缓存雪崩分别是什么
kaili不能输入中文怎么办???
Initial experience of domestic database tidb: simple and easy to use, quick to start
Flask 轻量web框架
一加10 Pro和iPhone 13怎么选?
CocosCreator事件派发使用
创业两年,一家小VC的自我反思
智捷云——元宇宙综合解决方案服务商
[unity ugui] scrollrect dynamically scales the grid size and automatically locates the middle grid
无心剑中译伊丽莎白·毕肖普《一门技艺》