I'm not a Windows expert. What I describe works for Linux, but I expect a similar mechanism to exist in Windows.
The "Desktop" metaphore is essentially implemented through a directory. The desktop is a big, full-screen file browser (in Windows it literally is).
This means in Linux, that any change that is made to the desktop directory can be observed through inotify. Again, I presume that a similar mechanism exists in Windows and that you'll be able to find it using the keywords from the manual page of inotify.