Hello,
Welcome to Microsoft Q&A!
I used GetSystemMetrics(SM_CYCAPTION) to get the title bar height and got a full screenshot. I made these changes in the following code.(Attached is the complete code)
based on code sample: https://learn.microsoft.com/en-us/windows/win32/gdi/capturing-an-image#code-example
In the screenshot, the transparent area of the original window turned green area.
Find this FindWindow(NULL, L" untitled-notepad "); Then change the name of the window you want to capture.
168961-gdi-capture.txt
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
@Junjie Zhu - MSFT
Sorry i dont understand what you mean by window form regular or irregular?
Do you mean the window shape? its a rect window.
Have you tested with Windows.Graphics.Capture ( New Ways to do Screen Capture )
@Castorix31 no, had never heard about it, but i was trying to get this using Gdi+
It has been a long time. Have you solved your problem?
Sign in to comment