S
saunderl
Hello Everyone,
I'm trying to just play with managed VC++. I just want to draw a box
on the form when it is clicked. Here is my click event handler
System::Void Test_Click(System::Object^ sender, System::EventArgs^ e)
{
// Create a Graphics object for the Control.
Graphics* g = this->CreateGraphics() ;
g->DrawRectangle(gcnew Pen(Color::Green, 1.0), 1, 1, 100, 100);
}
Trying to create a graphics object this way (Graphics* g =
this->CreateGraphics()
I get this error:
Error 1 error C3699: '*' : cannot use this indirection on type
'System:rawing::Graphics' c:\documents and settings\saul01\my
documents\visual studio
2005\projects\cc2\managedxp\managedxp\Test.h 77
Trying to create a graphics object this way (Graphics g =
this->CreateGraphics()
Error 1 error C3767: 'System:rawing::Graphics::Graphics': candidate
function(s) not accessible c:\documents and settings\saul01\my
documents\visual studio
2005\projects\cc2\managedxp\managedxp\Test.h 77
I'm using VS2005 and all the other code was generated by Visual Studio.
Thanks for the help, L. Lee Saunders
I'm trying to just play with managed VC++. I just want to draw a box
on the form when it is clicked. Here is my click event handler
System::Void Test_Click(System::Object^ sender, System::EventArgs^ e)
{
// Create a Graphics object for the Control.
Graphics* g = this->CreateGraphics() ;
g->DrawRectangle(gcnew Pen(Color::Green, 1.0), 1, 1, 100, 100);
}
Trying to create a graphics object this way (Graphics* g =
this->CreateGraphics()
I get this error:
Error 1 error C3699: '*' : cannot use this indirection on type
'System:rawing::Graphics' c:\documents and settings\saul01\my
documents\visual studio
2005\projects\cc2\managedxp\managedxp\Test.h 77
Trying to create a graphics object this way (Graphics g =
this->CreateGraphics()
Error 1 error C3767: 'System:rawing::Graphics::Graphics': candidate
function(s) not accessible c:\documents and settings\saul01\my
documents\visual studio
2005\projects\cc2\managedxp\managedxp\Test.h 77
I'm using VS2005 and all the other code was generated by Visual Studio.
Thanks for the help, L. Lee Saunders