Visual C++ vs. All other Environments ??
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 3 123 LastLast
Results 1 to 15 of 32

Thread: Visual C++ vs. All other Environments ??

  1. #1
    Join Date
    Jul 2009
    Posts
    8

    Exclamation Visual C++ vs. All other Environments ??

    hi,
    I used Dev C++, then switched to Codeblocks, but I'm having nothing but problems with it, lots of bugs on Vista.
    I just watched a tutorial on Microsoft Visual C++ and was blown away !
    you can just click on tools and it adds all the code for you.... and actually SHOWS what you're making WHILE you make it....
    do any other programs do that ? does codeblocks do that if I could get it to work ?

    so far, all the ones I've tried are straight up code editors and don't " show " what your doing in real time.... and don't have these tools to just add features to your windows...
    is this true ? is Visual Studio the only one that does that ? can codeblocks do that ?

    thank you all very much in advance.

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Fairfax, VA
    Posts
    10,888

    Re: Visual C++ vs. All other Environments ??

    I'm not a fan of that sort of "drag and drop" GUI design. I mean, it's great for prototyping, but I like knowing what code is in my program.

  3. #3
    Join Date
    Apr 1999
    Posts
    27,427

    Re: Visual C++ vs. All other Environments ??

    Quote Originally Posted by Dr.ticklefish View Post
    I just watched a tutorial on Microsoft Visual C++ and was blown away ! you can just click on tools and it adds all the code for you....
    "Point and click" programming may be OK if you're already experienced in Windows programming, but you can't learn to actually write programs using that method.

    I could understand if you're experienced in Windows programming, and the automatic code generation makes your work easier. For example, the resource editor allows you to define menus and dialogs, and I use it all the time. But at the same time, I know what a resource file is, what the different components of one are, and if need be, I can edit one so that I can fix problems on the fly. Code generation is another one -- I usually use the project wizard to create MFC classes, but again, if the time comes I need to actually fix or add some code, I know exactly where to go, how to debug the code, and how to properly fix/enhance the code.

    If you don't know what you're doing and your just "clicking away" to create your programs, you are in a big deal of hurt if you ever need to fix a bug, add something customized, or just in general, what the heck you've just produced (in terms of code).

    As an indication, look at the thousands of posts from persons here who have gone the route of not learning proper programming, and instead used the "point and click" approach of creating a program. Most of them ask the most basic C++ questions as to how to fix their problem, fix a bug, make a variable accessible in a class, etc. All questions that are answered within the first chapter or two of any C++ book.

    Regards,

    Paul McKenzie

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

    Re: Visual C++ vs. All other Environments ??

    Quote Originally Posted by Paul McKenzie View Post
    "Point and click" programming may be OK if you're already experienced in Windows programming, but you can't learn to actually write programs using that method.
    Hear, Hear!

  5. #5
    Join Date
    Nov 2006
    Posts
    1,611

    Re: Visual C++ vs. All other Environments ??

    I'm in agreement with Lindley, and as you might expect have another 2 cents worth on that point.

    First, I'll admit I find the Visual Studio IDE and it's C++ compiler to be first rate. Nothing is perfect, but the VS debugger, the editor and it's tabbed interface make a combination that's hard to match in a single product.

    I'm from the era before debuggers were widely available (well, just before). I've watched the tools advance, as well as the languages.

    I have no idea which video you saw, but I can expect the focus was on .NET, even if not explicitly stated. VS 'wizards' for MFC, combined with the dialog editor, do essentially what you saw, but it's not magic. The benefit is quite limited. For someone not all that familiar with MFC it is like 'automated documentation/skeletal application starter' service. You want to add a button, so instead of looking that up in the manual and creating the response function in the appropriate class, the editor does that, connecting the control you've painted to the code responding to it and puts the cursor on the first empty line of the response function so you can begin coding.

    It's nice at first, and some people do depend upon it, but it's a crutch IMO.

    If you do anything outside the conventions of the wizards (and sometimes it seems to hiccup even if you don't), the whole thing breaks down like a house of cards. Perhaps it's better in VS2008, I've not tried, but since VC6 and all through VS2005, there was this annoying tendency for it to get a little confused, sometimes refusing to allow control/code linkage, not having appropriate response message options to add - it's actually quite restrictive.

    It's also very MFC/Windows/.NET centric (depending on which targets you're making). The results aren't portable, and while it's easy to dismiss that requirement for a range of products, there are other ideas that may be of interest to you.


    I did something long ago that Adobe did in their development strategy (I can't say which came earlier, Adobe was secretive about this for some time). Adobe created "Adam" and "Eve", two interface ideas that when combined allow one to develop cross platform dialog resources. It takes quite a change of mindset, because you basically give up some control (the system formats dialogs for you, not the other way around, basically). The results look native in the target OS (consider looking at Photoshop on Apple and then on Windows - neither are in MFC, nor QT, nor wxWidgets, to my knowledge).

    Most of the other frameworks, QT, wxWidgets, etc. have some form of resource editing/scripting and a convention for connecting resource to code. The adobe approach is interesting (and I have to go from vague memory here, I might be projecting my own approach) in that the definition of the dialog resource is also the code mapping.

    In my own work I created a dialog mechanism for GUI work. It's independent such that I've used in wxWidgets, QT and MFC (the backend is portable). The dialogs can be 'hosted' on standard popup/modeless/modal dialog windows, or as panes in dockable panels, or as main or portions of main windows in MDI or tabbed dialog host frames.

    When I create a dialog it's via a dialog context (it's named, some data definitions might be provided from code as a start). The context is placed into a host (popup dialog, mdi child, tab, etc. The context is initially empty, like an empty dialog resource in VS.

    I compile and run this 'empty' application and run the dialog, in a designer build (the designer portions are optional compilation units). When I launch that dialog, it's blank, and I enter a designer mode within the running application. I paint the dialog from there. This painting isn't done in an IDE or development tool, it's done in the skeletal application.

    As I add controls, they're connected to representative data sources as appropriate. Sources of data include application supplied configuration data (user options dialogs), XML data, SQL data, other binary sources, etc. Within the dialog editor I can add "fields" which will become SQL columns, XML fields, etc.

    If I don't have any other specialized work to do (say this dialog is just collecting a client record, for example) - that may be all the work there is to do. The context connected to a SQL table, for example - added columns to the SQL table's definition, if I requested that - allowed me to select form SQL columns from that table (and of course, this all involves related tables) - in other words I'm not just focused on tying controls to empty code.

    The whole concept stores the dialog in XML data, which can be transported by SQL if required. This means that the UI of the application can be stored in SQL, transported with a user by identity to any workstation they use, and can be tailored for each identity or group. In other words, for a multi-user corporate application, each person might have a different view of the GUI/Data.

    Long ago I realized about the 3rd dialog I made, I was repeating myself. Instead of letting that go on, I analyzed what I was doing, made that code part of a framework, and now they're selectable control/feature/data connection options in an editor that might as well be a stand alone dialog creating engine.

    The controls can be attached to messages which allow for validation functions, message responses (commands, etc), other I/O, custom controls (which usually get added to the library, so custom becomes fewer and fewer over time) - etc.

    In other words, I'll continue to develop in C++ as I design the dialog, and the connection between the two may be through response functions/functors/classes which apply only to those controls with genuinely unique requirements. I find it more productive than the wizards of VS. I haven't had the inclination to wrap it into a product, but it's not all that tough to do.

    In the 90's, when I first put this together, it took a few weeks to get the basic idea going, but then it accumulated over the span of my career.

    I got the idea by meeting one of the people who worked at PARC in the creation of the first Windowed OS/Computer system - the Alto, from which Jobs and Gates were inspired. The lessons from that Xerox system have yet to be fully realized - the GUI interface was about 1/3 of the genuinely important invention of that project. The notion of programmable controls and objects are among them.

    Anyway, I've gone far off the end - VS is good stuff, but not the pinnacle. We actually should research the history of the Alto - some gems are still in there somewhere. It was based on object oriented LISP, and all the interface elements were objects (according to the person I had the fortune of working with briefly) - all in the mid 70's.
    Last edited by JVene; July 12th, 2009 at 12:30 PM.
    If my post was interesting or helpful, perhaps you would consider clicking the 'rate this post' to let me know (middle icon of the group in the upper right of the post).

  6. #6
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,286

    Re: Visual C++ vs. All other Environments ??

    I have a bit different perspective and view knowing the MFC wizards as part of the learning curve.

    Sure, you can't really learn the underlying code if you start out by only relying on the wizards, but once you've progressed past the initial learning stages, then there is much to be gained by using the wizards and following MFC convention.

    I kind of view it like the same as following code style guidelines within a team. Too often I see coders go off and try to create MFC code from scratch only to miss details and cause problems later (then of course complain because MFC 'was broken').

    Of course, I'm not talking about the coder that blindly uses the wizards without understanding what code the wizards generated and how the generated code works.

    As far as portability, I have to respectfully disagree. If the developer has a requirement to code on a variety of platforms, then he/she may want to use frameworks that are platform agnostic.

    However, there are many projects out there that only target a single platform [family] and aren't ever realistically going to be migrated to another platform. To me, using non-targeted frameworks is just extra overhead because the frameworks must code to the lowest common features of the target OS's or incur added complexity from special casing. Imo, it's not unlike the mistake of over-generalizing every class for reuse.

  7. #7
    Join Date
    Jul 2009
    Posts
    8

    Re: Visual C++ vs. All other Environments ??

    thank you all for the insight.
    I am fairly new to C++ but I'm aware of what's going on in the code in most cases.
    I just plan to use it for fun and make little programs for my own use.
    I liked Dev C++ but was told on here to give it up because it's too old and outdated.
    I tried Codeblocks next, and liked it.... but it just won't work right on my new computer with Vista, too many bugs.
    I am willing to buy a program, but I was wondering before I spend my cash,

    #1. is Microsoft VS is the ONLY program that has a GUI wizzard that allows the drag and drop style creating ?

    #2. and can someone give me a link to download a trial version ? there seems to be tons of versions and types of builds and tools and the couple I've tried so far from Microsofts page took forever to download and run, and then don't work.

    I have Vista Home Premium with a Centrino proccessor.

    thanks

  8. #8
    Join Date
    Apr 1999
    Posts
    27,427

    Re: Visual C++ vs. All other Environments ??

    Quote Originally Posted by Dr.ticklefish View Post
    I am willing to buy a program, but I was wondering before I spend my cash,
    Well you really can't go wrong using Visual C++.
    #1. is Microsoft VS is the ONLY program that has a GUI wizzard that allows the drag and drop style creating ?
    Borland has (or had) the same type of interface. That is the only other one that I know of that had a "Visual" type of design (not using MFC but with their own proprietary classes -- VCL if I remember).

    Regards,

    Paul McKenzie

  9. #9
    Join Date
    Jul 2002
    Posts
    2,512

    Re: Visual C++ vs. All other Environments ??

    http://www.microsoft.com/express/download/default.aspx
    You can download free VC++ 2008 Express Edition. MFC is not supported, but Win32 applications are supported, including the Dialog editor and drag-and-drop...
    See more about Express Editions here: http://www.microsoft.com/express/support/faq/

    Full Visual Studio 2008 90-Day Trial:
    http://msdn.microsoft.com/en-us/visualc/bb655861.aspx

  10. #10
    Join Date
    Jul 2009
    Posts
    8

    Re: Visual C++ vs. All other Environments ??

    Hey Thanks Alex. I'll try them Both.
    I also took Pauls tip and looked into Borland. They do have one very much like MVS ,
    and it's completely free. it's called Turbo C++ and it's very similar. I'll try the MVS and see if it's that much better than Turbo C++ and worth buying. So far I'm liking Turbo C++ and it's FREE !
    thanks for the tips. If someone else wants to try Turbo C++ here's a link
    https://downloads.embarcadero.com/free/c_builder

    ( third one down the list )

    cheers

  11. #11
    Join Date
    Jul 2009
    Posts
    8

    Re: Visual C++ vs. All other Environments ??

    hey Alex,
    that's the same download page I tried a few days ago.
    The Epress VS C++ 2008 download won't work for me. It downloads Ok, then during install, it hangs at the 52MB mark and eventually quits and says installation failed.
    anyone else have this problem with this download ?
    thanks

  12. #12
    Join Date
    Jul 2009
    Posts
    8

    Re: Visual C++ vs. All other Environments ??

    the full version doesn't work either. the download manager says " error " every time.

    : (

  13. #13
    Join Date
    Jul 2002
    Posts
    2,512

    Re: Visual C++ vs. All other Environments ??

    Try this page:
    http://msdn.microsoft.com/en-us/eval.../bb633753.aspx

    According to file size, it is full installation and not WEB installer. This may be ISO image which can be burned to DVD or opened as virtual drive or archive.
    I don't use Vista, so don't have such installation problems... Do you have Administrator account?
    Turbo C++ is really free, but it is too old, this is not option, to my opinion.

    This is direct download link to VC++ Express Edition ISO file:
    http://go.microsoft.com/fwlink/?LinkId=104679
    I found it making Google search, from some reason Microsoft doesn't give this link.
    Last edited by Alex F; July 13th, 2009 at 08:32 AM.

  14. #14
    Join Date
    Apr 1999
    Posts
    27,427

    Re: Visual C++ vs. All other Environments ??

    Quote Originally Posted by Alex F View Post
    Turbo C++ is really free, but it is too old, this is not option, to my opinion.
    Borland has recently updated their compilers. This was about a year or so ago.

    If you're refering to the old Turbo 'C' from the early 1990's, then yes, that is way too old (unfortunately, it seems that many schools still use this compiler).

    Regards,

    Paul McKenzie

  15. #15
    Join Date
    Jul 2009
    Posts
    8

    Re: Visual C++ vs. All other Environments ??

    hey,
    well Alex the ISO file won't download for me either. It's not the links, it's the download manager.
    it keeps saying error. is there a way to download it without using their download manager that they provide ?

    and Turbo C++ seems to be pretty new according to their site. It seems pretty cool,
    I would really be interested in hearing from anyone out there that's good with C++ that uses MVS on a regular basis. If any of you would be willing to try Turbo C++ for writing a program or two and letting me know if it's up to par or if MVS is worth shellin' out some bucks for,
    I'd really appreciate the feedback,
    and I think it would make a good topic here in the forum as well.

    Thanks

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center