All that Dependency Walker/Dependencies does is show what DLLs are used/needed by the app. The DLLs themselves are NOT linked into the app as if they were a resource.
DLLs are used so common code is not linked into an app's executable. To reduce the file size.
If you linked all the code from the Windows DLLs the file size would be GINORMOUS.
The Desktop WinAPI is not an easy beast to grasp without a lot of time and effort expended. The
Microsoft Foundation Classes (MFC) were created as a C-based means to leverage the C-based means and methods of dealing with Windows. Most times a very thin layer or veneer, sometimes an encapsulation that hides a lot of the "how does this work." Yet properly using MFC is just as much an learning investment as delving into the Desktop WinAPI.
And I ain't talking about what 3rd Party/later MS additions bring to the table. Like SDL, GDI+, DirectX, Common Controls, COM, etc. Or .NET/UWP.
The differences between how Petzold shows how to create WinAPI in his 5th Ed. book vs. his 6th Ed. book is very stark. C vs. C#/.NET, etc.
denver2020, you might consider stepping back and try learning/relearning the WinAPI from the beginning. Charles Petzold's "Programming Windows, 5th Edition" might be a good place to start. Old, but I'd say a lot of the issues you are having would disappear or become easier to understand and correct.
The code on the 5th Ed.'s CD won't compile or run properly now in 2021, especially when compile with MSVC. The API has changed significantly, along vast changes to Windows itself. Win9x/Me are dead, dead, dead. 16-bit processors are just as dead. Petzold's 5th Edition was written when Win98 was still around.
Luckily someone has updated a lot of the code so modern compilers won't puke all over the code.
https://github.com/recombinant/petzold-pw5e
I going back and plowing my way to the updated code, and tweaking it for creating Unicode-only executables. x86 and x64. ANSI is another Win9X/Me legacy that deserves to die and go away.
VS 2022, currently(?) in beta test, will only run on x64 machines. VS 2019 can be installed on x86 machines, able to create both x86/x64 .exes.
Can VS 2022 still create x86 apps? Yes it can.
https://devblogs.microsoft.com/visualstudio/visual-studio-2022/