Author Topic: Just for fun  (Read 285 times)

Offline Grincheux

  • Member
  • *
  • Posts: 329
  • Never be pleased, always improve
    • Arachne
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...
Kenavo / Bye

Offline John Z

  • Member
  • *
  • Posts: 358
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