如何在C++中获取窗口的分辨率
How do I get the resolution of a window in C++?
#include <windows.h>
int main()
{
HDC Window = GetWindowDC(FindWindow(NULL,"Window Example Title"));
return 0;
}
如何获得窗口的分辨率,例如这样?
大概你的意思是可用的图形区域,在Windows中称为工作区。
您可以使用GetClientRect
函数查找其当前大小。
窗口本身有一个相应的GetWindowRect
。
相关文章:
- 如何在Qt窗口小部件中使用QStringView(或QStringRef)
- 问:如何使用C++中的按钮从窗口打开窗口
- SDL 窗口不会弹出
- 在createdialog创建的窗口中捕获用于编辑控件的OnMouseMove消息
- 如何在cpp文件之间切换窗口?在Qt中
- QuadTree只在窗口的右上角绘制
- VS Code "command":"make"与终端窗口中的命令行"make"不同
- 如何在C++中找到active directory中禁用和锁定的窗口帐户
- 处理闪烁窗口事件
- 如何通过按下第三个窗口中的按钮,将QString从一个窗口获取到另一个窗口
- C++win32 API创建多个类似视口的窗口
- SFML RenderWindow打开窗口需要很长时间
- 如何将不同的可执行文件合并到一个窗口框架中进行编码?像浏览器一样
- 获取 SFML 窗口的 HWND 和高可用性?
- 如何获取 GLFW 窗口 ID?
- X11,更改分辨率并使窗口全屏显示
- 什么是窗口高性能计数器的分辨率
- 为什么OpenCV(@Banana Pi,Raspbian)中的全屏窗口分辨率会减慢相机镜头的速度并使其滞后
- Qt 4.8调整窗口全分辨率监视器
- 如何在C++中获取窗口的分辨率