From: pvdg42 on

"Steven O." <null(a)null.com> wrote in message
news:0puss29jca48e3ds8otjjirq0ibflgqulr(a)4ax.com...
> Short version: I will be creating stand-alone applications for
> Windows. Which environment will make it quicker and easier for me to
> create the necessary GUI's -- Visual C++ or Visual C#?
>
> Longer version: I took a bunch of programming classes some years
> back, including two semesters of C++, but I've been away from it for a
> while. One thing I found with C++ was that trying to create even a
> basic GUI using Visual Studio 6 with MFC was an absolute bear.
>
> I now plan to develop some simple scientific and mathematical
> applications, mostly for self-study purposes, but some of them may
> turn commercial at some point. The guts of the programs will be the
> mathematical logic and processing, but I do need a GUI front-end for
> data input, setting parameters, results display, etc. I've downloaded
> both Visual C++ Express and Visual C# Express, but haven't explored
> them yet, and I'm trying to decide which one to pursue.
>
> In terms of underlying code for program logic, I'd prefer to work in
> C++, both because I know it already, and because it is more universal
> than C#. (So, for example, it would be easier to port the code to
> some other environment down the road.) On the other hand, I don't
> want to waste time learning GUI programming again.
>
> I want to be able to slap together a basic GUI using drag-and-drop
> style development for GUI components. A very quick peek at Visual C++
> Express does not immediately reveal a drag-and-drop development tool,
> but I may have missed something. (Have not even installed Visual C#
> Express yet.) So, in the end, I'll go with whichever language makes
> its easier to put the GUI together, and if that means learning C#,
> I'll do that.
>
> I guess a related issue would be, it would help to use software where
> saving data structures to a file, and retrieving them from a file, is
> straightforward. Again, that was a real issue with MFC, so it would
> help to know if the latest Visual C++ environment makes that easier,
> or if I am better off with C# in that respect. In a sense, I'm
> looking for the ease of front end and file processing that comes with
> VB, but with the advanced data structure capabilities I associate with
> C++. So, again -- the latest Visual C++, or Visual C#?
>
> Any and all input is much appreciated. Please point me in the right
> direction....
>
> Steve O.
>

When you use the phrase "stand alone", do you mean an application that is
not dependent on a managed environment (i.e. the .NET Framework)?
If so, your only choice is C++.

If developing .NET Windows applications is what you're after, then either
C++ or C# is available.
You might be a bit disappointed with C++ in the .NET Framework, however, as
you'll need to learn the CLI extensions in order to take advantage of the
..NET Winforms template.

One other thing. If your goal is .NET apps, there are groups dedicated to
both C++ and C# in the .NET environment:

microsoft.public.dotnet.languages.csharp

microsoft.public.dotnet.languages.vc


--
Peter [MVP Visual Developer]
Jack of all trades, master of none.


From: Joseph M. Newcomer on
See below...
On Sun, 11 Feb 2007 02:18:35 GMT, Steven O. <null(a)null.com> wrote:

>Short version: I will be creating stand-alone applications for
>Windows. Which environment will make it quicker and easier for me to
>create the necessary GUI's -- Visual C++ or Visual C#?
>
>Longer version: I took a bunch of programming classes some years
>back, including two semesters of C++, but I've been away from it for a
>while. One thing I found with C++ was that trying to create even a
>basic GUI using Visual Studio 6 with MFC was an absolute bear.
****
Using MFC, I do this as an exercise in one of my courses. I can do it in about five
minutes, for a dialog-based app. With walking 3-4 student groups through it, piecewise,
explainining each step, it takes about 20 minutes. That doesn't sound very challenging.
So I'm not sure why you said it was hard, unless you were trying to create a raw Win32 GUI
app from scratch. Now THAT'S hard!
****
>
>I now plan to develop some simple scientific and mathematical
>applications, mostly for self-study purposes, but some of them may
>turn commercial at some point. The guts of the programs will be the
>mathematical logic and processing, but I do need a GUI front-end for
>data input, setting parameters, results display, etc. I've downloaded
>both Visual C++ Express and Visual C# Express, but haven't explored
>them yet, and I'm trying to decide which one to pursue.
*****
My experience in creating a C# app (form-based) was it took about as much effort as
creating a C++/MFC dialog-based app; in my case it took a lot more effort because I was
trying to figure out the C# equivalents to accomplish reasonably sophisticated effects
that I would have quickly turned out in MFC
*****
>
>In terms of underlying code for program logic, I'd prefer to work in
>C++, both because I know it already, and because it is more universal
>than C#. (So, for example, it would be easier to port the code to
>some other environment down the road.) On the other hand, I don't
>want to waste time learning GUI programming again.
****
C# is basically C++. In fact, in once case I converted a C++ program to C#, and did it
largely by copy-and-paste, so there is no real syntax trauma if you know C++
*****
>
>I want to be able to slap together a basic GUI using drag-and-drop
>style development for GUI components. A very quick peek at Visual C++
>Express does not immediately reveal a drag-and-drop development tool,
>but I may have missed something. (Have not even installed Visual C#
>Express yet.) So, in the end, I'll go with whichever language makes
>its easier to put the GUI together, and if that means learning C#,
>I'll do that.
****
It's called a dialog-based app, and it is definitely a drag-and-drop paradigm. I don't
know about the Express version, but all the other versions definitely have this.
****
>
>I guess a related issue would be, it would help to use software where
>saving data structures to a file, and retrieving them from a file, is
>straightforward. Again, that was a real issue with MFC, so it would
>help to know if the latest Visual C++ environment makes that easier,
>or if I am better off with C# in that respect. In a sense, I'm
>looking for the ease of front end and file processing that comes with
>VB, but with the advanced data structure capabilities I associate with
>C++. So, again -- the latest Visual C++, or Visual C#?
*****
Saving data structures and retrieving them is quite independent of the language. It
depends on whether you plan to use binary files, data bases, XML, or text files.

