Desktop Event Notifications

Hi all,

I'm trying to leverage the CBT WindowHook to monitor the state of all the various windows in my application's desktop. For simplicity's sake, let's assume I'm just tracking window resizing. My application, App.exe, will be sitting around detecting changes in the desktop.

As far as I understand the documents. This is what I need to do.

#1 In App.exe, create a window that will handle incoming messages from the various windows I want to track.
#2 Create a simple DLL with some shared memory that contains my window's HWND and functions that will use SetWindowsHookEx to hook globally into all windows my dll with the CBT hook.
#3 Provide a hook call back that will look for the window resize messages and then post them to my HWND as a user defined message.

With this set up, I believe my app will be able to detect resize events from all windows in the system.

Is my understanding correct?
Topic archived. No new replies allowed.