gpt4 book ai didi

c# - C/C++/C#: how to force repaint of window chrome on windows 7?

转载 作者:太空狗 更新时间:2023-10-29 23:09:49 24 4
gpt4 key购买 nike

我的应用程序有一个标准的应用程序顶级窗口。我需要强制重绘窗口镶边(也称为窗口的非客户区)。我不在乎客户区是否也被重新绘制,但 chrome 本身需要被强制重新绘制。

特别是我需要它在 Windows 7 上工作。在我的特定情况下,它是否在其他操作系统版本上工作并不重要。解决方案可以是 C、C++、C# 或任何其他语言。

最佳答案

根据 MSDN , 看来

RedrawWindow( hWnd, NULL, NULL, RDW_INVALIDATE | RDW_FRAME );

就是你要找的。

RDW_FRAME causes any part of the nonclient area of the window that intersects the update region to receive a WM_NCPAINT message. The RDW_INVALIDATE flag must also be specified; otherwise, RDW_FRAME has no effect. The WM_NCPAINT message is typically not sent during the execution of RedrawWindow unless either RDW_UPDATENOW or RDW_ERASENOW is specified.

关于c# - C/C++/C#: how to force repaint of window chrome on windows 7?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3527938/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com