Minor optimizations and fixes

Fix broken build.
Use InitCommonControlsEx instead of the deprecated InitCommonControls API.