• Advertisement

Archived

This topic is now archived and is closed to further replies.

TVS_HASLINES ? which .h file?

This topic is 6001 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

which header file is this defined in? this is a tree view style yet not a single article in the help files list which header file to use! what the! if you could help me i would really appriciate it. If it''''s wierd then it''''s the norm for me!

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Perhaps "commctrl.h" or "comctrl.h" or whatever it''s called?

Share this post


Link to post
Share on other sites
It''s defined in "CommCtrl.h"

Zerapolis

"It''s only after you''ve lost everything that you''re free to do anything." Tyler Durden

Share this post


Link to post
Share on other sites
yah i finaly found that so i included it. BUT!!!! it still said the same thing. So i am thinkin'' dang what am i gona do when I GOT IT!!! i had to put it in stdafx.h and bingo it worked. don''t know why but oh well it works.

If it''''s wierd then it''''s the norm for me!

Share this post


Link to post
Share on other sites
Why is because you were using MSVC and had precompiled headers enabled. MSVC puts common includes in stdafx.h and then includes that file - or asks you to include it - in all implementation files in the project. You probably already knew this. The difference is that since it is included in every .cpp file, all common defines are automatically resolved. If a symbol is required in two seperate source files, both of them need to include the header.

Moot, but fun anyways.

Share this post


Link to post
Share on other sites
wait, wait, explain that to me again? I am a self taught programmer so i missed out on that type of thing. What is this all about?

If it''s wierd then it''s the norm for me!

Share this post


Link to post
Share on other sites
Say you have two .cpp files in your project - cruncher.cpp and main.cpp. main.cpp contains your main() function. Say you also have a header file, cruncher.h, which contains declarations of structures and variables.

Both main.cpp and cruncher.cpp refer to the structures, variables and functions declared in cruncher.h, therefore they both need to include cruncher.h. At the same time, though, you don''t want the compiler to include a file more times than is necessary (this can happen when a header file includes another header file that is already included by another file), so you place certain preprocessor directives to prevent that from happening. That''s another story. Look up #ifndef and #define in your compiler documentation.

Now, if you had even more header files you might choose to include them all in one "common header" rather than individually in each and every source file. You then simply include this common header in each of your source files.

stdafx.h

That''s not all it does, though. It also defines instructions for incremental build so the compiler doesn''t rebuild all files every time you perform a build. This is called incremental compilation (skipping code generation of unchanged portions of source code) and helps in really large projects. For Windows (MSVC), stdafx.h and stdafx.cpp perform this "precompiled header" functionality (the idea is that the code is viewed as a header file and included into the new build, and therefore not rebuilt).

Fire up your documentation and search for "precompiled header support" one of these days.

Ciao!

Share this post


Link to post
Share on other sites
Thanks. I had read about something like this before but couldn''t find out any more about it, this will help out a lot thanks.

If it''s wierd then it''s the norm for me!

Share this post


Link to post
Share on other sites

  • Advertisement