[GDI+] Status value directly after initialization

2004-11-10 02:41:04 AM
Dear readers,
i have some doubts, maybe someone could know the answer:
suppose simple chunk of C++ code:
//----CODE START----//
GdiplusStartup(token, startIn, NULL);
Graphics gr(hdc);
Gdiplus::Status stat = gr.GetLastStatus();
stat = gr.DrawLine(&pen,10,10,100,100);
//----CODE END----//
what value should stat have directly after initialization of gr? My
value is 'OutOfMemory' and i just wonder why.. More to say, trying to
draw aanything i.e. a line, stat returns 'InvalidParameter' enum. Is
this only some uninitialization mistake in GDI+ or is something up
with my particular environment or compilation? Anyway GdiplusStartup
returns Ok but i'm not able to draw anything due to
I use WinXP + Builder 5.0.5 + SDK libs and includes /translated to
Thanx in advance