用SetWindowLong设置窗口风格SetWindowLong VB声明 
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long 
说明 
在窗口结构中为指定的窗口设置信息 
返回值 
Long,指定数据的前一个值 
参数表 
参数 类型及说明 
hwnd Long,欲为其取得信息的窗口的句柄 
nIndex Long,欲设置的信息,可以是下述任何一个常数: 
GWL_EXSTYLE 扩展窗口样式 
GWL_STYLE 窗口样式 
GWL_WNDPROC 该窗口的窗口函数的地址 
GWL_HINSTANCE 拥有窗口的实例的句柄 
GWL_HWNDPARENT 该窗口之父的句柄。不要用SetWindowWord来改变这个值 
GWL_ID 对话框中一个子窗口的标识符 
GWL_USERDATA 含义由应用程序规定 
DWL_DLGPROC 这个窗口的对话框函数地址 
DWL_MSGRESULT 在对话框函数中处理的一条消息返回的值 
DWL_USER 含义由应用程序规定 
dwNewLong Long,由nIndex指定的窗口信息的新值 
Window Styles
WS_BORDER   Creates a window that has a border.
WS_CAPTION   Creates a window that has a title bar (implies the WS_BORDER style). Cannot be used with the WS_DLGFRAME style.
WS_CHILD   Creates a child window. Cannot be used with the WS_POPUP style.
WS_CLIPCHILDREN   Excludes the area occupied by child windows when you draw within the parent window. Used when you create the parent window.
WS_CLIPSIBLINGS   Clips child windows relative to each other; that is, when a particular child window receives a paint message, the WS_CLIPSIBLINGS style clips all other overlapped child windows out of the region of the child window to be updated. (If WS_CLIPSIBLINGS is not given and child windows overlap, when you draw within the client area of a child window, it is possible to draw within the client area of a neighboring child window.) For use with the WS_CHILD style only.
WS_DISABLED   Creates a window that is initially disabled.
WS_DLGFRAME   Creates a window with a double border but no title.
WS_GROUP   Specifies the first control of a group of controls in which the user can move from one control to the next with the arrow keys. All controls defined with the WS_GROUP style FALSE after the first control belong to the same group. The next control with the WS_GROUP style starts the next group (that is, one group ends where the next begins).
WS_HSCROLL   Creates a window that has a horizontal scroll bar.
WS_MAXIMIZE   Creates a window of maximum size.
WS_MAXIMIZEBOX   Creates a window that has a Maximize button.
WS_MINIMIZE   Creates a window that is initially minimized. For use with the WS_OVERLAPPED style only.
WS_MINIMIZEBOX   Creates a window that has a Minimize button.
WS_OVERLAPPED   Creates an overlapped window. An overlapped window usually has a caption and a border.
WS_OVERLAPPEDWINDOW   Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles.
WS_POPUP   Creates a pop-up window. Cannot be used with the WS_CHILD style.
WS_POPUPWINDOW   Creates a pop-up window with the WS_BORDER, WS_POPUP, and WS_SYSMENU styles. The WS_CAPTION style must be combined with the WS_POPUPWINDOW style to make the Control menu visible.
WS_SYSMENU   Creates a window that has a Control-menu box in its title bar. Used only for windows with title bars.
WS_TABSTOP   Specifies one of any number of controls through which the user can move by using the TAB key. The TAB key moves the user to the next control specified by the WS_TABSTOP style.
WS_THICKFRAME   Creates a window with a thick frame that can be used to size the window.
WS_VISIBLE   Creates a window that is initially visible.
WS_VSCROLL   Creates a window that has a vertical scroll bar.