[BUG] Different client areas

Started by fixer, February 11, 2018, 04:58:23 PM

Previous topic - Next topic


Not sure if it's a bug or a feature. It's not critical, but may be interesting to know anyway.

Looks like Windows developers have different opinions on "client area".
https://msdn.microsoft.com/en-us/library/dd162743(v=vs.85).aspx this description of nonclient area says
Quotenonclient area of the window, such as the title bar, menu bar, or window frame
And for example this PrintWindow function https://msdn.microsoft.com/en-us/library/windows/desktop/dd162869(v=vs.85).aspx operates in agreement with the description above. With PW_CLIENTONLY flag it indeed doesn't include menu bar in the screenshot.
And GetClientRect function https://msdn.microsoft.com/en-us/library/windows/desktop/ms633503(v=vs.85).aspx also agrees with the description, it doesn't include menu bar in the RECT.
But looks like DWM thumbnails https://msdn.microsoft.com/en-us/library/windows/desktop/aa969502(v=vs.85).aspx were developed by a different team of people who have their own opinion on nonclient area. So using fSourceClientAreaOnly flag includes menu bar in the thumbnail treating it as a client area.