well your use of 'unavailable' hit the nail on the head for the case I was thinking of - 'client had disconnected, but port was in timeout-wait' - ergo, not technically in use .. this may be particular to the scenario/implementation I see if happen in (a lot, unfortunately)
as to more than one connection to a port, I'd have to go back to my W Richard Stevens to check - I know what we 'see' happening in a lot of cases - eg multiple connectiins to tcp://w.x.y.z:80 may not necessarily be the case - the initial connection is accepted on that port, but then 'spun off' to be handled as a seperate conversation, leaving port 80 free
I like to learning C++ with some GUI framework. After searching on Internet MFC is good native development tool for Developers but I have problem is there any value learning MFC nowadays? Because in Windows 8 application type that called Metro applications or give me some good framework to learn C++ GUI Programming
With MFC, problems that should take minutes to solve sometimes take days.
How so? I always found it very simple, and if you want part of th win32 api that isnt wrapped by MFC you just call it directly. You can edit the message map simply to add WM_XXXXX commands that arent handled by the class wizzard, and can simply modify the comnstructors to pass all kinds of data round.
The only complexity would be implementing something complex, like windows hooks or some such, but that would be the same with MFR of raw win32 API.
But I agree, learn .Net and C#, it has WAY more commercial demand. (By the way, I didnt know you can use C++ with ,Net. I am a kernel guy and dont venture into user mode that much these days.)
The consistently incomplete documentation for MFC makes it difficult to use.
Of course an MFC expert can easily use it to solve problems. But it's not user friendly to someone who's not an expert. With .NET and intellisense, you can use .NET effectively even if you don't know it very well.
A couple examples of MFC landmines that eat up the hours and days of your development time:
1. You have a CBitmap and you want to load a .bmp file from disk. How do you do it?
(HINT: CBitmap::LoadBitmap () doesn't work. How retarded is that?)
2. You see that OnDraw () is used to update windows. Fair enough. But you try to use it on a CDialog and it doesn't f***ing work!. Part B: You try to use it on a CFrameWnd and it doesn't f***ing work, but for a DIFFERENT reason!
MFC is full of garbage like this! (And I used it back in 1997 when you couldn't just go to the Internet for a quick answer.) MFC is one of the reasons I hate Microsoft!
I think it was a combination of incompetence, lack of vision, arrogance and a fear of lawsuits (for the JPG and zip stuff.)
Alan Balkany wrote:
undocumented functionality to slow them down.
Contrary to popular belief, that is very rare. Almost all undocumented functionality that is useful is actually provided through other means. Frankly, the biggest problems with Windows is the COM kick they got on in the 90s and that Microsoft engineers tend to over-engineer everything favoring complexity over simplicity (an all too common problem with all engineers.)
There is a value in MFC even this days. A lots of applications are written with MFC, and some of them(which are usually time critical or compute intence) are still will be written in MFC.
If you interested in learning MFC, the good start is Ivor Horton's "Visual C++ 2010".
That depends on what you mean by "value". If you're just thinking about its usefulness on your résumé there are probably better choices.
To the .net is better camp all I've got to say is, personally I'm glad I went from lower level programming environments and worked my way up. I think that actually knowing what's going on makes you a better programmer.
If your application is Windows specific and needs any sort of performance advantage, MFC is fantastic. Personally, I like the enhancements to it offered by CodeJock, but to each his own. People like to gripe about MFC because it doesn't have C++ purity, but who cares; it's fast and, with a few exceptions, stays out of my way (in what matters to me.)
On the other hand, for database front ends, ASP and UI applications where you are willing to give up some fine grained control, a little performance AND you are still Windows specific, .NET is the way to go. Some people here have advocated going the Silverlight route. I'm not a fan, but my work doesn't fall into the niche where Silverlight makes sense.
For cross platform, despite some its ugliness, including it's massive size and very annoying pre-compiler, Qt is probably the best bet. (WxWidgets is also worth looking into, but I'm more familiar with Qt and personally find it better going forward, though I could change my mind tomorrow.)
I do agree with a comment above; if you are just learning C++, don't bother with a GUI. Same with C#. Just use the console and try to keep the code as procedural as possible and build from there once you get the basic concepts down. To be honest, I prefer people start with C, but that may not be realistic today.
I have a picture control on a dilaog box which is contained in a property sheet. Now whenever I increase the resolution of the PC, size of the controls on my application will be same, and it will show some space to the right of the application controls when it is displayed. I can change the position of the controls but how to increase the width & height of a bitmap in mfc.
Controls size will remain same irrespective of the resolution of the monitor, rather it will show an empty space at the bottom & right of the controls ( in case ur monitor size is large and you increase the resolution).
Any help will be appreciated.
Last Visit: 31-Dec-99 18:00 Last Update: 27-Sep-23 11:27