MSDN: You must not call SetWindowLong with the GWL_HWNDPARENT index to change the parent of a child window. Instead, use the SetParent function.
你的代码就是将父窗口修改成了1028这个窗口句柄。
至于你说的额外存储空间,
MSDN: The function also sets the 32-bit (long) value at the specified offset into the extra window memory.
nIndex [in]
Type: int
The zero-based offset to the value to be set. Valid values are in the range zero through the number of bytes of extra window memory, minus the size of an integer. To set any other value, specify one of the following values.