网站首页  词典首页

请输入您要查询的函数:

 

术语 deferwindowpos
释义 DeferWindowPos
语法:
HDWP DeferWindowPos( HDWP hWinPosInfo,
HWND hWnd,
HWND hWndInsertAfter,
int x,
int y,
int cx,
int cy,
UINT uFlags
);
DeferWindowPos函数
该DeferWindowPos函数更新指定的多重窗口-立场指定的窗口结构。然后,该函数返回的句柄更新的结构。该EndDeferWindowPos函数使用这种结构中的信息改变位置和大小的窗户,同时一些。该BeginDeferWindowPos函数创建的结构。
参数
hWinPosInfo
[in]句柄多重窗口-位置结构,它包含一个或多个窗口的大小和位置信息。这个结构返回BeginDeferWindowPos或最近调用DeferWindowPos。
hWnd
[in]句柄那些更新信息存储结构中的窗口。所有在多窗口的窗口-地位结构必须具有相同的父。
hWndInsertAfter
[in]的窗口句柄前面的Z顺序中的位置窗口。此参数必须是一个窗口句柄或下列值之一。此参数被忽略,如果SWP_NOZORDER标志在uFlags参数设置。
HWND_BOTTOM
把窗口的Z顺序的底部。如果hWnd参数确定了最顶层窗口,窗口失去了最顶层的地位,是在所有其他窗口的底部。
HWND_NOTOPMOST
把窗口放在高于一切的非最顶层窗口(即背后最顶层窗口)。此标志无效如果窗口已经是一个非最顶层窗口。
HWND_TOP
把窗口的Z序的顶部。
HWND_TOPMOST
把窗口放在上述所有非顶层窗口。窗口保持其最顶端的位置,即使它被停用。
x
[in]指定的x坐标窗口的左上角。
y
[in]指定的y坐标窗口的左上角。
国泰航空
[in]指定窗口的新宽度,以像素为单位。
赛扬
[in]指定窗口的新高度,以像素为单位。
uFlags
[in]指定下列值的组合影响的大小和窗口的位置。
SWP_DRAWFRAME
绘制一个框(定义在窗口的类的描述)周围的窗口。
SWP_FRAMECHANGED
发送WM_NCCALCSIZE消息窗口,即使窗口的大小没有改变。如果此标志没有被指定,WM_NCCALCSIZE只有当发送窗口的大小被改变。
SWP_HIDEWINDOW
隐藏窗口。
SWP_NOACTIVATE
不激活的窗口。如果此标志没有设置,窗口被激活,并移动到顶部无论是最顶层或非顶层组(对hWndInsertAfter参数设置而定)。
SWP_NOCOPYBITS
丢弃的客户区的全部内容。如果此标志没有被指定的客户区的有效内容被保存和复制到后回客户区窗口大小或重新定位。
SWP_NOMOVE
保留当前位置(忽略x和y参数)。
SWP_NOOWNERZORDER
不改变所有者窗口的Z顺序中的位置。
SWP_NOREDRAW
不重绘的变化。如果设置此标志,没有发生任何形式的油漆。这适用于客户区,非工作区(包括标题栏和滚动条),和任何一个窗口的结果发现父窗口的一部分被移动。当此标志设置,应用程序必须明确失效或重绘的窗口和父窗口需要重画的任何部分。
SWP_NOREPOSITION
相同SWP_NOOWNERZORDER标志。
SWP_NOSENDCHANGING
阻止接收WM_WINDOWPOSCHANGING消息的窗口。
SWP_NOSIZE
保留当前大小(忽略了国泰航空和cy参数)。
SWP_NOZORDER
保留当前Z顺序(忽略hWndInsertAfter参数)。
SWP_SHOWWINDOW
显示窗口。
返回值
返回值标识更新的多重窗口-位置结构。在处理这个函数返回的可能不同的句柄传递给函数。新的处理,这个函数返回应在下次调用该DeferWindowPos或EndDeferWindowPos传递给函数。
如果没有足够的系统资源,进行功能获得成功,返回值为NULL。为了获得更多错误信息,调用GetLastError。
备注
如果对DeferWindowPos调用失败,应用程序应该放弃的窗口定位操作,而不是调用EndDeferWindowPos。
如果没有指定SWP_NOZORDER,系统地按在hWnd参数的位置后,发现该hWndInsertAfter参数标识的窗口的窗口。如果hWndInsertAfter为NULL或HWND_TOP,系统地在Z顺序顶部由hWnd窗口。如果hWndInsertAfter设置为HWND_BOTTOM,系统地在Z顺序底部由hWnd窗口。
所有子窗口坐标是相对于左上角的父窗口的客户区角落。
一个窗口也可通过设置hWndInsertAfter的HWND_TOPMOST标志,并确保SWP_NOZORDER标志未设置,或设置窗口的Z顺序中的位置,使之高于任何现有的最上面的窗口是一个顶层窗口。当一个非最顶层窗口是由最顶端,其拥有的窗户也最顶端。其所有者,但是,没有改变。
如果既不SWP_NOACTIVATE也不SWP_NOZORDER标志被指定(即,当应用程序要求一个窗口被激活的同时,其在Z顺序改变位置),在hWndInsertAfter指定的值是用于以下情况下才:
无论是HWND_TOPMOST也不HWND_NOTOPMOST标志在hWndInsertAfter指定。
由hWnd确定窗口不是活动窗口。
应用程序不能激活也没有把它的Z顺序最不活动的窗口。应用程序可以改变一个激活的窗口在Z顺序不受限制的地位,或者它可以激活一个窗口,然后将其移动到了最顶层或非顶层窗口之上。
阿最顶层窗口不再是最顶端的,如果是定位到Z顺序或在任何非最顶层窗口的底部(HWND_BOTTOM)。当一个最顶层窗口是由非顶层,其业主和其拥有的窗户也非最顶层窗口。
一个非最顶层窗口可以拥有最顶层窗口,而不是相反。任何窗口(例如,一个对话框),由最顶层窗口本身拥有了最顶层窗口,以确保所有国有窗口逗留超过其所有者。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为Unicode版本。
参见
视窗概述,BeginDeferWindowPos,EndDeferWindowPos,ShowWindow
==英文原文==DeferWindowPos Function
The DeferWindowPos function updates the specified multiple-window – position structure for the specified window. The function then returns a handle to the updated structure. The EndDeferWindowPos function uses the information in this structure to change the position and size of a number of windows simultaneously. The BeginDeferWindowPos function creates the structure.
Syntax
HDWP DeferWindowPos( HDWP hWinPosInfo,
HWND hWnd,
HWND hWndInsertAfter,
int x,
int y,
int cx,
int cy,
UINT uFlags
);
Parameters
hWinPosInfo
[in] Handle to a multiple-window – position structure that contains size and position information for one or more windows. This structure is returned by BeginDeferWindowPos or by the most recent call to DeferWindowPos.
hWnd
[in] Handle to the window for which update information is stored in the structure. All windows in a multiple-window – position structure must have the same parent.
hWndInsertAfter
[in] Handle to the window that precedes the positioned window in the Z order. This parameter must be a window handle or one of the following values. This parameter is ignored if the SWP_NOZORDER flag is set in the uFlags parameter.
HWND_BOTTOM
Places the window at the bottom of the Z order. If the hWnd parameter identifies a topmost window, the window loses its topmost status and is placed at the bottom of all other windows.
HWND_NOTOPMOST
Places the window above all non-topmost windows (that is, behind all topmost windows). This flag has no effect if the window is already a non-topmost window.
HWND_TOP
Places the window at the top of the Z order.
HWND_TOPMOST
Places the window above all non-topmost windows. The window maintains its topmost position even when it is deactivated.
x
[in] Specifies the x-coordinate of the window's upper-left corner.
y
[in] Specifies the y-coordinate of the window's upper-left corner.
cx
[in] Specifies the window's new width, in pixels.
cy
[in] Specifies the window's new height, in pixels.
uFlags
[in] Specifies a combination of the following values that affect the size and position of the window.
SWP_DRAWFRAME
Draws a frame (defined in the window's class description) around the window.
SWP_FRAMECHANGED
Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed.
SWP_HIDEWINDOW
Hides the window.
SWP_NOACTIVATE
Does not activate the window. If this flag is not set, the window is activated and moved to the top of either the topmost or non-topmost group (depending on the setting of the hWndInsertAfter parameter).
SWP_NOCOPYBITS
Discards the entire contents of the client area. If this flag is not specified, the valid contents of the client area are saved and copied back into the client area after the window is sized or repositioned.
SWP_NOMOVE
Retains the current position (ignores the x and y parameters).
SWP_NOOWNERZORDER
Does not change the owner window's position in the Z order.
SWP_NOREDRAW
Does not redraw changes. If this flag is set, no repainting of any kind occurs. This applies to the client area, the nonclient area (including the title bar and scroll bars), and any part of the parent window uncovered as a result of the window being moved. When this flag is set, the application must explicitly invalidate or redraw any parts of the window and parent window that need redrawing.
SWP_NOREPOSITION
Same as the SWP_NOOWNERZORDER flag.
SWP_NOSENDCHANGING
Prevents the window from receiving the WM_WINDOWPOSCHANGING message.
SWP_NOSIZE
Retains the current size (ignores the cx and cy parameters).
SWP_NOZORDER
Retains the current Z order (ignores the hWndInsertAfter parameter).
SWP_SHOWWINDOW
Displays the window.
Return Value
The return value identifies the updated multiple-window – position structure. The handle returned by this function may differ from the handle passed to the function. The new handle that this function returns should be passed during the next call to the DeferWindowPos or EndDeferWindowPos function.
If insufficient system resources are available for the function to succeed, the return value is NULL. To get extended error information, call GetLastError .
Remarks
If a call to DeferWindowPos fails, the application should abandon the window-positioning operation and not call EndDeferWindowPos.
If SWP_NOZORDER is not specified, the system places the window identified by the hWnd parameter in the position following the window identified by the hWndInsertAfter parameter. If hWndInsertAfter is NULL or HWND_TOP, the system places the hWnd window at the top of the Z order. If hWndInsertAfter is set to HWND_BOTTOM, the system places the hWnd window at the bottom of the Z order.
All coordinates for child windows are relative to the upper-left corner of the parent window's client area.
A window can be made a topmost window either by setting hWndInsertAfter to the HWND_TOPMOST flag and ensuring that the SWP_NOZORDER flag is not set, or by setting the window's position in the Z order so that it is above any existing topmost windows. When a non-topmost window is made topmost, its owned windows are also made topmost. Its owners, however, are not changed.
If neither the SWP_NOACTIVATE nor SWP_NOZORDER flag is specified (that is, when the application requests that a window be simultaneously activated and its position in the Z order changed), the value specified in hWndInsertAfter is used only in the following circumstances:
Neither the HWND_TOPMOST nor HWND_NOTOPMOST flag is specified in hWndInsertAfter.
The window identified by hWnd is not the active window.
An application cannot activate an inactive window without also bringing it to the top of the Z order. An application can change an activated window's position in the Z order without restrictions, or it can activate a window and then move it to the top of the topmost or non-topmost windows.
A topmost window is no longer topmost if it is repositioned to the bottom (HWND_BOTTOM) of the Z order or after any non-topmost window. When a topmost window is made non-topmost, its owners and its owned windows are also made non-topmost windows.
A non-topmost window may own a topmost window, but not vice versa. Any window (for example, a dialog box) owned by a topmost window is itself made a topmost window to ensure that all owned windows stay above their owner.
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as Unicode version.
See Also
Windows Overview , BeginDeferWindowPos , EndDeferWindowPos , ShowWindow
==原始网址==http://msdn.microsoft.com/en-us/library/ms632681(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:22:14