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.
  • N Nish Nishant

    Kant wrote: I think b'cos of doc/view architecture. But you can have an SDI app without doc/view architecture. 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
    Reno Tiko
    wrote on last edited by
    #8

    It takes a little more time (not a lot, but still) to remove the doc/view stuff out. Plus I think dialog based apps look much better and cooler than the SDI & FormView combo due to the recessed border look it has versus the "popout" borders of a dialog app.

    C 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
      Shog9 0
      wrote on last edited by
      #9

      '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 1 Reply Last reply
      0
      • R Reno Tiko

        It takes a little more time (not a lot, but still) to remove the doc/view stuff out. Plus I think dialog based apps look much better and cooler than the SDI & FormView combo due to the recessed border look it has versus the "popout" borders of a dialog app.

        C Offline
        C Offline
        Chris Richardson
        wrote on last edited by
        #10

        Just FYI, you can add this code to the CFormView derived class's OnInitialUpdate function to remove the "recessed" border on the SDI app:

        ModifyStyleEx( WS_EX_CLIENTEDGE, 0, SWP_DRAWFRAME );

        Chris Richardson You can stash and you can seize In dreams begin, responsibilities
        U2 - Acrobat[^]
        Stop being PC and accounting for everyone and his momma's timeframe. Just enjoy your :beer: - Rohit Sinha in the content-challenged thread

        R 1 Reply Last reply
        0
        • N Nish Nishant

          Kant wrote: I think b'cos of doc/view architecture. But you can have an SDI app without doc/view architecture. Nish


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

          K Offline
          K Offline
          Kant
          wrote on last edited by
          #11

          Nishant S wrote: But you can have an SDI app without doc/view architecture. It's doable, but number of things you need to take care first. Are we smelling new article Nish? ;) In my case, I always use Dialog based app to test any new code, instead of adding it directly into my existing 20,000+ lines project. Don't :beer: and drive.

          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]

            B Offline
            B Offline
            Brad Jennings
            wrote on last edited by
            #12

            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 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
              Roger Wright
              wrote on last edited by
              #13

              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 1 Reply Last reply
              0
              • K Kant

                Nishant S wrote: But you can have an SDI app without doc/view architecture. It's doable, but number of things you need to take care first. Are we smelling new article Nish? ;) In my case, I always use Dialog based app to test any new code, instead of adding it directly into my existing 20,000+ lines project. Don't :beer: and drive.

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

                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 P 2 Replies Last reply
                0
                • 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
                                          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