I thought it might be worthwhile to expand the previous answer for Visual Studio-like IDEs.
For simplicity you should use naming conventions that are recognized by your programming IDE. The most important rules it has are the ones that tell it what compiler to use for which files. For example, .c will be compiled as C code, .cpp as C++, .cs as C#, .rc by the resource compiler and so on.
Naming something .h, or anything else not covered by one of the standard compiler selection rules, prevents a file being compiled on its own, which is what you want for header files. If you had tried your test of renaming your header to .c in Visual Studio, it would have been compiled for you unless you explicitly excluded it from the build.
There may be other tools available in your IDE - for example, tools to generate class diagrams, do source code analysis etc., and these may also have file naming conventions that you should stay compatible with.