i need to get a message as WM_LBUTTONDOWN from the desktop. I've already try in several way but nothing.

Is there a way ? thanks angelo
Posted on 2001-08-11 06:40:29 by Bit7
Hmmm... I can't capture this message with Spy++. Perhaps you need to do a "GetDesktopWindow" (correct API name?)
Posted on 2001-08-11 07:23:53 by bazik
i've already try GetDesktopWindow.
The handle it return seems that's not valid to be used with GetMessage. I don't get any message useful from desktop :(

every help is appreciated. Bye
Posted on 2001-08-11 14:34:50 by Bit7
You will probably need to use hooks. Check out Iczelion's tutorials.

When Windows sends a WM_LBUTTONDOWN to the Desktop window, the thread which created the Desktop window receives the message.

Guess what? You didn't create the Desktop, so none of the threads in your running program will ever receive messages sent to the Desktop window. This means none of the message queues used by your program will ever receive those messages.
Posted on 2001-08-13 16:57:03 by tank
thanks tank :) I will study the hooks on Icz tuts.

Posted on 2001-08-14 09:00:28 by Bit7
GetDesktopWindow doesn't seem to return the correct handle of the desktop. i posted such a question some months ago. the reason is easy: the desktop is a SysListView, you have to get the handle of this window, don't ask me how :P

Posted on 2001-08-14 11:58:55 by NOP-erator