Add a User Control in managed Winforms C++

  • Thread starter Thread starter vitagoni
  • Start date Start date
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
 
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.
 
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.
 
Back
Top