Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying make the handle for the entire desktop to point to the windows proc. How can that be done.

What I have tried:

I have tried creating a window handle and pointing that to windows proc. But I am unable to find any information online that will allow me to point the desktop handle to the windows proc
Posted
Updated 24-Oct-17 9:05am
v2
Comments
Dave Kreskowiak 29-Sep-17 19:31pm    
That makes no sense at all.

I don't think anyone has any clue what you're trying to do with the desktop window handle.
Ravi Bhavnani 29-Sep-17 23:31pm    
I think what he wants to do is write a WndProc that will process messages sent to the desktop window. Methinks the only way to do that is by creating a hook.

/ravi
Dave Kreskowiak 30-Sep-17 9:09am    
Possibly. But is he trying to just listen for the Desktop window messages or every window being shown?

Don't know....
Roger1990 3-Oct-17 9:46am    
Yeah. So I want to listen to all the messages that are being sent by the mouse, keyboard and touch input, on the everything that is there on the screen. I thought getdesktopwindow() may provide a handle to everything on the screen. Apologies, if my knowledge is incorrect as I have started using winAPI very recently.

1 solution

I think you may need to build a Windows hook to process messages destined for the desktop window. See this[^] MSDN article and this CP article: Using Window Messages to Implement Global System Hooks in C#[^].

/ravi
 
Share this answer
 
Comments
Roger1990 3-Oct-17 9:46am    
I am looking into it. Thank You
Roger1990 4-Oct-17 11:27am    
@Ravi Bhavnani: Hey Ravi, I was able to use hooks to detect mouse and keyboard events but I am unable to figure out how I can detect touch based events using that.
Ravi Bhavnani 4-Oct-17 13:04pm    
See https://www.codeproject.com/Articles/381673/Using-the-RawInput-API-to-Process-MultiTouch-Digit.

/ravi
Roger1990 24-Oct-17 15:06pm    
@Ravi Bhavnani: I was able to detect touch input using global hooks, as was suggested by you. Any idea why it doesn't work around the region covered by the internet explorer but that's not the case anywhere else on the screen

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900