Launch Visual Studio, select [New]-[Project] from [File] menu.
From the [Templates] of [Create a new project] dialog box, select [MFC App] of [C++], click the [Next] button.
From the [Configure your new project] dialog box, specify the project name and save location, and click the [Create] button.
From the [MFC Application] dialog box, select [Dialog based] for [Application type] and click the [Finish] button to create the project.
* The above is for Microsoft Visual Studio Professional 2022 (64-bit). Item names and commands may differ depending on the version.
When performing serial communication with Visual C++, there is a method of using the OS standard Win32 API Communications Functions (communication functions).
Reference : [Communications Functions] (Since this is an external link, the link may change without notice)
https://learn.microsoft.com/en-us/windows/win32/devio/communications-functions
The winbase.h file is required to use the Win32 API Communications functions.
However, the default setting of Visual C++ MFC application is a project that can use functions of Win32 API Communications.
Again, there is no need to include the winbase.h file.
For details, refer to the source code of the sample program.
The default setting of Visual C++ MFC application is a project that can use functions of Win32 API Communications.
Again, there is no need to add specific libraries to the project.
The functions provided in this device driver are the form of WIN32 API.
In order to call this form of functions you need to include "windows.h".