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
Also make sure you're NOT defining the following:
#define NOWINOFFSETS
which makes GWL_*, GCL_*, ie. GetWindowLongPtr and family, as well as associated routines available.
GWL_*
GCL_*
GetWindowLongPtr