Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Why do MFC programmers love dialog based apps so much?

Why do MFC programmers love dialog based apps so much?

Scheduled Pinned Locked Moved The Lounge
csharpc++htmlcomquestion
55 Posts 24 Posters 60 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Brad Jennings

    Hmm...that's kindof weird, I use SDI all the time.:) "You're mom is nice. Mind if I go out with her?" - Jörgen Sigvardsson

    N Offline
    N Offline
    Nish Nishant
    wrote on last edited by
    #15

    Brad Jennings wrote: I use SDI all the time Cool. An exception is always nice to see amongst a sea of rules. Nish


    Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

    1 Reply Last reply
    0
    • S Shog9 0

      'cause dialog apps work as advertised. You ask for a dialog, the wizard gives you a dialog. You ask for another one, it gives you another one. You want controls? Automation? Done and done. The SDI app however, requires you to understand the complex interelations of major portions of MFC before you can get the whole benefit from it. I've many memories of struggling with MFC while beginning, often implementing complex work-arounds for misunderstood (often because of poor documentation, though with the source available i'd put it down mostly to laziness/lack of time) MFC features. You ask for the SDI app, you get the app. You ask for a view, the wizard goes "uh, yeah... here's your view class... no it isn't attached to the rest of the app in any way... um, have fun!". And the thing is, for many small apps MFC's doc/view implementation is far too cumbersome for it to make sense dealing with it. A coder will use some sort of light system cooked up on the fly, and expand it over time to meet new needs. This "love it or leave it" design is MFC's second greatest flaw, IMHO (the first being all those lame control wrappers). ---

      Not one of them, IMO, should be called beer. Maybe malt flavored mineral water. - Jörgen Sigvardsson on Bud, Coors and Miller

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #16

      When Shog makes a serious post you better read it. Good post Josh H. Nish


      Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

      1 Reply Last reply
      0
      • R Roger Wright

        I've never succeeded in completing an SDI project; in very short order the difficulty and complexity so far exceeds the task at hand that it becomes meaningless to pursue. In the long run the whole task is easier to do with a pencil and paper. The dialog, on the other hand, offers a quick, effective solution that doesn't bury the objective in trivia. "Please don't put cigarette butts in the urinal. It makes them soggy and hard to light" - Sign in a Bullhead City, AZ Restroom

        N Offline
        N Offline
        Nish Nishant
        wrote on last edited by
        #17

        :-( So you are on the Dialog-app-for-all-purposes lovers side eh, Rog? Nish


        Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

        R 1 Reply Last reply
        0
        • M Marc Clifton

          Maybe because with an SDI app you have screw around with a derived CFrameWnd, a derived CFormView, and deal with the idiotic (in my opinion) document/view architecture, either ignoring it (which isn't easy, BTW) or using it (which isn't smart, in my book), whereas a CDialog is simpler because MFC and the high school kids that wrote it don't get as much in the way of doing what you really want to do, which is get something working, instead of cursing at Microsoft's subversive plot to bog all programmers down in the quagmire of MFC while they (Microsoft) take over the world writing code in Pascal??? http://www.pseudodictionary.com/ramblerant[^] :-D Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
          Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
          Every line of code is a liability - Taka Muraoka
          Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

          C Offline
          C Offline
          ColinDavies
          wrote on last edited by
          #18

          Heh I agreed with every thing up till the last line !! Pascal ?? I hope you are not serious ? Regardz Colin J Davies

          Sonork ID 100.9197:Colin

          Warning Link to the minion's animation, do not use. It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox

          N R M 3 Replies Last reply
          0
          • N Nish Nishant

            Kant wrote: Are we smelling new article Nish? Maybe after June :-) Though I dunno how many people are still interested enough in MFC! :~ Nish


            Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

            R Offline
            R Offline
            Rohit Sinha
            wrote on last edited by
            #19

            Lots of Nish, lots of us. :)
            Regards,

            Rohit Sinha

            ...celebrating Indian spirit and Cricket. 8MB video, really cool!

            N 1 Reply Last reply
            0
            • N Nish Nishant

              So often you see people develop a dialog based app, then they add a menu to it, a status bar, make it resizable, make it scrollable, put a view inside it, add a document save-load option etc... Then why did they even go for a dialog based app? What they needed was an SDI app with a CFormView derived view. It's amazing how they take a dialog app and do everything to try and make it behave like an SDI app :-) Nish


              Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

              J Offline
              J Offline
              Joe Woodbury
              wrote on last edited by
              #20

              It's a combination of poor planning, trying to be quick and ignorance. I've used dialog based apps for a few appropriate applications, but mostly I use SDI. (Stripping out Document/View is a piece-of-cake, but pointless. If you don't want it, ignore it.) Nishant S wrote: It's amazing how they take a dialog app and do everything to try and make it behave like an SDI app That's what drives me nuts, especially when they wonder why such-and-such a feature "doesn't work right" and bug me. Or they post a tricky question on a board and don't explain that they are doing a dialog based app so none of your suggestions will work. I've also wondered if some colleges (among the few that teach MFC) are too lazy to teach anything complex about MFC so cop-out and just use dialog based apps.

              N 1 Reply Last reply
              0
              • N Nish Nishant

                So often you see people develop a dialog based app, then they add a menu to it, a status bar, make it resizable, make it scrollable, put a view inside it, add a document save-load option etc... Then why did they even go for a dialog based app? What they needed was an SDI app with a CFormView derived view. It's amazing how they take a dialog app and do everything to try and make it behave like an SDI app :-) Nish


                Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                S Offline
                S Offline
                Stephane Rodriguez
                wrote on last edited by
                #21

                From what I have seen, reasons are : - WIN32-style app programming heritage - fear that the CView-derived objects are such odd objects that it removes a lot of freedom, likely to prevent you from doing what you are expected. MSDN doesn't make clear enough the fact that the CView class derives CWnd.

                N 1 Reply Last reply
                0
                • R Rohit Sinha

                  Lots of Nish, lots of us. :)
                  Regards,

                  Rohit Sinha

                  ...celebrating Indian spirit and Cricket. 8MB video, really cool!

                  N Offline
                  N Offline
                  Nish Nishant
                  wrote on last edited by
                  #22

                  Rohit  Sinha wrote: Lots of Nish, lots of us. :confused: Nish


                  Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                  R 1 Reply Last reply
                  0
                  • M Marc Clifton

                    Maybe because with an SDI app you have screw around with a derived CFrameWnd, a derived CFormView, and deal with the idiotic (in my opinion) document/view architecture, either ignoring it (which isn't easy, BTW) or using it (which isn't smart, in my book), whereas a CDialog is simpler because MFC and the high school kids that wrote it don't get as much in the way of doing what you really want to do, which is get something working, instead of cursing at Microsoft's subversive plot to bog all programmers down in the quagmire of MFC while they (Microsoft) take over the world writing code in Pascal??? http://www.pseudodictionary.com/ramblerant[^] :-D Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
                    Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
                    Every line of code is a liability - Taka Muraoka
                    Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

                    R Offline
                    R Offline
                    Rob Manderson
                    wrote on last edited by
                    #23

                    Gee Marc, tell us what you really think ;) Rob Manderson http://www.mindprobes.net

                    N 1 Reply Last reply
                    0
                    • J Joe Woodbury

                      It's a combination of poor planning, trying to be quick and ignorance. I've used dialog based apps for a few appropriate applications, but mostly I use SDI. (Stripping out Document/View is a piece-of-cake, but pointless. If you don't want it, ignore it.) Nishant S wrote: It's amazing how they take a dialog app and do everything to try and make it behave like an SDI app That's what drives me nuts, especially when they wonder why such-and-such a feature "doesn't work right" and bug me. Or they post a tricky question on a board and don't explain that they are doing a dialog based app so none of your suggestions will work. I've also wondered if some colleges (among the few that teach MFC) are too lazy to teach anything complex about MFC so cop-out and just use dialog based apps.

                      N Offline
                      N Offline
                      Nish Nishant
                      wrote on last edited by
                      #24

                      Joe Woodbury wrote: It's a combination of poor planning, trying to be quick and ignorance. Exactly my thoughts on this. Though I'd put "ignorance" before "poor planning" Joe Woodbury wrote: I've also wondered if some colleges (among the few that teach MFC) are too lazy to teach anything complex about MFC so cop-out and just use dialog based apps. Not just colleges. I guess most of the MFC books primarily focus on dialog based apps. And for people who have done VB before, dialog based apps are easier to digest than SDI/MDI Nish


                      Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                      1 Reply Last reply
                      0
                      • R Rob Manderson

                        Gee Marc, tell us what you really think ;) Rob Manderson http://www.mindprobes.net

                        N Offline
                        N Offline
                        Nish Nishant
                        wrote on last edited by
                        #25

                        Rob Manderson wrote: Gee Marc, tell us what you really think LOL Rob, I think you just silenced the un-silencable Marc Clifton. Nish


                        Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                        M 1 Reply Last reply
                        0
                        • C ColinDavies

                          Heh I agreed with every thing up till the last line !! Pascal ?? I hope you are not serious ? Regardz Colin J Davies

                          Sonork ID 100.9197:Colin

                          Warning Link to the minion's animation, do not use. It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox

                          N Offline
                          N Offline
                          Nish Nishant
                          wrote on last edited by
                          #26

                          Colin Davies wrote: Pascal ?? I hope you are not serious ? Pascal sucks! I always disliked it's syntax! Nish


                          Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                          1 Reply Last reply
                          0
                          • S Stephane Rodriguez

                            From what I have seen, reasons are : - WIN32-style app programming heritage - fear that the CView-derived objects are such odd objects that it removes a lot of freedom, likely to prevent you from doing what you are expected. MSDN doesn't make clear enough the fact that the CView class derives CWnd.

                            N Offline
                            N Offline
                            Nish Nishant
                            wrote on last edited by
                            #27

                            .S.Rod. wrote: - WIN32-style app programming heritage How so? I dont think Win32/SDK coding was dialog-oriented at all! .S.Rod. wrote: fear that the CView-derived objects are such odd objects that it removes a lot of freedom This is a very likely reason. .S.Rod. wrote: MSDN doesn't make clear enough the fact that the CView class derives CWnd Oh! I never noticed that. I always took for granted that everyone would assume CWnd inheritance for CView, CDialog etc... Nish


                            Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                            R S S 3 Replies Last reply
                            0
                            • N Nish Nishant

                              .S.Rod. wrote: - WIN32-style app programming heritage How so? I dont think Win32/SDK coding was dialog-oriented at all! .S.Rod. wrote: fear that the CView-derived objects are such odd objects that it removes a lot of freedom This is a very likely reason. .S.Rod. wrote: MSDN doesn't make clear enough the fact that the CView class derives CWnd Oh! I never noticed that. I always took for granted that everyone would assume CWnd inheritance for CView, CDialog etc... Nish


                              Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                              R Offline
                              R Offline
                              Rob Manderson
                              wrote on last edited by
                              #28

                              I'm sometimes surprised when people don't check the derivations. I once watched a colleague spend an afternoon trying to implement serialisation for a class derived from CString (god knows why) and driving himself nuts trying to work out why the compiler kept spitting out 'unfriendly' error messages. Eventually I took pity and told him that CString ain't derived from COBject, therefore the whole serialisation framework is missing key pieces. Thing is, the source code is there, the headers are certainly there, why not take a look sometimes? Rob Manderson http://www.mindprobes.net

                              J 1 Reply Last reply
                              0
                              • N Nish Nishant

                                So often you see people develop a dialog based app, then they add a menu to it, a status bar, make it resizable, make it scrollable, put a view inside it, add a document save-load option etc... Then why did they even go for a dialog based app? What they needed was an SDI app with a CFormView derived view. It's amazing how they take a dialog app and do everything to try and make it behave like an SDI app :-) Nish


                                Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                                R Offline
                                R Offline
                                Rob Manderson
                                wrote on last edited by
                                #29

                                My own rule of thumb is, if I need a menu I'll use SDI - if I don't then I'll probably use a dialog. I seem to remember being burned way back when (sometime in 1991) by trying to attach a menu to a dialog and having all sorts of painting problems. Sometimes when I'm feeling especially virtuous I'll use doc/view but the way it's implemented means you sometimes have to give both the document and the view special knowledge about each other - and if I have to do that then why bother with that framework? Rob Manderson http://www.mindprobes.net

                                1 Reply Last reply
                                0
                                • N Nish Nishant

                                  Rohit  Sinha wrote: Lots of Nish, lots of us. :confused: Nish


                                  Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                                  R Offline
                                  R Offline
                                  Rohit Sinha
                                  wrote on last edited by
                                  #30

                                  Er, sorry, I meant to say, "Lots of us Nish, lots of us." :) Typo. :-O
                                  Regards,

                                  Rohit Sinha

                                  ...celebrating Indian spirit and Cricket. 8MB video, really cool!

                                  N 1 Reply Last reply
                                  0
                                  • R Rohit Sinha

                                    Er, sorry, I meant to say, "Lots of us Nish, lots of us." :) Typo. :-O
                                    Regards,

                                    Rohit Sinha

                                    ...celebrating Indian spirit and Cricket. 8MB video, really cool!

                                    N Offline
                                    N Offline
                                    Nish Nishant
                                    wrote on last edited by
                                    #31

                                    Rohit  Sinha wrote: Er, sorry, I meant to say, "Lots of us Nish, lots of us." It's okay :-) I just thought it was one of your Rohit-special jokes and thought hard for 2 minutes trying to figure it out :-) Nish


                                    Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                                    1 Reply Last reply
                                    0
                                    • C ColinDavies

                                      Heh I agreed with every thing up till the last line !! Pascal ?? I hope you are not serious ? Regardz Colin J Davies

                                      Sonork ID 100.9197:Colin

                                      Warning Link to the minion's animation, do not use. It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox

                                      R Offline
                                      R Offline
                                      Ryan Binns
                                      wrote on last edited by
                                      #32

                                      Haven't you noticed that the Windows API uses the Pascal calling convention? It must be because Windows is written in Pascal... :P Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)

                                      C 1 Reply Last reply
                                      0
                                      • N Nish Nishant

                                        :-( So you are on the Dialog-app-for-all-purposes lovers side eh, Rog? Nish


                                        Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                                        R Offline
                                        R Offline
                                        Roger Wright
                                        wrote on last edited by
                                        #33

                                        Nishant S wrote: Dialog-app-for-all-purposes lovers side I didn't know there was such a side. I'm on the side that let's me get a job done without causing more work than the job is worth. Dialogs get the job done without wasting 90% of my time on trivial details. If I ever find something that I need to code that can't be done with a dialog, I'll consider SDI, but it will have to be something far more complex than anything I've ever needed before to make me waste my time again trying to make it work. "Please don't put cigarette butts in the urinal. It makes them soggy and hard to light" - Sign in a Bullhead City, AZ Restroom

                                        1 Reply Last reply
                                        0
                                        • C Chris Maunder

                                          Poor planning. cheers, Chris Maunder

                                          M Offline
                                          M Offline
                                          Masaaki Onishi
                                          wrote on last edited by
                                          #34

                                          Hello, the CPians around the world. ;) Chris Maunder wrote: Poor planning. Humm, I don't believe that Chris Maunder wrote this answer.:eek: Simply saying, if we keep using only dialog base application by MFC, this wastes time so much. Try to use VB to do this unless we don't use C or C++ library. :omg: If we write SDI or MDI by MFC very well, the dialog is only used to set the property of some data, I believe. Otherwise, we never feel the beauty of MFC. (I don't read the other's message in detail, so ...?) -Masaaki Onishi (eCoolSoft)- ASP.NET Web and Windows Application Development by C# and MFC. eCoolWebPanelBar(BETA) is availabe now. http://www.ecoolsoft.com

                                          C 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups