   what's up with my pointers??
  hi!,i have a problem here. I'm using GDI+ and i declare 2 pointers: VOID OnPaint(HDC hdc){Graphics*myGraphs = NULL;Pen*myPen    = NULL;myGraphs = new Graphics(hdc); //myGraphs' value is still 0x000000 despite i initialized it!!   myPen    = new Pen(Color(0, 0, 255),2); //myPen's value is still 0x000000 despite i initialized it!!myGraphs->DrawEllipse(myPen, 50, 50, 50, 50); //So this gets me an errordelete myPen;delete myGraphs;}what can i do??thanks in advance[edited by - firecast on February 6, 2004 12:17:55 AM]
  I''ve never used GDI+ but I know its calling Win32 under the hood, so check GetLastError() as you normally would (should?) do. ;  nevermind, STUPID ME!!i initialized  GDI+ after using the pen. i solved it, thanks anyway!! ;  If it''s returning an error after the first call to create Graphics then you can assume that there''s some error with your Device context. Hunt from there ;  Just to note, there's no need to declare it dynamically:Graphics graphics(hdc);Pen pen(Color(0, 0, 255), 2);graphics.DrawEllipse(&pen, 50, 50, 50, 50);   [edited by - petewood on February 7, 2004 7:45:44 PM];  BTW that GDI+ API looks beautiful compared to the craptastic naming conventions MS flirted with such as ALLCAPSTYPES and everyone''s favorite CClassname. 