NO

Author Topic: Just for fun  (Read 1423 times)

Grincheux

  • Guest
Just for fun
« 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...

Offline John Z

  • Member
  • *
  • Posts: 786
Re: Just for fun
« Reply #1 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