Fun fact, that many are not aware, mostly because this is Windows 3.x knowledge and one needed the right source to learn about this.

There was a header only library on the Windows SDK that would wrap those HANDLEs into more specific types, that would still be compatible, while providing a more high level API to use them from C.

Unfortunely there is not much left on the Internet about it, but this article provides some insight,

https://www.codeguru.com/windows/using-message-crackers-in-t...

Naturally it was saner just to use TP/C++ alongside OWL, C++ with MFC back then, or VB.