GWL_STYLE 指的那些属性

GWL_STYLE 指的是那些旧的窗口属性。相对于GWL_EXSTYLEGWL扩展属性而言的。

WS_BORDER 

Creates a window that has a thin-line border.

WS_CAPTION 
Creates a window that has a title bar (includes the WS_BORDER style).

WS_CHILD 
Creates a child window. A window with this style cannot have a menu bar. This style cannot be used with the WS_POPUP style.

WS_CHILDWINDOW 
Same as the WS_CHILD style.

WS_CLIPCHILDREN 
Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window.

WS_CLIPSIBLINGS 
Clips child windows relative to each other; that is, when a particular child window receives a WM_PAINT message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. If WS_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window.

WS_DISABLED 
Creates a window that is initially disabled. A disabled window cannot receive input from the user. To change this after a window has been created, use EnableWindow.

WS_DLGFRAME 
Creates a window that has a border of a style typically used with dialog boxes. A window with this style cannot have a title bar.

WS_GROUP 
Specifies the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the WS_GROUP style. The first control in each group usually has the WS_TABSTOP style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys.

You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use SetWindowLong.

WS_HSCROLL 
Creates a window that has a horizontal scroll bar.

WS_ICONIC 
Creates a window that is initially minimized. Same as the WS_MINIMIZE style.

WS_MAXIMIZE 
Creates a window that is initially maximized.

WS_MAXIMIZEBOX 
Creates a window that has a maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.

WS_MINIMIZE 
Creates a window that is initially minimized. Same as the WS_ICONIC style.

WS_MINIMIZEBOX 
Creates a window that has a minimize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.

WS_OVERLAPPED 
Creates an overlapped window. An overlapped window has a title bar and a border. Same as the WS_TILED style.

WS_OVERLAPPEDWINDOW 
Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles. Same as the WS_TILEDWINDOW style.

WS_POPUP 
Creates a pop-up window. This style cannot be used with the WS_CHILD style.

WS_POPUPWINDOW 
Creates a pop-up window with WS_BORDER, WS_POPUP, and WS_SYSMENU styles. The WS_CAPTION and WS_POPUPWINDOW styles must be combined to make the window menu visible.

WS_SIZEBOX 
Creates a window that has a sizing border. Same as the WS_THICKFRAME style.

WS_SYSMENU 
Creates a window that has a window menu on its title bar. The WS_CAPTION style must also be specified.

没试出来!!

WS_TABSTOP 
Specifies a control that can receive the keyboard focus when the user presses the TAB key. Pressing the TAB key changes the keyboard focus to the next control with the WS_TABSTOP style.

You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, useSetWindowLong.

WS_THICKFRAME 
Creates a window that has a sizing border. Same as the WS_SIZEBOX style.

WS_TILED 
Creates an overlapped window. An overlapped window has a title bar and a border. Same as the WS_OVERLAPPED style.

WS_TILEDWINDOW 
Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles. Same as the WS_OVERLAPPEDWINDOW style.

WS_VISIBLE 
Creates a window that is initially visible.

This style can be turned on and off by using ShowWindow or SetWindowPos.

WS_VSCROLL 

Creates a window that has a vertical scroll bar.

这个感觉挺有用的

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
`GWL_WNDPROC`, `GWL_USERDATA`, 和 `GWL_HINSTANCE` 是 Windows 窗口消息传递机制中的一些窗口句柄标志(Window Handler Constants)。在Windows API 中,这些常量用于在窗口结构(`WNDCLASS`)和窗口本身(`HWND`)之间存储额外的信息。 1. `GWL_WNDPROC` (Window Procedure Variable): 这个常量向一个窗口过程(`WNDPROC`),也就是处理窗口消息的回调函数。在Windows中,每个窗口都有一个窗口过程,当接收到消息时,这个函数会被调用来响应消息。 2. `GWL_USERDATA`: 这是用户自定义的数据域,通常用于存储应用程序特定的数据与窗口关联。它不是窗口过程,而是为窗口附加的一个可读写的内存位置,开发者可以将任何类型的针(如结构体或对象的针)放在这里,方便后续访问。 3. `GWL_HINSTANCE`: 这个常量表示创建窗口时所使用的模块实例(`HINSTANCE`,Handle to Instance)。它标识了加载该窗口类的执行文件(DLL或EXE)。这个信息对于应用程序管理资源和查找其他模块中的函数非常重要。 如果这些常量在某个上下文中被声明为未定义,可能意味着在代码中没有正确设置它们的值,或者试图在不支持这些功能的环境中使用它们。确保在使用之前,已经正确地初始化了窗口句柄结构,并且在Windows API的上下文中使用。如果遇到这类错误,检查相关的Windows编程文档,或者检查编译器和库的错误日志以获取确切的原因。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值