Don't think about code neutral stuff, its complex. All code is platform dependent at its heart, all the code you write is broken down into machine code which is what the computer understands. The compiler you use does that for you. The only reason code can work on different systems is some languages have compilers that you have downloaded on your machine in order to run the program. Java for instance you need to download the java runtime to get it to work, it is compiling the program live while you are running the java program into machine code. That is why java works on everything, you compile to a generic type of code, and each machine has a specific compiler installed on it for the specific hardware the program is being run on. So a compiler has to be written separately for different hardware, downloaded and installed. So the compiler is making your code "neutral" in the case of java.
Java compilers also translate your calls for creating windows into whatever code the operating system needs as well for you.
C++ is not that forgiving. C++ doesn't have that intermediate language or the compiler that runs on the fly. You have to compile using the correct compiler for each type of hardware yourself or include multiple versions of the compiled code for different types of hardware. C++ doesn't translate your calls to the operating system to do something like create a window for you. You need to code it yourself or rely on a library/api that does it for you. Basically, java will interpret your call to create a window and pass that call onto the correct functions that work with the operating system you are on. So you call a java function, and that java function has different ways to go depending on the OS. C++, typically you'd call the OS function directly, so there is no in between function. Unless you go find a library that has a intermediate function to call such as SDL. So in c++ I could call the SDL function, and it would call the appropriate OS functions.
C++ is the language. You need to know the language first, how it works which is the syntax.
Once you know the syntax of a programming language and how it works, then you start to expand on that from there. Most of your programs will probably run on Windows, so yes, knowing the Windows API is important. Understand when someone says windows programming, that is not specifying a language. They are saying programming in some language and using the windows API with that language. There is still going to be a language being used to develop the program. Most C++ programs on windows will require you to know how to interact with windows at least to the extent in creating a window.
To understand it better, you have Programming Languages, and you have Programming Libraries. A program language is the structure, the syntax, how you say things. Most languages come with a standard library that has some basic functions/methods that let you do some more complex stuff than simply add/subtract numbers and store variables. A library is basically any function/method you use. You may not realize it, but you are probably including at least some of the standard c++ libraries at the top of every file you make already. cout, that is a function in one of the standard c++ libraries. The only reason you can use it is because you are calling it from the library, the include at the top of the file makes this easy.
When you do "windows programming" you include windows API libraries at the top of the file, and you use the functions in their libraries. Why? because c++ is just a language. One tricky thing with learning a language is using the knowledge of what you learn and expanding on that intuitively. You probably already know how it works, you are just getting overwhelmed and thinking its something more. Write 2 class files and keep them separate from your main file. Put functions in those other classes. Now how do you interact with those classes? Now if you wanted to change a variable in an object you generate from one of those classes that doesn't allow you to edit the value directly, but requires you to use a function in that object to change the variable, then you'd call that function yes? Windows is dozens of separate things running all at the same time, from the time the computer starts up. For the sake of programming safety, you cannot change many of the variables directly, you have to use functions to change the variables. The reason is the function checks to make sure you don't enter complete nonsense and cause windows to crash. Also, how would you interact with objects that are already running? since most of windows is already running at startup, the object handle isn't in your own code yet so you have no way to control it. So there are functions in the windows api to retrieve those objects so you can interact with them, and some of the functions will interact with the running processes without having to touch the object.
If my talk about objects confuses you, then you probably want to read up on Object Oriented Programming. OOP covers the design concepts used in OOP languages, which most programming languages you come across will be. A good c++ book would cover some basic OOP concepts hopefully anyway, but maybe yours didn't. A class is a template. An object is one instance of a class, you instantiate an instance of a class and it becomes its own separate object. So you create 1 dog class, and you can then instantiate that class as 12 different objects. They are all dogs, but you may have their variable Name all say something different. This is one way to use a class, and the heart of OOP. Its similar to creating a variable. When you create a variable "int a = 3;" that is an instance of a int, you can have many instances of int all have different values, but they are all still ints.
You can do "windows programming" with any programming language that has windows libraries available for it. C++ is very popular and so is supported. You can even use .NET in C++ if you know what you are doing or use Visual Studio and learn about .Net programming. It gets a little complex as Microsoft introduces different terminology for "C++.Net" and you start using .NET standard libraries instead of C++ standard libraries in order to maintain interoperability with other .NET languages.
This is kind of simplified btw, but realize that a computer is doing things in binary. 1's and 0's, you add a level and there is machine code. One thing in machines code is many more characters in binary. Add another level and you have something like C, one line is many many lines in machine code. Add another level and you have something like c#, where one line may be many lines in a Intermediate languages, each line of that being many lines in machine code, etc. Programming is doing complex things using a lot of very simple things. The very simple things in the c++ language, when used together in the right order, form very complicated systems. But they can all be broken down to the very simple parts of the language it was written in. One complex function is likely calling a dozen simpler functions, each other those doing a dozen simpler things, etc. Learning how a language works is the most important step, after that you can figure out how the programs work that you need to work with while writing your own program.
In MSDN, you may need to follow a lot of blue links to reach a point where you understand something, and then work from there if you need to know exactly how it works. But that takes a lot of time, other than that you can read more books/tutorials on the subjects.
There is too much to write on this tbh