baidu没找到。
大部分MSDN上都有答案,http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).aspx
在win95的时代,GWL_HWNDPARENT这个参数是用来修改父窗口的。现在不用了,
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.
因此,你的代码用的是
other value,和额外储存空间没有关系。实际上,额外存储空间需要你自己注册窗口类。
Reserve extra window memory by specifying a nonzero value in the cbWndExtra member of the
WNDCLASSEX structure used with the
RegisterClassEx function.