Pelles C forum

C language => Windows questions => Topic started by: Grincheux on April 25, 2021, 06:43:02 PM

Title: Just for fun
Post by: Grincheux on April 25, 2021, 06:43:02 PM
After you create the main window, add the following lines

Code: [Select]
SetWindowDisplayAffinity(hWndMain,3) ;
Now, lauch the program, take a screen shot.
Launch a window editor and paste your screen shot...
Title: Re: Just for fun
Post by: John Z on April 26, 2021, 02:17:42 PM
Parameter value 3 (WDA_EXCLUDEFROMCAPTURE) on MS help on SetWindowDisplayAffinity….
it did/does prevent prtsc, and IrfanView from copying the window image for the program I put
it into.

Probably there is already a workaround developed to do the capture. I imagine a device driver or system service could get around this.

It did surprise me when my program window disappeared ….  8)

John Z