I appreciate a really simple piece of code that exposes the entrails of MFC startup. However, what I really want is to do the same thing from a console application - can this code be adapted to run from an int main() { ... }?
ReplyOriginally posted by: Gustavo Figueiredo
Very interesting Andrew, thanks a lot.
ReplyOriginally posted by: RCL Software
That was very useful, thank you.
Reply
Originally posted by: Tang Jiangjun
First I thank you for your instruction, I really learn much from you article.
And I think it is needed that adding a delete operation in ExitInstance function for the m_pMainWnd pointer.
Is it correct? Or maybe the framework can automanually delete that pointer.
I'm waiting your instruction.
Originally posted by: Josh
The article said: "CWinApp contains a pointer called m_pMainWnd which will point to an object of our derived window management class.". Actually, CWinApp doesn't contain the pointer, it is a member of CWinThread, the base
class of CWinApp. Sorry for being picky. Otherwise, great article.
Originally posted by: Ray Macchiarola
still don't understand where:
m_pMainWnd = new CMainFrame( ); //don't see it in
// generated classes
m_pMainWnd = new CMyWin( ); //this is understandable
IN the code generated in AppWizard
ReplyOriginally posted by: Cacho
Your explanation is very helpful to someone at my level. Could you please expand for one Template/ multiple documents/ one view per document. I would be much obliged.
Originally posted by: TomThumb
Hey, I'm a real beginner, and I've spent the past few hours wondering where to put in this source code to allow me to compile it. I'm running Microsoft Visual C++ 5.0.
Anyone with hints/ideas.. please help.
Tom
Create a new Project of type MFC Application. Delete all files except the main file you named, and paste this code into it. It will compile and run fine.
ReplyOriginally posted by: Shashikanth Pisse
I liked the way Flow of MFC Application is
described.
Originally posted by: olaimat
Article provides a better exposition than my $50 book does.