They are part of win32.
I suppose it depends on your motivation for learning graphics programming.
You want slow and steady, you do everything yourself, then you do the maths and bash pixels into your DIB buffer (and you drive a Prius).
You want fast, you have to delegate work to the GPU (via the APIs) to do all the low level pixel writing (and you drive a Porsche)
Microsoft invented DirectX because using DIBs for high performance graphics was (and still is) a complete non-starter. It just isn't going to happen.
There's just too many layers of abstraction between your code and the pixels on the screen.
Graphics and gaming - Win32 apps | Microsoft Learn
Anything that runs on the CPU and works at the level of writing individual pixels is always going to be far slower than just sending a 'draw line' command to the GPU to do the work for you.
You were messing around with DirectX 5 years ago.
Code Blcoks: what is the best Directx tutorial for start?