In the header file WinUser.h, there is a part in which the constants of the second parameter of SetWindowLong() are defined.
WinUser.h
// ... #define GWL_WNDP
As specified in //If config is _WIN64 then use new versioned macro #define GWLP_WNDPROC (-4) #define GWLP_HINSTANCE (-6) #define GWLP_HWNDPARENT (-8) #define GWLP_USERDATA (-21) #define GWLP_ID (-12) //else for _WIN32 #undef GWL_WNDPROC #undef GWL_HINSTANCE #undef GWL_HWNDPARENT #undef GWL_USERDATA