Add a User Control in managed Winforms C++

V

vitagoni

Mates,
I'm doing managed C++ project first time. (was usually using Unmanaged C++
and Managed C#).
It is winforms application: main form where splitted pannels and then...
I add my UserControl ActivityView to the project.
Then I create as usual its design, and then using Tools/Add Toolbox item
menu, add the User Ctrl elemen to the main Winform Form1.
I can see it, but when I start Build -
Error 1 error C2039: 'ActivityView' : is not a member of
'docsmanGUI' c:\docsman_prj\docsmangui\docsmangui\Form1.h 83 docsmanGUI

I can see the identical namespace both in Form1 and ActivityView, so..
obviously they both are in the docsmanGUI...

Do you know how to add a UserControl to WinForms C++ managed application?

What would that error mean>?

Thanks
 
V

vitagoni

Ooooh, terrible,

The designer after it adds a control doesn't add #include "Mycontrol.h" into
main project cpp file.

So much time spent.. unbelievable.
 
V

vitagoni

Yes, it was my first time of CLR C++; I was programming on C# before and
expected the same behavior.. wasn't expecting an extra #include after I added
control to project tree... it was against CLR principles.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top