Have a look at F4/Base/Shell/Src/shell.cpp. I'll write more about this later.
F4/Base/Shell/Src/shell.cpp