Ok TKG, but how do you propose we do that? Especially when you don't even know how Studio's works, ours just casts hWnd to unsigned long long.
https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Platforms/Win32/WINDOWSwindow.cpp#L812
Ask Lonewollf he knows. He tried to tell me but he wasn't descriptive at all he was so vague I didn't know what to make of it. Or maybe I just don't know enough about C++ to know what he was talking about. I have no idea.
I was descriptive, you just didn't get the answer, so it seems.
There is no magic with window_handle() in GM:S (or even window_device() ).
They are sent as pointers, pure and simple. No casting involved.
If you send window_handle() in GM:S to a DLL, you simply recieve it as a HWND in the DLL. Simple!
The thing that YYG don't tell you 'on the box'
is that when you use external_define() that
ty_string is not referring to a string at all. It is a pointer. (I found this out directly from Russell Kay, because I submitted a bug report about subsequent parameters being recieved as zero if the window handle was the first parameter.
ty_string is a differrent size to ty_real so it throws the rest of the arguments out of whack if you assume that the window_handle() is a ty_real (is isn't).
So don't make that mistake.
SolutionDon't cast it at all, recieve it as a HWND.
"Insta-fix" for the OP request. Will work for GMS & GM8.1. And you get to take out some nasty casting and a few lines out of ENIGMA at the same time