.\" -*- nroff -*- .\" Generated file - DO NOT EDIT! .TH SetWindowLongW 3w "Oct 2012" "Wine API" "Wine API" .SH NAME \fBSetWindowLongW\fR (USER32.@) .SH SYNOPSIS LONG SetWindowLongW ( HWND \fIhwnd\fR, INT \fIoffset\fR, LONG \fInewval\fR ) .SH PARAMS \fIhwnd\fR \fB[In]\fR window to alter. .PP \fIoffset\fR \fB[In]\fR \fIoffset\fR,in bytes,of location to alter. .PP \fB[In]\fR new value of location. .PP .SH DESCRIPTION .PP SetWindowLongW (\fBUSER32\fR.@) Set window attribute. .PP SetWindowLong() alters one of a window's attributes or sets a \fB32\fR-bit (long) value in a window's extra memory. .PP The _hwnd_ parameter specifies the window. is the handle to a window that has extra memory. The _newval_ parameter contains the new attribute or extra memory value. If positive, the _offset_ parameter is the byte-addressed location in the window's extra memory to set. If negative, _offset_ specifies the window attribute to set, and should be one of the following values: .PP \fBGWL_EXSTYLE\fR The window's extended window style. .PP \fBGWL_STYLE\fR The window's window style. .PP \fBGWLP_WNDPROC\fR Pointer to the window's window procedure. .PP \fBGWLP_HINSTANCE\fR The window's pplication instance handle. .PP \fBGWLP_ID\fR The window's identifier. .PP \fBGWLP_USERDATA\fR The window's user-specified data. .PP If the window is a dialog box, the _offset_ parameter can be one of the following values: .PP \fBDWLP_DLGPROC\fR The address of the window's dialog box procedure. .PP \fBDWLP_MSGRESULT\fR The return value of a message that the dialog box procedure processed. .PP \fBDWLP_USER\fR Application specific information. .SH RETURNS .PP If successful, returns the previous value located at _offset_. Otherwise, returns \fB0.\fR .SH NOTES .PP Extra memory for a window class is specified by a nonzero cbWndExtra parameter of the \fBWNDCLASS\fR structure passed to \fBRegisterClass(3w)\fR at the time of class creation. .PP Using \fBGWL_WNDPROC\fR to set a new window procedure effectively creates a window subclass. Use \fBCallWindowProc(3w)\fR in the new Windows(tm) procedure to pass messages to the superclass's window procedure. .PP The user data is reserved for use by the application which created the window. .PP Do not use \fBGWL_STYLE\fR to change the window's \fBWS_DISABLED\fR style; instead, call the \fBEnableWindow(3w)\fR function to change the window's disabled state. .PP Do not use \fBGWL_HWNDPARENT\fR to reset the window's parent, use SetParent() instead. .PP Win95: When \fIoffset\fR is \fBGWL_STYLE\fR and the calling app's ver is \fB4.0\fR, it sends \fBWM_STYLECHANGING\fR before changing the settings and \fBWM_STYLECHANGED\fR afterwards. App ver \fB4.0\fR can't use SetWindowLong to change \fBWS_EX_TOPMOST\fR. .SH IMPLEMENTATION .PP Declared in \fB"winuser.h"\fR. .PP Implemented in \fB"dlls/user32/win.c"\fR. .PP Debug channel \fB"win"\fR.