The OP wants to have a cross-platform solution, using the WinAPI isn't it.
C++ was designed to work on any OS that has a compiler available. C++ inherited that philosophy from C.
If'n GUI is also thrown into the mix for cross-platform doing native GUI system calls will be a nightmare if having the same code compile for multiple OSes is a consideration*.
There are 3rd party libraries that can be used in C/C++. Bjarne Stroustrup uses one for his programming Uni classes, FLTK (Fast Light Toolkit).
https://www.fltk.org/
There are others in varying degrees of popularity. Two I know of off-hand are:
wxWidgets (
https://www.wxwidgets.org/) which is free.
Qt (
https://doc.qt.io/qt-5/qtgui-index.html) which has free bits but to use its full functionality has a price.
Doing cross-platform GUI has never been a consideration for me, I've tried FLTK and wxWidgets a bit. Qt I don't have any experience with.
*I haven't even really bothered with creating apps that run on different devices, desktop PCs and smart phones that use WinOS variants. I have really just dinked around with old school Desktop WinAPI code as done the Charles Petzold way back in 1998 with his "Programming Windows, 5th Edition" book. By desktops, for desktops.
I don't have a clue how Mac or Linux does its GUI magic. I doubt (without actual knowledge) they are as massively bloated as the WinAPI. Backwards compatibility can be a PITA.
I do (kinda) understand there is no monolithic GUI setup for Linux as there is for Mac or Windows.
MS decided to push modern WinAPI development away from C/C++ into C# and .NET. So an app written for WinOS can be used on a desktop PC or WinPhone and reasonably have a similar appearance based on screen size and layout.