Refactoring gdi+ init/uninit to main.cpp