Loading
submit to reddit
May 22, 2013, 05:47:30 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome!
 
   Forum Home   Help Search Forum Login Register  
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Files in visual studio platform  (Read 2276 times)
eee1984
Newbie
*
Posts: 5


« on: January 12, 2009, 04:17:03 AM »

Hi Friends..

I have learned C# before.. and I developed ...But I have to learn MFC, pocket pc for GPS receiver..But I dont understand something for example I use wizard single documet  and when I say finish there ara many files Can you say me this files for what application or purpose ...

thanks a lot
Logged
Jenna Hall
Administrator
Full Member
*****
Posts: 152



WWW
« Reply #1 on: January 12, 2009, 08:40:30 AM »

Hi and welcome. Cool First, you should watch our intro tutorials to MFC:

Lesson 2: The Document/View Architecture
Lesson 3: Application & FrameWnd Classes

After that, you should have an understanding of the idea of MFC's structure and what the following files are and why they're the most important:

Lesson1View.cpp: View class
Lesson1Doc.cpp: Document class
Lesson1.cpp: Application class
MainFrm.cpp: FrameWnd class

And we'll have more MFC tutorials coming, including menu items and resource editing.

Hope this helps!
Jenna
« Last Edit: January 12, 2009, 10:12:21 AM by Jenna Hall » Logged
eee1984
Newbie
*
Posts: 5


« Reply #2 on: January 13, 2009, 02:31:15 AM »

Hi Jenna

Thanks a lot kindly replies.. I watched 3 lessons and I think very useful ... Cheesy
Is there any MFC videos for example  videos includes example..?  :Smiley 
Logged
Jenna Hall
Administrator
Full Member
*****
Posts: 152



WWW
« Reply #3 on: January 13, 2009, 09:28:49 PM »

If you're looking for example code, I have a download of Lesson 1: http://xoax.net/comp/cpp/mfc/Mfc2008C++Lesson1.zip.

Also, I will be making more videos using the MFC project code soon, so stay tuned.

Let me know if you have more questions.

Ciao,
Jenna
Logged
eee1984
Newbie
*
Posts: 5


« Reply #4 on: January 14, 2009, 05:33:45 AM »

Thanks Jenna..

I have one question   Sad may you explain messages ?? For example why use messages and what kind of relation between events.

Sincerely
Logged
Jenna Hall
Administrator
Full Member
*****
Posts: 152



WWW
« Reply #5 on: January 14, 2009, 02:01:05 PM »

If you use MFC, the architecture takes care of routing your events as long as you use what are called Message Maps. You have to tell MFC what function to call when a certain event occurs, and the rest is done by MFC.

For instance, you map a function to an event like File --> Open through the Message Map. Then, when a user of your application triggers the File --> Open event by opening the File menu and choosing Open, the MFC architecture will call the function that you specified in the Map. Of course, the code inside your function can do what's required at that point and has nothing to do with messages anymore.

Here is the Message Map from the Application class (e.g., Lesson1.cpp) of our basic MFC program:

Code:
BEGIN_MESSAGE_MAP(CLesson1App, CWinApp)
ON_COMMAND(ID_APP_ABOUT, &CLesson1App::OnAppAbout)
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW, &CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, &CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP, &CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()

You'll see that the File --> Open event is linked to the CWinApp function OnFileOpen() here:

Code:
ON_COMMAND(ID_FILE_OPEN, &CWinApp::OnFileOpen)

You can map an event to any function you like in the Message Map.

Hope that helps. Let me know if you have more questions.
Jenna


« Last Edit: January 14, 2009, 02:03:39 PM by Jenna Hall » Logged
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!