Windows GUI Programming - C + SDK or C # + Windows Forms

I am a C programmer with a lot of server experience (AIX, HPUX, some Linux) I need to write a GUI program for Windows (2000, XP, Vista, 7) that requires CAD-like drawing functions and lots of data entry forms (this specialized engineering application). I wrote some Win32 code many years ago using Gupta SQLwindows (now Centura Builder). Bosses decided that it should be compiled code. I believe that the C + SDK could do the job, but with more effort, and that C # + Windows Forms would be more capable, but I am a little worried about the requirement of the .NET Framework.

Based on your experience, what would you suggest?

If .Net, which version? 2.0, 3.0, 3.5 ??

+4
source share
7 answers

I am not familiar with Centura Builder, so I'm not sure at what level of abstraction your previous Windows programming experience is. If you choose your own code route using C / C ++ and Win32, be sure to buy a copy of Windows Programming by Charles Petzold. Reading the first few chapters of this book can help you decide whether you want to go with your own code.

If you choose the .NET Framework and C #, and if you do not need the functions of version 3.5 (for example, LINQ to access the database), I recommend choosing version 3.0. This is a built-in component in Windows Vista, so you donโ€™t need to package the runtime using the installer unless you need Windows XP support (which you probably do, so itโ€™s not worth it :). With version 3.0, you get the Windows Presentation Foundation (for use instead of or in conjunction with Windows Forms), which gives you plenty of graphical capabilities without much effort. I am not aware of CAD, so I donโ€™t know if WPF will provide the necessary drawing functions, but it can provide an excellent platform on which you can write your own drawing procedures.

EDIT: I missed your Windows version requirements on first reading, especially Windows 2000 requirements. I think you'll have to go with the .NET Framework version 2.0 and Windows Forms. I have to ask, though: would it not be economically viable to increase the productivity of your engineers by upgrading your eight-year-old machines to something newer and faster and therefore get rid of your requirement for Windows 2000 support?

+5
source

If you go for .NET traffic, you will have to use .NET 2.0 because .NET 3.0 and higher are only supported for Windows XP and higher (Vista, 7, 2003, 2008).

I personally would not sweat the requirements of the .NET framework. This is a one-time installation on each machine, which can be optimized through Windows updates, if necessary.

+3
source

If you don't want .NET, Qt + C ++ is definitely the way to go; it certainly beats C and Win32..NET still allows you to evolve much faster than even Qt. The advantage of Qt is its quick and easy deployment (no .NET requirements) and makes portability a lot easier (if you want to connect to Linux or Mac).

+1
source

If you must use your own code, I would strongly suggest RAD Studio from Codegear / Embarcadero, this is a studio product that ships with Delphi (the object-oriented language that evolved from Turbo Pascal) and C ++ Builder if you are already familiar with C / C ++, then it will be much easier for you to select it. The Visual Component library, which is shared by both languages, is extensible, powerful, and RAD.

If you can use managed code, then C # with Winforms is easy to use, WPF may be the best choice for the long-term user interface, but it has a steeper learning curve.

+1
source

Depending on the complexity requirements of a CAD-like drawing, I would go with C # + Windows Forms or, even more preferred, C # + WPF.

WPF will make drawing much, much cleaner than trying to do it in GDI. This is especially true if you intend to make a 3D drawing, since you can make many (simple) 3D objects directly in WPF. C # will make your graphical programming much more productive than trying to do this in C / C ++ using the Windows API directly (or even MFC).

Personally, the .NET requirements are minimal, in my opinion, but it really depends on the privileges your organization has ...

0
source

If it should be compiled code, I would recommend WTL MFC, but it would be much faster (in terms of development costs) to use C # + WinForms or WPF.

0
source

You can do everything with C or C ++ / Win32 api
(Win32 examples for CAD-like drawings are located on MSDN ..)

0
source

All Articles