문제

My application has a standard top level window for the application. I need to force a repaint of the window chrome (otherwise known as the non-client area of the window). I do not care if the client area is also repainted or not but the chrome itself needs to be forced to repaint.

In particular I need this to work on Windows 7. Whether it works on other OS versions does not matter in my particular case. The solution can be C, C++, C# or any other language.

도움이 되었습니까?

해결책

According to MSDN, it seems that

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

is what you are looking for.

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.

다른 팁

maybe you could send the WM_NCPAINT message to the window

http://msdn.microsoft.com/en-us/library/dd145212%28VS.85%29.aspx

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top