Have a look at RegisterHotKey
Upon finding a match, the system posts the WM_HOTKEY message to the message queue of the window with which the hot key is associated. If the hot key is not associated with a window, then the WM_HOTKEY message is posted to the thread associated with the hot key.
Which I think means that W+D is processed by the "desktop window" and so the key messages are not sent to your window (or your window lost the focus so it doesn't get key messages anymore).
These keys are labeled with the Windows logo. Hotkeys that involve the Windows key are reserved for use by the operating system.
So it's probably not a good idea to use the windows keys for shortcuts.
In a small test on my machine (windows 7) when I try any windows shortcut (w+d, w+e, w+r, w+p...) my application only get the windows key messages, never the letters (using virtual keys or raw input).
Disable windows shortcut
(not what you want but could help).