MFC for the WinForms developer?
-
My plans for tomorrow include poking around with the codebase for an old MFC app that I'll be doing some updates to later. It's been over a decade since I last toyed with MFC though; and I never used it heavily then. As a result I'm not really sure what the workflow/execution path for MFC dialogs is, or how all of the "magic" works anymore. A good refresher tutorial would be helpful if anyone knows of one.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
Dan Neely wrote:
or how all of the "magic" works anymore.
Crazy declarative syntax that wires up low level Window's messages to C++ class functions that it binds to. Can't remember how, though I even wrote one of those things 30 years ago when I discovered that Borland had a cool way of doing it but Microsoft hadn't caught on yet. Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
-
Dan Neely wrote:
or how all of the "magic" works anymore.
Crazy declarative syntax that wires up low level Window's messages to C++ class functions that it binds to. Can't remember how, though I even wrote one of those things 30 years ago when I discovered that Borland had a cool way of doing it but Microsoft hadn't caught on yet. Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
BEGIN_MESSAGE_MAP(CMyDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
ON_WM_CLOSE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()Time to put on some CCR and Grateful Dead on the record player and share stories of the good old days. :-D /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
That's more or less what I saw, other than not scrolling down to the bottom to see the code listing. The way the chunk of text (and a few others below it) read, I was expecting to see code snippets interspersed between them.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
-
Dan Neely wrote:
or how all of the "magic" works anymore.
Crazy declarative syntax that wires up low level Window's messages to C++ class functions that it binds to. Can't remember how, though I even wrote one of those things 30 years ago when I discovered that Borland had a cool way of doing it but Microsoft hadn't caught on yet. Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
Marc Clifton wrote:
Crazy declarative syntax that wires up low level Window's messages to C++ class functions that it binds to. Can't remember how,
That's about the extent of my recollection too.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
-
BEGIN_MESSAGE_MAP(CMyDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
ON_WM_CLOSE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()Time to put on some CCR and Grateful Dead on the record player and share stories of the good old days. :-D /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
Ravi Bhavnani wrote:
Time to put on some CCR and Grateful Dead on the record player and share stories of the good old days.
Ah, vinyl and amplifiers that actually had tubes. :) Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
-
My plans for tomorrow include poking around with the codebase for an old MFC app that I'll be doing some updates to later. It's been over a decade since I last toyed with MFC though; and I never used it heavily then. As a result I'm not really sure what the workflow/execution path for MFC dialogs is, or how all of the "magic" works anymore. A good refresher tutorial would be helpful if anyone knows of one.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
-
That's about the right era, if perhaps a single generation early; the people who brought it to us were running it on an NT4(!) box. Was it any good...
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
-
My plans for tomorrow include poking around with the codebase for an old MFC app that I'll be doing some updates to later. It's been over a decade since I last toyed with MFC though; and I never used it heavily then. As a result I'm not really sure what the workflow/execution path for MFC dialogs is, or how all of the "magic" works anymore. A good refresher tutorial would be helpful if anyone knows of one.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
MFC is still mostly the same. If I remember correctly, the resource wizard was removed in VS2003 and VS2005 (?), but was re-added later on. The latest version (implementation) is a little bit more C++ compliant; but there is still a lot of gunk in there. The new controls (if you have VS2008 or a newer versions) are nice and offer a number of more modern controls (the MFC Feature Pack)
I'd rather be phishing!
-
MFC is still mostly the same. If I remember correctly, the resource wizard was removed in VS2003 and VS2005 (?), but was re-added later on. The latest version (implementation) is a little bit more C++ compliant; but there is still a lot of gunk in there. The new controls (if you have VS2008 or a newer versions) are nice and offer a number of more modern controls (the MFC Feature Pack)
I'd rather be phishing!
I'll keep that in mind if we end up doing a major UI update. Multiple small windows floating around the main dialog is far from my favorite UI paradigm. X| What we're going to do now that my PM (who used to be an MFC dev back in the day) got it building in VS2010 and fixed all of the compiler warnings is still rather up in the air.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
-
MFC is still mostly the same. If I remember correctly, the resource wizard was removed in VS2003 and VS2005 (?), but was re-added later on. The latest version (implementation) is a little bit more C++ compliant; but there is still a lot of gunk in there. The new controls (if you have VS2008 or a newer versions) are nice and offer a number of more modern controls (the MFC Feature Pack)
I'd rather be phishing!
But if you're going to use the MFC Feature Pack you have to be cautious about the fact that Microsoft simply bought it from an outside vendor and added it to the feature set with most of its rough edges still intact. See for example, this[^] exploration of the CMFCLinkCtrl class intended for use with hyperlinks. Among other things it included hard-coded fonts.