I'm trying to develop an alternative task bar, which will show some additional information about the user's programs currently running. so my taskbar will for the beginning show the same as the native windows task bar.
the first challenge is to determine the currently running programs, that have a GUI and are listed on the task bar. I do not need all the daemons and for now I want to ignore the case, where programs are not shown in the task bar directly, but do hide in the system tray.
I figured out I can find out which programs are currently shown in the task bar, by getting the list of all running processes and checking their window handle hwnd.
however, I would have to poll the list of processes constantly to discover new windows/processes or find out about closed programs. this would be not very efficient.
so I thought about listening to system events directly. using a system hook, would it be possible to acquire the information required to find out about newly created or destroyed windows? I'm thinking of WM_CREATE events now.
or is there any other resource I can exploit to get this information?
thanks in advance,