Although I understand the logic of using multiple cpp files in a project. I am unsure what would be a good way to impliment what I want to do... anyway:

I am writing a rather large Win32 application and the one source file is getting a bit messy. I have decided that I would like to have a seperate cpp file for every windows message that I handle.

for example, I would have the main cpp file called:

WinMain.cpp

then all my other cpp files would be like:

WM_CREATE.cpp
WM_MOUSEMOVE.cpp
WM_PAINT.cpp
WM_CLOSE.cpp

etc, you get the idea.

Now, each cpp file will only contain one function, and here's where I have a dilemma.

Is it really necessary for each one of these cpp files to have its own header file for one single function declaration? it just seems a bit pointless to me..?

Also, how would I deal with global variables, having all these seperate files? where do they get declared?

And one quick last question: If in every cpp file I am including windows.h and any other header files I may require, are these header files literally included many times? or do all the cpp files interlink to use the same one? because my executable file sure would start getting large.

Any help with any of these questions would be much apreciated.