I'm creating CLR application with forms in C++. I tried to make main class which will have window and other stuff as variables. But window variable (form) got an error which says "A member of a non-managed class cannot be a handle". Any help would be great, thanks. Here is my code:
Well that is one of the rules of .NET. A native class can't have a handle to a managed class.
One way to solve it would be to create a managed class.
Try this:
1 2 3 4 5 6 7 8 9 10
public ref class SMSALENalozi
{
private:
Window ^window;
public:
SMSALENalozi()
{
window = gcnew Window();
}
};