Visible Client Area question
-
Hi, How do I determine if the client area of my window has been totally covered up by other windows? In my OpenGl program, I still want to render when the user switches away to another program, but not when the rendering/client area is not visible. Thanks! Shawn
-
Hi, How do I determine if the client area of my window has been totally covered up by other windows? In my OpenGl program, I still want to render when the user switches away to another program, but not when the rendering/client area is not visible. Thanks! Shawn
I guess you could fire WM_PAINT with InvalidateRect/UpdateWindow and check the rectangle returned by GetClipBox. Or - you could sample coords in client area with WindowFromPoint :) Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
-
Hi, How do I determine if the client area of my window has been totally covered up by other windows? In my OpenGl program, I still want to render when the user switches away to another program, but not when the rendering/client area is not visible. Thanks! Shawn
You might want to have a look at KB article Q75236. http://support.microsoft.com/default.aspx?scid=kb;en-us;Q75236 I have to admit to never having used OpenGL. Do you not do your rendering in response to WM_PAINT messages? 'Cause if your rendering is in response to WM_PAINT, you won't get any WM_PAINT messages if the window is totally obscured.