windows窗口类型

CS_BYTEALIGNCLIENT:
  Aligns the window's client area on a byteboundary (in the x direction). This style affects the width of thewindow and its horizontal placement on thedisplay. 
CS_BYTEALIGNWINDOW Aligns the window on a byte boundary (inthe x direction). This style affects the width of the window andits horizontal placement on the display. 
CS_CLASSDC :
Allocates one device context to be shared by all windows inthe class. Because window classes are process specific, it ispossible for multiple threads of an application to create a windowof the same class. It is also possible for the threads to attemptto use the device context simultaneously. When this happens, thesystem allows only one thread to successfully finish its drawingoperation.  
CS_DBLCLKS :
Sends a double-click message to the window procedure when theuser double-clicks the mouse while the cursor is within a windowbelonging to the class.  
CS_DROPSHADOW :
Windows XP: Enables the drop shadow effect on a window. Theeffect is turned on and off through SPI_SETDROPSHADOW. Typically,this is enabled for small, short-lived windows such as menus toemphasize their Z order relationship to otherwindows. 
CS_GLOBALCLASS :
Specifies that the window class is an application globalclass. For more information, see Application GlobalClasses. 
CS_HREDRAW :
Redraws the entire window if a movement or size adjustmentchanges the width of the client area. 
CS_NOCLOSE:
  Disables Close on the windowmenu. 
CS_OWNDC:
  Allocates a unique device context for eachwindow in the class.  
CS_PARENTDC :
Sets the clipping rectangle of the child window to that of theparent window so that the child can draw on the parent. A windowwith the CS_PARENTDC style bit receives a regular device contextfrom the system's cache of device contexts. It does not give thechild the parent's device context or device context settings.Specifying CS_PARENTDC enhances an application's performance. 
CS_SAVEBITS :
Saves, as a bitmap, the portion of the screen image obscuredby a window of this class. When the window is removed, the systemuses the saved bitmap to restore the screen image, including otherwindows that were obscured. Therefore, the system does not sendWM_PAINT messages to windows that were obscured if the memory usedby the bitmap has not been discarded and if other screen actionshave not invalidated the stored image. 
This style is useful for small windows (for example, menus ordialog boxes) that are displayed briefly and then removed beforeother screen activity takes place. This style increases the timerequired to display the window, because the system must firstallocate memory to store the bitmap. 
CS_VREDRAW :
Redraws the entire window if a movement or size adjustmentchanges the height of the client area. 
翻译如下:
CS_VREDRAW:当运动或者尺寸调整改变客户端的高度时重绘整个窗口
CS_HREDRAW:当运动或者尺寸调整改变客户端的宽度时重绘整个窗口
CS_BYTEALIGNCLIENT:在一个字节范围内匹配窗口的客户端区域,这种风格影响窗口宽度和显示的视野布置
CS_BYTEALGNWINDOW:在一个字节范围内匹配窗口宽度,这种风格影响窗口宽度和显示的视野布置
CS_CLASSDC:分配一个设备上下文被一个类的所有窗口共享,因为窗口类是特殊的进程,它允许一个多线程的应用程序创建同一个类的窗口i,它允许线程同时用一个设备上下文,当这个发生时,系统允许只有一个线程成功完成绘制操作
CS_DBLCLKS:向窗口过程发送一个双击信息当箭头所在的窗口属于类时
CS_DROPSHADOW:
CS_GLOBALCLASS:指定窗口类时应用程序的全局类
CS_NOCLOSE:禁止关闭窗口
CS_OWNDC:为类中的每一个窗口指定一个独特的设备上下文
CS_PARENTDC:设置父窗口的子窗口的剪裁区从而子窗口可以再父窗口上绘制
CS_SAVEBITS:以位图方式保存被类的窗口遮蔽的屏幕区域,当窗口移动时,系统会调用保存的位图还原屏幕,从而系统不必要发送重新绘制消息给窗口

