rowgram
December 12th, 2005, 11:39 AM
Here's what I have that works fine :
inside abutton click event handler :
Graphics* gr2 = CreateGraphics();
SolidBrush* sb = new SolidBrush(Color::Red);
gr2->FillRectangle(sb, .......);
Now, I try to use this inside a function X :
the function X prototype is changed to :
BOOL X(System:: Drawing::SolidBrush*sb, System:: Drawing::Graphics* gr2, ....);
gr2 is made a private property of the Form :
private: System:: Drawing::Graphics * gr2;
& now inside the function X :
Graphics* gr2 = CreateGraphics();
SolidBrush* sb = new SolidBrush(Color::Red);
gr2->FillRectangle(sb, .......);
I get error C3861 : CreateGraphics identifier not found.
I thought by passing the SolidBrush & Graphics pointers to function X , it would work properly ? It understands the FillRectangle method, so why not the CreateGraphics method ?
Any help would be appreciated - I'm close to getting this to work !
inside abutton click event handler :
Graphics* gr2 = CreateGraphics();
SolidBrush* sb = new SolidBrush(Color::Red);
gr2->FillRectangle(sb, .......);
Now, I try to use this inside a function X :
the function X prototype is changed to :
BOOL X(System:: Drawing::SolidBrush*sb, System:: Drawing::Graphics* gr2, ....);
gr2 is made a private property of the Form :
private: System:: Drawing::Graphics * gr2;
& now inside the function X :
Graphics* gr2 = CreateGraphics();
SolidBrush* sb = new SolidBrush(Color::Red);
gr2->FillRectangle(sb, .......);
I get error C3861 : CreateGraphics identifier not found.
I thought by passing the SolidBrush & Graphics pointers to function X , it would work properly ? It understands the FillRectangle method, so why not the CreateGraphics method ?
Any help would be appreciated - I'm close to getting this to work !