M
Markus Eßmayr
Hello,
I'm writing an extension class for the winforms button control using MC++.
I created a class, derived from System::Windows::Forms::Button.
In my class I want to extend the functionality of the Image-property, so I
added the followind functions:
public __gc class ExtendedButton : public System::Windows::Forms::Button
{
public:
__property System:
rawing::Image* get_Image();
__property void set_Image(System:
rawing::Image* value);
};
System:
rawing::Image* ExtendedButton::get_Image()
{
return System::Windows::Forms::Button::get_Image();
}
void ExtendedButton::set_Image(System:
rawing::Image* value)
{
System::Windows::Forms::Button::set_Image(value);
}
My problem is, that VS2003 runs into an endless loop when I add that control
in a form.
It then consumes very much CPU and memory, and it doesn't stop itself.
What did I do wrong?
There must be a way!
Thanks in advance!
Max
I'm writing an extension class for the winforms button control using MC++.
I created a class, derived from System::Windows::Forms::Button.
In my class I want to extend the functionality of the Image-property, so I
added the followind functions:
public __gc class ExtendedButton : public System::Windows::Forms::Button
{
public:
__property System:

__property void set_Image(System:

};
System:

{
return System::Windows::Forms::Button::get_Image();
}
void ExtendedButton::set_Image(System:

{
System::Windows::Forms::Button::set_Image(value);
}
My problem is, that VS2003 runs into an endless loop when I add that control
in a form.
It then consumes very much CPU and memory, and it doesn't stop itself.
What did I do wrong?
There must be a way!
Thanks in advance!
Max