HWND CreateWindow(           LPCTSTRlpClassName,
    LPCTSTRlpWindowName,
    DWORD dwStyle,
    int x,
    int y,
    int nWidth,
    int nHeight,
    HWND hWndParent,
    HMENU hMenu,
    HINSTANCEhInstance,
    LPVOID lpParam
);
lpClassName
[in] Pointer to a null-terminated string or a class atomcreated by a previous call to the RegisterClass or RegisterClassExfunction. The atom must be in the low-order word of lpClassName;the high-order word must be zero. If lpClassName is a string, itspecifies the window class name. The class name can be any nameregistered with RegisterClass or RegisterClassEx, provided that themodule that registers the class is also the module that creates thewindow. The class name can also be any of the predefined systemclass names. For a list of system class names, see the Remarkssection. 
lpWindowName
[in] Pointer to a null-terminated string that specifies thewindow name. If the window style specifies a title bar, the windowtitle pointed to by lpWindowName is displayed in the title bar.When using CreateWindow to create controls, such as buttons, checkboxes, and static controls, use lpWindowName to specify the text ofthe control. When creating a static control with the SS_ICON style,use lpWindowName to specify the icon name or identifier. To specifyan identifier, use the syntax "#num". 
dwStyle
[in] Specifies the style of the window being created. Thisparameter can be a combination of window styles, plus the controlstyles indicated in the Remarks section. 
x
[in] Specifies the initial horizontal position of the window.For an overlapped or pop-up window, the x parameter is the initialx-coordinate of the window's upper-left corner, in screencoordinates. For a child window, x is the x-coordinate of theupper-left corner of the window relative to the upper-left cornerof the parent window's client area. If this parameter is set toCW_USEDEFAULT, the system selects the default position for thewindow's upper-left corner and ignores the y parameter.CW_USEDEFAULT is valid only for overlapped windows; if it isspecified for a pop-up or child window, the x and y parameters areset to zero. 
y
[in] Specifies the initial vertical position of the window.For an overlapped or pop-up window, the y parameter is the initialy-coordinate of the window's upper-left corner, in screencoordinates. For a child window, y is the initial y-coordinate ofthe upper-left corner of the child window relative to theupper-left corner of the parent window's client area. For a listbox, y is the initial y-coordinate of the upper-left corner of thelist box's client area relative to the upper-left corner of theparent window's client area. 
If an overlapped window is created with the WS_VISIBLE stylebit set and the x parameter is set to CW_USEDEFAULT, then the yparameter determines how the window is shown. If the y parameter isCW_USEDEFAULT, then the window manager calls ShowWindow with theSW_SHOW flag after the window has been created. If the y parameteris some other value, then the window manager calls ShowWindow withthat value as the nCmdShow parameter.

nWidth
[in] Specifies the width, in device units, of the window. Foroverlapped windows, nWidth is either the window's width, in screencoordinates, or CW_USEDEFAULT. If nWidth is CW_USEDEFAULT, thesystem selects a default width and height for the window; thedefault width extends from the initial x-coordinate to the rightedge of the screen, and the default height extends from the initialy-coordinate to the top of the icon area. CW_USEDEFAULT is validonly for overlapped windows; if CW_USEDEFAULT is specified for apop-up or child window, nWidth and nHeight are set tozero. 
nHeight
[in] Specifies the height, in device units, of the window. Foroverlapped windows, nHeight is the window's height, in screencoordinates. If nWidth is set to CW_USEDEFAULT, the system ignoresnHeight. 
hWndParent
[in] Handle to the parent or owner window of the window beingcreated. To create a child window or an owned window, supply avalid window handle. This parameter is optional for pop-upwindows. 
Windows 2000/XP: To create a message-only window, supplyHWND_MESSAGE or a handle to an existing message-onlywindow. 

hMenu
[in] Handle to a menu, or specifies a child-window identifierdepending on the window style. For an overlapped or pop-up window,hMenu identifies the menu to be used with the window; it can beNULL if the class menu is to be used. For a child window, hMenuspecifies the child-window identifier, an integer value used by adialog box control to notify its parent about events. Theapplication determines the child-window identifier; it must beunique for all child windows with the same parentwindow. 
hInstance
[in] Handle to the instance of the module to be associatedwith the window.
lpParam
[in]   Pointer to a value to be passed to thewindow through the CREATESTRUCT structure (lpCreateParams member)pointed to by the lParam param of the WM_CREATE message. Thismessage is sent to the created window by this function before itreturns.

If an application calls CreateWindow to create amultiple-document interface (MDI) client window, lpParam shouldpoint to a CLIENTCREATESTRUCT structure. If an MDI client windowcalls CreateWindow to create an MDI child window, lpParam shouldpoint to a MDICREATESTRUCT structure. lpParam may be NULL if noadditional data is needed.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值