I am trying to write a test program to detect the windows events, such as mouseclick , text entered in a textfield, a dialogue box opened, etc.

Could I use the default WIN32 API to detect all windows events?

How do I do it?