WinEvent Telling the different objects apart?

  c++, get-winevent, hook, windows

I’m listening to global win events for cases such as object destroyed, hidden, shown, created etc…

However I’d like to do certain things based on what that handle (HWND) is. For example did a button just get hidden or destroyed or did a window? Was it a child window that got hidden or parent? The last question regards to seemingly getting an event raised for every object in the parent window when parent window closes which is too much noise. Trying to make sense of what raised the event.

Source: Windows Questions