The problem is that
has already been declared as a C Preprocessor macro in WinUser.h
#define CreateWindow CreateWindowW
#define CreateWindow CreateWindowA
and C Preprocessor macros being an old school C feature take no account of
There are 2 ways to deal with this. Either use a different name, I use
for historical reasons or get rid of the macro definition before the parser finds your function.
That might seem simple enough but if you also use the global namespace CreateWindowW or CreateWindowA functions by using the name CreateWindow that code could now be broken because you've take away the macro that defined part of it.
One way round this is to use
before your code and
after your code but this is very Microsoft Visual C++ specific and may not even work reliably with all versions of that so consider carefully.