GetClientRect 的替代方案?
我正在监视 Vista 上处于窗口模式的 DirectX 应用程序。 GetClientRect 会报告正确的大小,直到应用程序最小化并恢复为止,然后它始终返回预览大小 (106x160)。
除了使用 GetClientRect WinAPI 之外,还有其他方法可以查询窗口的客户区吗?也许向窗口发送消息,或者检查 Windows 对窗口客户区的了解?
任何帮助将不胜感激,如果您可以使用 C# 或 .NET,那就太好了,但任何其他语言都可以
I am monitoring DirectX application that is in windowed mode on Vista. GetClientRect reports correct size until application is minimized and restored then it always returns the preview size (106x160).
Is there any other way to query window for client area than use GetClientRect WinAPI? Perhaps sending message to the window, or checking what Windows knows about window client area?
Any help would be appreciated and if you can use C# or .NET it would be a bonus but any other language would do
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您不应该在应用程序最小化时调用 GetClientRect,因为它没有多大意义,最小化时根本不可见客户区域。
请看这里:如何检测我的应用程序何时最小化?< /a> 当然有一种方法可以检测窗口何时最小化,这样您就可以避免在这种情况下使用
GetClientRect
。I think you should not call GetClientRect when the application is minimized because it does not make much sense, there is not client area visible at all when minimized.
look here: How could I detect when my application is minimized? there is of course a way to detect when a window is minimized so you can avoid using
GetClientRect
in that case.