Why do MFC programmers love dialog based apps so much?
-
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]
-
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]
Poor planning. cheers, Chris Maunder
-
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]
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" -
Poor planning. cheers, Chris Maunder
Chris Maunder wrote: Poor planning. Uhm yeah that's prolly one of the reasons. But another reason could be that a lot of people are scared that an SDI app might be too complex to handle. But in the end they end up with a dialog app far more complex and very difficult to maintain than perhaps an MDI app. Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
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"Marc Clifton wrote: and deal with the idiotic (in my opinion) document/view architecture But you can have an SDI app without doc/view support. And just whats bad about a CFrameWnd derived class? How is it any worse than a CDialog class? Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
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]
-
Nishant S wrote: Then why did they even go for a dialog based app? I think b'cos of doc/view architecture. Don't :beer: and drive.
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]
-
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]
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.
-
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]
'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
-
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.
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 -
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]
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.
-
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]
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
-
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]
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
-
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.
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]
-
'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
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]
-
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
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]
-
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
:-( 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]
-
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"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
-
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]
Lots of Nish, lots of us. :)
Regards,Rohit Sinha
...celebrating Indian spirit and Cricket. 8MB video, really cool!
-
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]
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.