I am working in MFC and I am trying to capture a bmp of the desktop. I am using GetDC(NULL) to do this but it seems it ignores special skinned windows. It seems to ignore windows drawn with UpdateLayeredWindow. This behaviour seems to be happening only on Vista x64 and XP. I have also tried GetWindowDC with the desktop HWND but the result is the same.
NOTES: 1) Print Screen works. 2) On Vista if I enable Aero the screen captures are ok, "special" windows appear. So on Vista it only happens when Aero is disabled.
An ideas?
Thank you.
Check If There Is an F Mode or F Lock Key on the Keyboard. If there is an F Mode key or F Lock key on your keyboard, the Print Screen not working Windows 10 may be caused by them, because such keys can disable the PrintScreen key. If so, you should enable the Print Screen key by pressing F Mode key or F Lock key again.
Answer: Sometimes the presence of the F Mode key or F Lock key on the keyboard disables the PrtScn key, and the user is unable to take screenshots using PrtScn in Windows 10. These keys need to be pressed again in order to enable PrtScn to take screenshots in Windows.
When calling BitBlt(), add the CAPTUREBLT flag to "capture" layered windows
This could be because of desktop composition. Turn off the Aero desktop composition in Vista and try it again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With