[Bug] Misleading MSDN and PrintWindow

Started by fixer, June 30, 2017, 05:37:08 PM

Previous topic - Next topic

fixer

We've got this nice PrintWindow API function. In its MSDN description we can see that
QuoteThe application receives a WM_PRINT message or, if the PW_PRINTCLIENT flag is specified, a WM_PRINTCLIENT message.
Let's start with that there is no PW_PRINTCLIENT flag, just PW_CLIENTONLY. But most likely it's just a typo. What's worse is that no WM_PRINT is sent, WM_PAINT is sent instead. So the application doesn't actually have to support WM_PRINTCLIENT message, it works fine without it even with custom drawn windows that handle WM_PAINT and manually paint their content.

Later I found it was already discussed here https://stackoverflow.com/questions/43851325/printwindow-send-message-wm-paint-or-wm-print/44062144#44062144 But this bug still remains.

This issue was found for about a week ago, it wasn't fixed then. According to the article it's been there for many years already. I haven't checked it since, but I suspect it to remain unfixed for many years to come.