Hi, I am working on visual studio 2008 C++ and I have done the C++ general code, my question is can I convert my general code to be C++ CLR in visual studio 2008? This will make my work easier.

And I have one more small question is I have made a textbox in C++ CLR, how can I load text from a text file? It is easy to load text file under C++ general but in CLR I don't know yet?

Thank you!

Hi, I am working on visual studio 2008 C++ and I have done the C++ general code, my question is can I convert my general code to be C++ CLR in visual studio 2008? This will make my work easier.

This is an excerpt from a book by Nishant Sivakumar that has a nice chart about handles versus pointers in section 1.4. To answer your question almost any code is "convertible" but the extent to which you have to marshal between managed and unmanaged types will vary.

And I have one more small question is I have made a textbox in C++ CLR, how can I load text from a text file? It is easy to load text file under C++ general but in CLR I don't know yet?

Thank you!

Use streamreader. Create the object with the name of your textfile and use Read, ReadToEnd or ReadLine methods.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.