*
Es hat sich herausgestellt, dass GDI+ nicht in der Windows-Prozedur gestartet und beendet werden muss, sondern in der WinMain:
int WINAPI WinMain (HINSTANCE hI, HINSTANCE hPrI, PSTR szCmdLine, int iCmdShow)
{
char szName[] = "OSmainClass";
WNDCLASS wc;
Gdiplus::GdiplusStartupInput StartupInput;
ULONG_PTR Token;
Gdiplus::GdiplusStartup(&Token, &StartupInput, NULL);
wc.style = CS_HREDRAW | CS_VREDRAW; // CS = "class style"
//... [styles, etc.]
ShowWindow (hWnd, iCmdShow);
UpdateWindow (hWnd);
// Message loop
MSG msg;
while (GetMessage (&msg, NULL, 0, 0))
{
TranslateMessage (&msg);
DispatchMessage (&msg);
}
Gdiplus::GdiplusShutdown(Token);
return msg.wParam;
}
Ich dachte, ich komme nie auf die Lösung...