[.net] create C++ winforms project WITHOUT CLR
In Visual Studio 2003 if you create a WinForms project in C++, by default you get the regular C++ style syntax and none of the CLR stuff. But in Visual Studio 2005 the project automatically gets created with CLR and so pointers (*) turn into (^) and using statements get added. How can you create a C++ Winforms project in VS2005 without this happening? How can you create it without CLR and just plain C++?
I don't think you got the regular C++ style syntax, you got the really dodgy 'managed bits tacked onto C++' syntax. With VS2005 they've dramatically *improved* the syntax (which is called C++/CLI). You simply cannot get WinForms without the CLR, since all of the WinForm classes themselves are managed code.
But in VS2003 you can create a winforms C++ project without all the odd C++ syntax. And I can then load that project into 2005 and compile just fine. So there must be a way to create it in 2005.
Quote:Original post by soconne
But in VS2003 you can create a winforms C++ project without all the odd C++ syntax. And I can then load that project into 2005 and compile just fine. So there must be a way to create it in 2005.
Compare the settings to see if there is a switch not set in VS 2005.
Well that's the thing, when you create the project in VS2005 there is no switch. There are no settings, just the "ok" button.
Quote:Original post by BradSnobar
can you still create an mfc application?
Yes MFC is still supported in Visual Studio 2005.
2003 had "Managed C++"
2005 has "C++/CLI"
two different languages, but NONE of those are ordinary c++. both are c++ in a managed world. 2003 just looks like ordinary c++, wich is quite dangerous. 2005 does add difference to make it obvious wich part of the code is managed, and wich isn't.
afaik 'Managed C++' got deprecated in 2005 => you can't normally create projects using it. but you can still compile the old code using it (against the .net 1.1 framework, that is, i guess). so better check the options in the project (not at creation time, but afterwards. rightclick the project in the projectbrowser, and choose settings)
2005 has "C++/CLI"
two different languages, but NONE of those are ordinary c++. both are c++ in a managed world. 2003 just looks like ordinary c++, wich is quite dangerous. 2005 does add difference to make it obvious wich part of the code is managed, and wich isn't.
afaik 'Managed C++' got deprecated in 2005 => you can't normally create projects using it. but you can still compile the old code using it (against the .net 1.1 framework, that is, i guess). so better check the options in the project (not at creation time, but afterwards. rightclick the project in the projectbrowser, and choose settings)
as long as you don't need winforms or anything else that IS .NET-based, you don't need the CLR, and can disable it in the options. and then you can continue coding as usual.
but if you want to use anything of .NET, you obviously have to .. use .NET. winforms are .NET, ergo there's no way around it. but you can use win32 if you want (but i won't suggest it to you ever...).
possibly you should just not be scared of .NET, it's a great tool for a lot of things.
but if you want to use anything of .NET, you obviously have to .. use .NET. winforms are .NET, ergo there's no way around it. but you can use win32 if you want (but i won't suggest it to you ever...).
possibly you should just not be scared of .NET, it's a great tool for a lot of things.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement