Sign in to follow this  
colinolivant

Managed C+++ & Windows Forms, Array

Recommended Posts

Hey does anyone have any experience with managed c++ and windows forms? I want to create a array of System::Windows::Forms::PictureBox^ but as its managed c++ I need to use something like System::Collections::ArrayList ?? Has anyone ever created a array of objects before. If you have an example would save me a lot of time trying to work out the best method. Thanks in advanced C.

Share this post


Link to post
Share on other sites
Do you mean C++/CLI? Managed C++ is a different language. If you do then you create managed arrays of managed handles like so:

ref class MyClass {};
int main() {
array<MyClass ^> ^ MyArray = gcnew array<MyClass ^>(100);
}


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this