for some reason, I need to capture the screen of one application automatically, and I find one good example from link How to get screenshot of a window as bitmap object in C++?
During my test, I found a strange thing (my test is based on Windows 10 with Visual C++ 2008):
in application of Windows notepad, I have to use parameter WM_PRINTCLIENT, or the captured is all black
PrintWindow(hwnd, hdc, WM_PRINTCLIENT);
in application that I want to capture, I have to use PW_CLIENTONLY, or the captured is all black
PrintWindow(hwnd, hdc, PW_CLIENTONLY);
So my question is that: what's the difference between them, and is there any rules? I tried to searching it in Internet but didn't find good hint.