CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Thread: What to choose?

  1. #1
    Join Date
    Aug 2007
    Posts
    63

    What to choose?

    Hello everyone ,

    I would like to start a new project on Visual C++ 6.0 (I must use that) but I don't know where to start from. I usually used freeware SDK and I am not a skilled programmer. I would like to make an application that can run from console with all his classes and afterwards to add a gui, or to do both the things together. When I do New->Projects what should I choose?

    To admin: if this is not the right place sorry for that...and move me anywhere you want

  2. #2
    Join Date
    Oct 2005
    Location
    Minnesota, U.S.A.
    Posts
    680

    Re: What to choose?

    If you want to do both, you need to have two separate projects, or else use a DLL.

    If you are an experianced CLI programmer (coming from the UNIX world), create a console project.

    If you are starting from scratch and just learning, then I personally would do a console project to do a "Hello World", then create a GUI project to make a "Hello World" GUI.

    I suggest getting a book on this subject. Way too big to cover here.

    -Erik

  3. #3
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: What to choose?

    Create a dialog based MFC project. In the InitInstance you mainwindow will be shown. Disable this code and you can use it like it is a commandline program. Afterwards you can enable the disabled code and you will have a mainwindow.

  4. #4
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: What to choose?

    I admit I don't know much about MFC, but given its age and some of the outdated patterns it uses, is it really a good place for newbies to be starting?

  5. #5
    Join Date
    Oct 2005
    Location
    Minnesota, U.S.A.
    Posts
    680

    Re: What to choose?

    Quote Originally Posted by Lindley View Post
    I admit I don't know much about MFC, but given its age and some of the outdated patterns it uses, is it really a good place for newbies to be starting?
    Depends.

    1. If they want to learn how everything works and be a guru, yes.
    2. If they want to just slap together an app and hope, no.

    If it is #2, take a look at C#.NET.

    -Erik

  6. #6
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: What to choose?

    Quote Originally Posted by Lindley View Post
    I admit I don't know much about MFC
    Isn’t the above sentence a contradiction to:
    Quote Originally Posted by Lindley View Post
    but given its age and some of the outdated patterns it uses, is it really a good place for newbies to be starting?
    I do not know where did you hear this. Microsoft jusr updated MFC for VS 2008.
    Besides what is wrong with age? STL is older but I have not seen or heard anybody complaining about it.
    MFC is just a tool to make Windows programming better and without knowing how Windows OS is working, there is no much use of it. MFC also requires knowledge of the C++ and OOP.
    I hear most complains about MFC from people who do not know it.
    To learn Windows programming in general and Windows programming with help of MFC requires long learning curve. The result is you have much more control over application behavior than in higher level languages. (VB, C#) that make Windows works transparent.
    If you are thinking about serious programming, my advice is: if you know C++, learn how Windows work writing some applications without MFC using Windows API and after gaining some experience start using MFC.
    If you want to do some programming without it choose easier way and use VB or C#.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  7. #7
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: What to choose?

    Quote Originally Posted by Antwerpen View Post
    I would like to start a new project on Visual C++ 6.0 (I must use that)
    WHY?

    It is notoriously non-compliant (which means if ou are using it for learning, then you are NOT learning Valid C++).

    There are freely available compliant compilers.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  8. #8
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: What to choose?

    Why don't you go with an Express edition (2008). You can't develop MFC applications with it, but it's good for learning C++, if this is what you're after.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  9. #9
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: What to choose?

    Quote Originally Posted by JohnCz View Post
    Isn’t the above sentence a contradiction to:

    I do not know where did you hear this. Microsoft jusr updated MFC for VS 2008.
    Besides what is wrong with age? STL is older but I have not seen or heard anybody complaining about it.
    MFC is just a tool to make Windows programming better and without knowing how Windows OS is working, there is no much use of it. MFC also requires knowledge of the C++ and OOP.
    I hear most complains about MFC from people who do not know it.
    To learn Windows programming in general and Windows programming with help of MFC requires long learning curve. The result is you have much more control over application behavior than in higher level languages. (VB, C#) that make Windows works transparent.
    If you are thinking about serious programming, my advice is: if you know C++, learn how Windows work writing some applications without MFC using Windows API and after gaining some experience start using MFC.
    If you want to do some programming without it choose easier way and use VB or C#.
    Hang around here long enough and you pick up little head-scratchers regarding MFC....that's what I'm mostly referring to. Things like popping up a message box as an error-handling technique; I saw somewhere that some class or other did that by default. Just weird.

  10. #10
    Join Date
    Oct 2005
    Location
    Minnesota, U.S.A.
    Posts
    680

    Re: What to choose?

    MFC has a lot of quirks, but so does .NET and several other wrapper packages. The nice thing about MFC over many of the others (especially .NET) is that it allows you to have either little or a lot of control over what the program is doing under the hood. It is also MUCH older and more developed, it has been around since Windows 3.1 and VisualC++ 1.5. That is nearly 20 years (19 to be exact).

    If you want to learn true blue C++, use Linux and gcc.

    Microsoft (like usual) has modified the language to suit their own purposes, eg. Windows development. But, it really isn't that much different, especially after VisualC++ 2005 which conformed more to the ANSI spec. (All of us who declare vars in for() loops learned that!)

    We have all diverged from the original question however. If it is a beginner with a boss making him use an older version of VC (6.0), then what he can do is create a console app, test his routines using standard stdio, then afterwards create a Windows app and cut and paste. Of course this approach will not work with .NET since .NET requires all sorts of changes in the code, but any of the traditional Windows programming methods will work, either MFC or even a raw C Windows app. If Antwerpen can find one of the old "Windows Programming" books from MS press, he should be all set. Converting from command line stdio to GUIs is convered there.

    -Erik

  11. #11
    Join Date
    Aug 2007
    Posts
    63

    Re: What to choose?

    Thanks to all for your answers & sorry if I didn't answered soon.
    Actually I am able to program in C++ (OOP & stuff like that) and I am quite good to use STL and other pretty things. I also started to read some articles on MFC and I implemented some simple things and I like it
    Surely I want to learn the managing of threads and MFC in more detail.
    I had to use VC++ 6.0 because my company gave me just that and I needed no more (also if it has many little bugs). Right now I should find a way to upgrate to VS 2008 (is it possible and how?) or install it from zero.
    Thanks to all for the experiences and knowledge sharing!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured