Jump to content
  • Advertisement
Sign in to follow this  
BlackJoker

Visual studio like app on MFC

This topic is 1929 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello.

I know that new MFC has an MDI variant with VS 2008 and higher interface with almost the same features and real VS has, but I want to ask a few question regarding this:

1) Could this MFC project by default realize the same behavior for TabWindow control (central window inside app) like the real VS. I mean - that user could drag this tab window out from the main window? Or could this behavior be implemented somehow?

 

2) Is there some good books for MFC that describe work with MFC feature pack and MFC MDI application in particular?

Share this post


Link to post
Share on other sites
Advertisement

If you use something already existing for a GUI then sooner or later (Usually 48 hours) you will get stuck with something it can't do. I would just make my own GUI framework based on a frame/panel. A tree structure can store the recursive behaviour for how it resize everything according to the window. For each panel, calculate the dimensions of each child panel and tell them to resize their children. When dragging a panel, show 5 icons on each other panel where it can be released. Move it to be a new child to that panel with it's location given by the icon that you moved it to.

Share this post


Link to post
Share on other sites

Please don't use MFC for new code.

 

It's ancient, unsupported, non-idiomatic C++, and full of evil pitfalls and gotchas. It really needs to just go die in a corner somewhere.

Share this post


Link to post
Share on other sites

Please don't use MFC for new code.

 

It's ancient, unsupported, non-idiomatic C++, and full of evil pitfalls and gotchas. It really needs to just go die in a corner somewhere.

 

lol, took out the words right out of my mouth.

Edited by jbadams
Restored post contents from history.

Share this post


Link to post
Share on other sites

Please don't use MFC for new code.

 

It's ancient, unsupported, non-idiomatic C++, and full of evil pitfalls and gotchas. It really needs to just go die in a corner somewhere.

 

I really wish Microsoft would create an appropriate replacement for it. I always wondered why C++ didn't get some sort of WinForms library. Then again, these days things like Qt are around. 

Share this post


Link to post
Share on other sites

Please don't use MFC for new code.

 

It's ancient, unsupported, non-idiomatic C++, and full of evil pitfalls and gotchas. It really needs to just go die in a corner somewhere.

It's not that terrible. If you only want to target Windows, it's perfectly fine. MFC is structurally pretty much like wxWidgets, but I never hear people complaining about that being evil.

 

In fact, you can save lots of time, as the OP is attempting to do, by using some of the ready-made stuff in MFC. It's pretty easy to set up a GUI that works exactly like some common MS programs (office, VS) and be done with it.

Share this post


Link to post
Share on other sites

It's not that terrible.

Yes, it bloody is. Take it from someone who's worked professionally with it for over a decade.

If you only want to target Windows, it's perfectly fine.

So if you're only targeting windows, why wouldn't you use the infinitely better winforms?

MFC is structurally pretty much like wxWidgets, but I never hear people complaining about that being evil.
 
In fact, you can save lots of time, as the OP is attempting to do, by using some of the ready-made stuff in MFC. It's pretty easy to set up a GUI that works exactly like some common MS programs (office, VS) and be done with it.

Yes, and if you have a legacy code base that uses MFC, that is exactly what you should do. If you're writing new code, use something else and leverage the huge library of code for that.

Share this post


Link to post
Share on other sites

Yes, it bloody is. Take it from someone who's worked professionally with it for over a decade.

I'm glad that you are talking from experience. Most people who shout "MFC sucks" have never used it extensively. I used to be one of those people myself.

I have worked with it professioanlly for six years. I have alwo worked with other toolkits. They all have quirks that make them suck in some way. Often these ways of suckage are the same as in MFC. Perhaps you could elaborate on what aspects of MFC it is that you think makes it suck so much more than other toolkits?

So if you're only targeting windows, why wouldn't you use the infinitely better winforms?

There could be lots of reasons. Perhaps you want write all of your program in one language? It's not like it's an order of magnitude more difficult to use MFC than to use winforms.

Yes, and if you have a legacy code base that uses MFC, that is exactly what you should do. If you're writing new code, use something else and leverage the huge library of code for that.

I am not completely against using MFC for new projects today. It does make certain types of UI a lot easier to create than any other toolkit. Also, unlike what was claimed in this thread, MFC is just as supported as any other library that comes with Visual Studio, and it is still being actively developed. There also exists excellent third-party components (BCGsoft, CodeJock) for it that have been refined for a very long time, and contain some stuff that really doesn't exist for other toolkits.

Of course, it would not be my first choice, but if the situation and type of application is such that using MFC could save a lot of time, I would at least seriously consider it. Shipping on time is a nice feature to have. Edited by wack

Share this post


Link to post
Share on other sites

Of course, it would not be my first choice, but if the situation and type of application is such that using MFC could save a lot of time, I would at least seriously consider it. Shipping on time is a nice feature to have.

While I agree that business concerns trumps technical concerns, I'd struggle to imagine any situation where a new project would be better written in MFC than another language/toolkit/framework. The only one I can think of would be if you were doing a small urgent project and MFC was the main skillset on your team.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!