Possibly you forgot to call the
GdiplusStartup
function, as the documentation (
"GdiplusStartup function" at MSDN[
^]) states:
You must call GdiplusStartup before you create any GDI+ objects, and you must delete all of your GDI+ objects (or have them go out of scope) before you call GdiplusShutdown.