Windows Form Textboxes

Started by
15 comments, last by jpetrie 14 years, 9 months ago
its not even possible to insert my image from a resource, as a bmp file?
Advertisement
It is possible. As I said, you shouldn't #include <windows.h> in a C++/CLI project. If you take that out, it'll fix that problem (though it might cause other problems...)

Like Promit says in this other recent thread, you should only be using C++/CLI if have a thorough understanding of both C++ and .NET already... do yourself a favour and either switch to a C# project, or use a native GUI library such as wxWidgets.
I have 2 other files that are included in the project, that are written in C++. Converting to C# would take way too long for me considering I have never touched it.

C++ is just way easier for me
In which case, I would recommend wxWidgets over winforms. Not having to deal with the complexity of C++/CLI is a huge win for wxWidgets.
and what is wxWidgets..
If you are new to programming and wish to make Windows programs, I would suggest that you consider downloading either Visual C# or Visual Basic .NET express editions. Registration is free, and you can use them for any purpose. You will have a much easier time, I think using these either of those than you would C++.

http://www.microsoft.com/express/vcsharp/

http://www.microsoft.com/express/vb/default.aspx

Edit:
I just read above that you don't want to switch to C# because you've already studied some C++. This, I believe, is a very serious mistake. C++ is a very complicated language, and if all you want to do is make some simple programs, you really don't need it. Further more, the same .NET libraries you've been accessing with C++/CLI are able to be used from C# and Visual Basic.

Professional developers use C# and Visual Basic for a wide range of purposes, and there is certainly no shame in doing the same for hobby work.
Quote:
I have 2 other files that are included in the project, that are written in C++. Converting to C# would take way too long for me considering I have never touched it.

But you're not writing C++ already. If you're using VS 2003 and you're using Windows Forms, you're using C++ with the Managed C++ extensions enabled. This is fundamentally massively different from C++ -- almost, in fact, as different as C#. And in a much more unpleasant fashion.

You cannot use Windows Forms and C++ together directly. If you want to use C++, use a different windowing toolkit like wxWidgets. If you want to use Windows Forms, use C#.

C++/CLI and C++ w/ Managed C++ extensions are terribly complicated languages that are not suitable for usage by people who did not realize they were using them. If you persist in this direction, you need to understand that you are intentionally taking one of the most difficult paths available to you and that you will need to learn quite a lot about how native and managed interoperability code works.

This topic is closed to new replies.

Advertisement