HWND is a window handle. This type is declared in WinDef.h as follows:
typedef HANDLE HWND;
HANDLE is an object handle. This type is declared in WinNT.h as follows:
typedef PVOID HANDLE;
Finally, the PVOID is a pointer to any type. This type is declared in WinNT.h as follows:
typedef void * PVOID;
So, HWND is actually a pointer to void. You can use long for HWND as follows:
HWND h = (HWND) my_long_var;
but very carefully what information is stored in my_long_var. You must make sure you have a pointer.
Next, edit: Warning tells you that you have enabled 64-bit portability checks. If you are building a 32-bit application, you can ignore them.
Ionut anghelcovici
source share