Click here to Skip to main content
16,006,348 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: newbie needs help Pin
Chris Losinger5-Nov-02 13:22
professionalChris Losinger5-Nov-02 13:22 
GeneralRe: newbie needs help Pin
kjessee5-Nov-02 13:39
kjessee5-Nov-02 13:39 
GeneralRe: newbie needs help Pin
Chris Losinger5-Nov-02 13:38
professionalChris Losinger5-Nov-02 13:38 
GeneralRe: newbie needs help Pin
kjessee5-Nov-02 14:28
kjessee5-Nov-02 14:28 
GeneralReally Annoying Novice Question Pin
ursus zeta5-Nov-02 12:41
ursus zeta5-Nov-02 12:41 
GeneralRe: Really Annoying Novice Question Pin
Chris Losinger5-Nov-02 13:11
professionalChris Losinger5-Nov-02 13:11 
GeneralRe: Really Annoying Novice Question Pin
ursus zeta5-Nov-02 13:20
ursus zeta5-Nov-02 13:20 
GeneralRe: Really Annoying Novice Question Pin
Paul M Watt5-Nov-02 13:40
mentorPaul M Watt5-Nov-02 13:40 
First off, Petzold's "Programming Windows" is completely written in C. While C is very similar to C++ in syntax and many other features, it lacks support for classes and it treats structs slightly differently so be aware of this fact.

The include files are where you will generally define your consts, global functions, classes and such, and the CPP file is where you will implement them. By defining your code in an include file, you will be able to reference the things defined in the header in a number of different CPP files. This model also facilitates code re-use.

The only time that the include order is important for the header files is when a header file that is defined, depends on a previous header file being defined. Usually the header that depends on another header will include it itself, however there are cases where the order is important, especially if you use ATL.

It is actually the preprocessor that scans through the header files. In fact, the #include directive, directs the preprocessor to extract all of the text from the file that has been included, and insert that text in place of the #include directive. So you could picture all of the files that you include, as being inserted automatically for you as if you had pasted them there yourself. After the preprocessor runs, then the compiler goes through and compiles each CPP file individually.



Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!

GeneralRe: Really Annoying Novice Question Pin
ursus zeta6-Nov-02 11:48
ursus zeta6-Nov-02 11:48 
Questionwho to get? Pin
imran_rafique5-Nov-02 12:11
imran_rafique5-Nov-02 12:11 
GeneralGetDlgCtrlID for ActiveX controls Pin
Aaron Schaefer5-Nov-02 11:20
Aaron Schaefer5-Nov-02 11:20 
GeneralFindResouce problem Pin
IGx895-Nov-02 11:03
IGx895-Nov-02 11:03 
GeneralRe: FindResouce problem Pin
dabs5-Nov-02 11:14
dabs5-Nov-02 11:14 
GeneralRe: FindResouce problem Pin
IGx895-Nov-02 12:27
IGx895-Nov-02 12:27 
GeneralDrawItem never called! Pin
Daniel Strigl5-Nov-02 10:46
Daniel Strigl5-Nov-02 10:46 
GeneralRe: DrawItem never called! Pin
dabs5-Nov-02 11:21
dabs5-Nov-02 11:21 
GeneralRe: DrawItem never called! Pin
Daniel Strigl5-Nov-02 20:36
Daniel Strigl5-Nov-02 20:36 
GeneralRe: DrawItem never called! Pin
Jonas Larsson6-Nov-02 1:17
Jonas Larsson6-Nov-02 1:17 
GeneralCommon Control and Microsoft Layer For Unicode Pin
kasturirawat5-Nov-02 10:11
kasturirawat5-Nov-02 10:11 
GeneralRe: Common Control and Microsoft Layer For Unicode Pin
Tim Smith5-Nov-02 10:53
Tim Smith5-Nov-02 10:53 
GeneralCFileDialog Pin
Anonymous5-Nov-02 9:45
Anonymous5-Nov-02 9:45 
GeneralRe: CFileDialog Pin
Ravi Bhavnani5-Nov-02 10:16
professionalRavi Bhavnani5-Nov-02 10:16 
QuestionHow do I open a web browser? Pin
Happy_Dog5-Nov-02 9:18
Happy_Dog5-Nov-02 9:18 
AnswerRe: How do I open a web browser? Pin
Chris Losinger5-Nov-02 10:07
professionalChris Losinger5-Nov-02 10:07 
GeneralRe: How do I open a web browser? Pin
Happy_Dog5-Nov-02 10:39
Happy_Dog5-Nov-02 10:39 

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.