I am trying to write a very limited taskbar replacement without the start menu and the standard desktop.
But now i wonder how explorer.exe works internally. 

1.) How does the taskbar catch minimizing windows?  

2.) How do the taskbar get to know when a window opens or closes or somthing? (Is there an api?)

3.) How does explorer.exe enable visual styles? (If it doesn't run all styles are disabled and it looks like win9x)