Click here to Skip to main content
16,014,294 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: views from menu Pin
Joel Holdsworth1-Jun-02 22:38
Joel Holdsworth1-Jun-02 22:38 
GeneralAnother Question Pin
Joel Holdsworth1-Jun-02 20:46
Joel Holdsworth1-Jun-02 20:46 
GeneralRe: Another Question Pin
Bugra Barin1-Jun-02 22:09
Bugra Barin1-Jun-02 22:09 
GeneralRe: Another Question Pin
Joel Holdsworth1-Jun-02 22:25
Joel Holdsworth1-Jun-02 22:25 
General"stdafx.h" Pin
WREY1-Jun-02 16:55
WREY1-Jun-02 16:55 
GeneralRe: "stdafx.h" Pin
Nish Nishant1-Jun-02 18:05
sitebuilderNish Nishant1-Jun-02 18:05 
GeneralRe: "stdafx.h" Pin
WREY1-Jun-02 20:39
WREY1-Jun-02 20:39 
GeneralRe: "stdafx.h" Pin
Joel Holdsworth1-Jun-02 21:04
Joel Holdsworth1-Jun-02 21:04 
Hi,
Stdafx.h is a header file which is unique to every MFC project. stdafx.h contains things like this:
#if !defined(AFX_STDAFX_H__48A33CB4_51D8_45C7_8B74_162AA2953797__INCLUDED_)
#define AFX_STDAFX_H__48A33CB4_51D8_45C7_8B74_162AA2953797__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define VC_EXTRALEAN		// Exclude rarely-used stuff from Windows headers

#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions
#include <afxadv.h>
#include <afxdisp.h>        // MFC Automation classes
#include <afxdtctl.h>		// MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>			// MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__48A33CB4_51D8_45C7_8B74_162AA2953797__INCLUDED_)

The main thing obout it is that the header is precompiled for your application to do all the MFC includes once for all. If you created your project using MFC you should have a copy of the header in your project directory. Another thing to check is this: If you go into the "Project Settings" box for you project, go to the "C/C++" panel, and in the list box marked category go down to "Precompiled Headers". This is where stdafx.h is hooked in. If you want to remove stdafx.h from your project all together as you might do in a Console App, just switch to "Not using precompiled headers", and remove all references to stdafx.h. But beware of doing this because a precompiled header is the standard way of getting MFC into a project!

I don't know why the system complains when you change the code slightly Confused | :confused: . Because the stdafx.h should only be recompiled when you make changes to the file itself, if you change another part of your code it shouldn't make any difference!

Hope thats helpful...

With time we live, with money we spend!
Joel Holdsworth
GeneralRe: "stdafx.h" Pin
WREY1-Jun-02 21:43
WREY1-Jun-02 21:43 
GeneralRe: "stdafx.h" Pin
Brian Delahunty2-Jun-02 4:59
Brian Delahunty2-Jun-02 4:59 
GeneralAnimateWindow(), problem Pin
MaTrIX2k21-Jun-02 11:16
MaTrIX2k21-Jun-02 11:16 
GeneralRe: AnimateWindow(), problem Pin
Paul M Watt1-Jun-02 18:09
mentorPaul M Watt1-Jun-02 18:09 
GeneralRe: AnimateWindow(), problem Pin
MaTrIX2k21-Jun-02 18:49
MaTrIX2k21-Jun-02 18:49 
GeneralDetecting connections... Pin
einst9921-Jun-02 10:30
einst9921-Jun-02 10:30 
GeneralRe: Detecting connections... Pin
Rama Krishna Vavilala1-Jun-02 12:19
Rama Krishna Vavilala1-Jun-02 12:19 
QuestionWhere can I get masm? Pin
1-Jun-02 10:29
suss1-Jun-02 10:29 
AnswerRe: Where can I get masm? Pin
Tim Smith1-Jun-02 10:38
Tim Smith1-Jun-02 10:38 
GeneralRe: Where can I get masm? Pin
1-Jun-02 10:53
suss1-Jun-02 10:53 
AnswerRe: Where can I get masm? Pin
Nish Nishant1-Jun-02 18:14
sitebuilderNish Nishant1-Jun-02 18:14 
AnswerRe: Where can I get masm? Pin
David_LoveCpp17-Mar-10 22:32
David_LoveCpp17-Mar-10 22:32 
Questionwhich way is better? Pin
pnpfriend1-Jun-02 9:24
pnpfriend1-Jun-02 9:24 
AnswerRe: which way is better? Pin
Brian Delahunty1-Jun-02 10:24
Brian Delahunty1-Jun-02 10:24 
GeneralCView border Pin
Joel Holdsworth1-Jun-02 9:27
Joel Holdsworth1-Jun-02 9:27 
GeneralRe: CView border Pin
Neville Franks1-Jun-02 11:37
Neville Franks1-Jun-02 11:37 
GeneralRe: CView border Pin
Paul M Watt1-Jun-02 18:16
mentorPaul M Watt1-Jun-02 18:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.