error C2039

  • Thread starter Thread starter Daniel Wilson
  • Start date Start date
D

Daniel Wilson

I have a project that I have upgraded from VC++.Net 2002 to 2003. It worked fine under 2002.

I have solved some of the issues, but now am getting C:\dwilson\StitchViewer\Stitch2Image.cpp(165): error C2039: 'Color' : is not a member of 'System::Drawing::Pen'

Here is the line in question:
p=new System::Drawing::Pen( System::Drawing::Pen::Color::FromArgb(255,255,0));

I am using all of the following:

#using <System.Drawing.DLL>

#using <System.Windows.Forms.DLL>

using namespace System;

using namespace System::Drawing;

using namespace System::Drawing::Drawing2D;

using namespace System::IO;

According to IntelliSense, System::Drawing::Pen::Color does exist. But not according to the compiler. What am I missing?

Thanks.

Daniel Wilson

http://www.embtrak.com Development Team
 
This one's been solved. Color is no longer a class under Pen. It is now directly under Drawing. So the correction is this line:
p=new System::Drawing::Pen( System::Drawing::Color::FromArgb(255,255,0));

dwilson
I have a project that I have upgraded from VC++.Net 2002 to 2003. It worked fine under 2002.

I have solved some of the issues, but now am getting C:\dwilson\StitchViewer\Stitch2Image.cpp(165): error C2039: 'Color' : is not a member of 'System::Drawing::Pen'

Here is the line in question:
p=new System::Drawing::Pen( System::Drawing::Pen::Color::FromArgb(255,255,0));

I am using all of the following:

#using <System.Drawing.DLL>

#using <System.Windows.Forms.DLL>

using namespace System;

using namespace System::Drawing;

using namespace System::Drawing::Drawing2D;

using namespace System::IO;

According to IntelliSense, System::Drawing::Pen::Color does exist. But not according to the compiler. What am I missing?

Thanks.

Daniel Wilson

http://www.embtrak.com Development Team
 
Back
Top