Click here to Skip to main content
15,030,355 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
I would like to use C++ with Forms in Visual Studio. They are great for a quick GUI.. but
If it becomes more complex, I get tangled up with CLR/CLI errors. It looks like Form and .net libraries are all CLR. Is there any hope?
Posted
Comments
   
"Tangled up with CLR/CLI errors" is not informative. If you want to use Forms, what is that supposed to mean? If this is .NET System.Windows.Forms, the question is the logical absurd, because .NET is based on CLR and CLI... Just learn it. This is your only hope. (Why being so grim, by the way? You have the opportunity to learn managed plarform; isn't it great?)
—SA

1 solution

You could either look into the pre-.NET versions of WinForms (i.e. stuff from the 1990s) and use that via COM or look into MFC if you want to do non clr GUI stuff.

Other wise separate most of your difficult logic into a win32 dll that you can compile and call it from your thinner clr based UI.
   
Comments
[no name] 10-Sep-14 22:00pm
   
"pre-.NET versions of WinForms" - Did something like that exist? Where can I find it?
   
You are perfectly right. This is nothing but gibberish, no better than the question, which is just the lack of basic understanding, which is kinda okay.
—SA
CatchExAs 11-Sep-14 8:05am
   
Was the designer in VB6 not called 'WinForms' or similar?
If so, then you just sound pompous which is worse.
Sergey Alexandrovich Kryukov 11-Sep-14 10:52am
   
OP just did not mean those forms; I think it's more or less apparent, because CLR and CLI were mentioned. It does not matter how windows in VB6 were named, it's just irrelevant. Essentially, OP was attracted by CLR quality but wanted to used the approach without having CLR itself...
—SA
CatchExAs 11-Sep-14 12:40pm
   
Only the OP knows exactly what he wants to achieve. If it's to use C++ to rapidly build UI software then my advice might point him in a helpful direction. Insulting him and me helps no one.
Sergey Alexandrovich Kryukov 11-Sep-14 14:24pm
   
In this case, even OP does not knows that exactly, which is actually a very typical case.
Thank you.
—SA
nick_wagner 11-Sep-14 13:00pm
   
Thank you guys for the suggestions and your patience. . Yes it is System.Windows.Forms that I am asking about. Sorry for being lazy about learning managed code. It is just that I have many years with C++ in a Win32 Terminal Interface and have never had so many dead ends in development. The error messages do not help me find even simple programming/typo mistakes. Maybe this is just part of the learning curve but it all seems so unnecessary. I have done some MFC and it is more straightforward.. but the simplicity and speed of using forms keep tempting me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900