This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdi+ question


The  following   code   snippet  is   failing  when  I use
local   variable   for  Pen   and  Graphics   instead  of
dynamically allocating   them. Can  someone  help me  out with a reason?



   StartDoc(dlg.hDC, &di); 
   StartPage(dlg.hDC); 
   GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
   Pen      *pen = new Pen(Color(255, 0, 0, 255));
   Graphics *graphics = new Graphics(dlg.hDC);
   graphics->DrawLine(pen, 0, 0, 800, 200);
   delete pen;
   delete graphics;


Attachment: InterScan_Disclaimer.txt
Description: Text document

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]