It will be the same in MFC or C#. Database interfaces are quite similar, XML interfaces
are quite similar, text file interfaces are essentially identical, and although I haven't
tried it, I presume binary file interfaces are essentially identical. I used XML in C# to
hold configuration file information, and it took very little time (XML Is built into C#;
in C++ you have to find a decent library)
****
>
>Any and all input is much appreciated. Please point me in the right
>direction....
****
I don't think there are serious issues no matter which one you choose.
joe
****
>
>Steve O.
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: flect on
Steven O. wrote:
> Short version: I will be creating stand-alone applications for
> Windows. Which environment will make it quicker and easier for me to
> create the necessary GUI's -- Visual C++ or Visual C#?
>
> Longer version: I took a bunch of programming classes some years
> back, including two semesters of C++, but I've been away from it for a
> while. One thing I found with C++ was that trying to create even a
> basic GUI using Visual Studio 6 with MFC was an absolute bear.
>
> I now plan to develop some simple scientific and mathematical
> applications, mostly for self-study purposes, but some of them may
> turn commercial at some point. The guts of the programs will be the
> mathematical logic and processing, but I do need a GUI front-end for
> data input, setting parameters, results display, etc. I've downloaded
> both Visual C++ Express and Visual C# Express, but haven't explored
> them yet, and I'm trying to decide which one to pursue.
>
> In terms of underlying code for program logic, I'd prefer to work in
> C++, both because I know it already, and because it is more universal
> than C#. (So, for example, it would be easier to port the code to
> some other environment down the road.) On the other hand, I don't
> want to waste time learning GUI programming again.
>
> I want to be able to slap together a basic GUI using drag-and-drop
> style development for GUI components. A very quick peek at Visual C++
> Express does not immediately reveal a drag-and-drop development tool,
> but I may have missed something. (Have not even installed Visual C#
> Express yet.) So, in the end, I'll go with whichever language makes
> its easier to put the GUI together, and if that means learning C#,
> I'll do that.
>
> I guess a related issue would be, it would help to use software where
> saving data structures to a file, and retrieving them from a file, is
> straightforward. Again, that was a real issue with MFC, so it would
> help to know if the latest Visual C++ environment makes that easier,
> or if I am better off with C# in that respect. In a sense, I'm
> looking for the ease of front end and file processing that comes with
> VB, but with the advanced data structure capabilities I associate with
> C++. So, again -- the latest Visual C++, or Visual C#?
>
> Any and all input is much appreciated. Please point me in the right
> direction....
>
> Steve O.
>

The short version: C#.method is Microsoft-specific.
From: Bruno van Dooren [MVP VC++] on
> Short version: I will be creating stand-alone applications for
> Windows. Which environment will make it quicker and easier for me to
> create the necessary GUI's -- Visual C++ or Visual C#?

See my blog for an explanation of when I would use either C++ or C#, based
on their strengths and weaknesses.
http://msmvps.com/blogs/vandooren/archive/2007/02/05/is-c-still-a-viable-language.aspx

--

Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren(a)hotmail.com
Remove only "_nos_pam"


From: Bruno van Dooren [MVP VC++] on
>>> Short version: I will be creating stand-alone applications for
>>> Windows. Which environment will make it quicker and easier for me to
>>> create the necessary GUI's -- Visual C++ or Visual C#?
>>
>>See my blog for an explanation of when I would use either C++ or C#, based
>>on their strengths and weaknesses.
>>http://msmvps.com/blogs/vandooren/archive/2007/02/05/is-c-still-a-viable-language.aspx
>
> Thank you, your blog is helpful. For my purposes, it's still a coin
> toss. I want rapid application development, so C# seems appealing in
> that sense. On the other hand, I plan to write my own low-level
> libraries for things like matrix processing, data structure searches,
> etc., for which the memory control and speed of C++ would be
> appealing. Decisions, decisions....

In that case I would write the low-level functions in C++, and package them
in a DLL with C style exported functions that you can then simply invoke in
a C# app.
Another solution is to Create a COM component in C++ with the low level
routines.
If the method prototypes are valid for creating a type library, you could
reuse that COM component in C# without having do do anything special.
Gluecoe will be generated for you in that case.

Either of those 2 will give you the RAD of C# and the power of C++.

--

Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren(a)hotmail.com
Remove only "_nos_pam"