我有一个相当标准的C ++程序,我创build一个全屏窗口(有两个子窗口)。 在Windows 10的开发计算机上,此窗口填满了整个屏幕并覆盖了任务栏。
在Windows 7上,它不包含任务栏。 经过一番尝试,似乎如果我closureSAEro程序将覆盖任务栏!
我也创build了一个快速的C#/ WPF应用程序,无论Aero的状态如何,这个应用程序都能够覆盖任务栏。
我是否缺less窗口的窗口消息或创build选项?
为什么我的MDI子表单不显示阴影?
C#:玻璃forms?
如何强制Aero绘制无边框窗口,即使不是?
WPF:使窗口不可调整,但保持框架?
我想在特定的航空窗口上禁用阴影效果
这是定位和创build窗口的代码
// Get a handle to the primary monitor,which by deFinition has its top // left corner at (0,0). const POINT ptZero = { 0,0 }; HMONITOR hmon = MonitorFromPoint(ptZero,MONITOR_DEFAULTTOPRIMARY); MONITORINFO mi = { sizeof(mi) }; GetMonitorInfo(hmon,&mi); // Fill the entire screen layout->left = mi.rcMonitor.left; layout->right = mi.rcMonitor.right; layout->top = mi.rcMonitor.top; layout->bottom = mi.rcMonitor.bottom; // Create a full screen window m_hwnd = CreateWindowEx( WS_EX_TOPMOST,className,windowName,WS_POPUP | WS_VISIBLE,layout.left,layout.top,layout.right - layout.left,layout.bottom - layout.top,NULL,GetModuleHandle(NULL),this); // LParaM is used in WM_CREATE to associate the class instance with the Window
这是处理窗口消息的代码
switch (uMsg) { case WM_PAINT: OnPaint(hwnd); // Draws a black background return DefWindowProc(hwnd,uMsg,wParam,lParam); default: return DefWindowProc(hwnd,lParam); }
更新:谷歌search后,我发现这个问题也可能是DPI相关: http : //forums.pcsx2.net/Thread-Fullscreen-Windows-7-Taskbar-does-not-auto-hide-w-aero https:/ /productforums.google.com/forum/#!topic/chrome/5dMYLChXeWk
什么工作,现在不工作:
Areo + DPI @ 150%:不包括任务栏否Areo + DPI @!150%:包含任务栏Areo + DPI @ 100%:包含任务栏否区域+ DPI @ 100%:包含任务栏
这让我非常困惑
如何检测Delphi 7上的Windows Aero主题?
预览窗口后面屏幕状态的Aerofunction是什么?
如何在订阅DWM组合/ Aero Glass禁用时引发的操作系统级事件?
Windows Aero:绘制“玻璃”的颜色是什么颜色?
如何在Windows 7中使用Python进行截图?
在我发现DPI发挥作用后,我偶然发现了这个解决方案。 我们需要告诉Windows,我们的应用程序是DPI的意识。 如果我们不这样做,Windows会尝试重新调整应用程序的UI元素。 我仍然不知道为什么这只会导致问题时启用航空,但这个解决方法:
使用以下内容将名为“manifest.xml”(名称无关紧要)的文件添加到项目中:
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" > <asmv3:application> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> <dpiAware>true</dpiAware> </asmv3:windowsSettings> </asmv3:application> </assembly>
生成清单: 是的
清单工具 – >输入和输出
其他清单文件: manifest.xml
嵌入清单: 是的
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。