网站首页  词典首页

请输入您要查询的函数:

 

术语 redrawwindow
释义 RedrawWindow
语法:
BOOL RedrawWindow(
__in HWND hWnd,
__in const RECT *lprcUpdate,
__in HRGN hrgnUpdate,
__in UINT flags
);
RedrawWindow函数
该RedrawWindow函数更新指定的矩形或区域窗口的客户区。
参数
hWnd [in]
句柄到窗口重新划定。如果该参数为NULL,桌面窗口更新。
lprcUpdate [in]
一个 RECT结构包含坐标,设备单位更新的矩形,指针。此参数被忽略,如果hrgnUpdate参数标识的地区。
hrgnUpdate [in]
一个句柄,更新区域。如果同时hrgnUpdate和lprcUpdate参数是NULL,则整个客户区域被添加到更新区域。
旗 [in]
一个或多个重绘标志。此参数可用于无效或验证一个窗口,控制重新粉刷和控制的Windows是由RedrawWindow影响。
以下标志用于无效的窗口。
旗(失效)说明
RDW_ERASECauses窗口收到WM _ ERASEBKGND消息当窗口重新绘制。国旗的RDW_INVALIDATE还必须指定,否则,RDW_ERASE没有效果。
RDW_FRAMECauses任何的窗口的更新区域相交收到WM_NCPAINT消息非工作区的一部分。国旗的RDW_INVALIDATE还必须指定,否则,RDW_FRAME没有效果。在WM_NCPAINT消息通常不会发送期间RedrawWindow执行,除非任何RDW_UPDATENOW或RDW_ERASENOW是指定的。
RDW_INTERNALPAINTCauses一个WM_PAINT消息被张贴到窗口,不管任何窗口的一部分是无效的。
RDW_INVALIDATEInvalidates lprcUpdate或hrgnUpdate(只有一个可能是非空)。如果两者都为空,整个窗口失效。
以下标志用于验证窗口。
旗(验证)说明
RDW_NOERASESuppresses任何未决WM_ERASEBKGND消息。
RDW_NOFRAMESuppresses任何未决WM_NCPAINT消息。此标志必须与RDW_VALIDATE,通常与RDW_NOCHILDREN使用。 RDW_NOFRAME应小心使用,因为它可能导致一个窗口的部分髹不当。
RDW_NOINTERNALPAINTSuppresses任何未决的内部WM_PAINT消息。这个标志不影响源自非WM_PAINT消息,空更新的领域。
RDW_VALIDATEValidates lprcUpdate或hrgnUpdate(只有一个可能是非空)。如果两者都为空,整个窗口进行验证。这个标志不影响内部WM_PAINT消息。
控制以下标志出现时,重绘。 RedrawWindow不会重新绘制,除非这些标志之一是指定的。
FlagDescription
RDW_ERASENOWCauses受影响的Windows(如指明RDW_ALLCHILDREN和RDW_NOCHILDREN旗)接受WM_NCPAINT和WM_ERASEBKGND消息,如有必要,在函数返回。 WM_PAINT消息在接收普通的时间。
RDW_UPDATENOWCauses受影响的Windows(如指明RDW_ALLCHILDREN和RDW_NOCHILDREN旗)接受WM_NCPAINT,WM_ERASEBKGND,和WM_PAINT消息,如有必要,在函数返回。
默认情况下,受影响的窗口RedrawWindow取决于是否指定的窗口具有WS_CLIPCHILDREN风格。儿童窗口不是WS_CLIPCHILDREN作风的影响;非WS_CLIPCHILDREN窗户递归确认或无效,直到遇到WS_CLIPCHILDREN窗口。以下标志控制的窗口,由RedrawWindow功能产生影响。
FlagDescription
RDW_ALLCHILDRENIncludes child windows, if any, in the repainting operation.
RDW_NOCHILDRENExcludes子窗口,如果有的话,从重绘操作。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。
备注
当RedrawWindow用于无效的桌面窗口的一部分,桌面窗口不会收到WM_PAINT消息。重新绘制桌面,应用程序使用RDW_ERASE标志生成WM _ ERASEBKGND消息。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
参见
绘画和绘图概述
绘画和绘图功能
GetUpdateRect
GetUpdateRgn
InvalidateRect
InvalidateRgn
RECT
UpdateWindow
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==RedrawWindow Function
The RedrawWindow function updates the specified rectangle or region in a window's client area.
Syntax
BOOL RedrawWindow(
__in HWND hWnd,
__in const RECT *lprcUpdate,
__in HRGN hrgnUpdate,
__in UINT flags
);
Parameters
hWnd [in]
A handle to the window to be redrawn. If this parameter is NULL, the desktop window is updated.
lprcUpdate [in]
A pointer to a RECT structure containing the coordinates, in device units, of the update rectangle. This parameter is ignored if the hrgnUpdate parameter identifies a region.
hrgnUpdate [in]
A handle to the update region. If both the hrgnUpdate and lprcUpdate parameters are NULL, the entire client area is added to the update region.
flags [in]
One or more redraw flags. This parameter can be used to invalidate or validate a window, control repainting, and control which windows are affected by RedrawWindow.
The following flags are used to invalidate the window.
Flag (invalidation)Description
RDW_ERASECauses the window to receive a WM_ERASEBKGND message when the window is repainted. The RDW_INVALIDATE flag must also be specified; otherwise, RDW_ERASE has no effect.
RDW_FRAMECauses any part of the nonclient area of the window that intersects the update region to receive a WM_NCPAINT message. The RDW_INVALIDATE flag must also be specified; otherwise, RDW_FRAME has no effect. The WM_NCPAINT message is typically not sent during the execution of RedrawWindow unless either RDW_UPDATENOW or RDW_ERASENOW is specified.
RDW_INTERNALPAINTCauses a WM_PAINT message to be posted to the window regardless of whether any portion of the window is invalid.
RDW_INVALIDATEInvalidates lprcUpdate or hrgnUpdate (only one may be non-NULL). If both are NULL, the entire window is invalidated.

The following flags are used to validate the window.
Flag (validation)Description
RDW_NOERASESuppresses any pending WM_ERASEBKGND messages.
RDW_NOFRAMESuppresses any pending WM_NCPAINT messages. This flag must be used with RDW_VALIDATE and is typically used with RDW_NOCHILDREN. RDW_NOFRAME should be used with care, as it could cause parts of a window to be painted improperly.
RDW_NOINTERNALPAINTSuppresses any pending internal WM_PAINT messages. This flag does not affect WM_PAINT messages resulting from a non-NULL update area.
RDW_VALIDATEValidates lprcUpdate or hrgnUpdate (only one may be non-NULL). If both are NULL, the entire window is validated. This flag does not affect internal WM_PAINT messages.

The following flags control when repainting occurs. RedrawWindow will not repaint unless one of these flags is specified.
FlagDescription
RDW_ERASENOWCauses the affected windows (as specified by the RDW_ALLCHILDREN and RDW_NOCHILDREN flags) to receive WM_NCPAINT and WM_ERASEBKGND messages, if necessary, before the function returns. WM_PAINT messages are received at the ordinary time.
RDW_UPDATENOWCauses the affected windows (as specified by the RDW_ALLCHILDREN and RDW_NOCHILDREN flags) to receive WM_NCPAINT, WM_ERASEBKGND, and WM_PAINT messages, if necessary, before the function returns.

By default, the windows affected by RedrawWindow depend on whether the specified window has the WS_CLIPCHILDREN style. Child windows that are not the WS_CLIPCHILDREN style are unaffected; non-WS_CLIPCHILDREN windows are recursively validated or invalidated until a WS_CLIPCHILDREN window is encountered. The following flags control which windows are affected by the RedrawWindow function.
FlagDescription
RDW_ALLCHILDRENIncludes child windows, if any, in the repainting operation.
RDW_NOCHILDRENExcludes child windows, if any, from the repainting operation.

Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
When RedrawWindow is used to invalidate part of the desktop window, the desktop window does not receive a WM_PAINT message. To repaint the desktop, an application uses the RDW_ERASE flag to generate a WM_ERASEBKGND message.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
See Also
Painting and Drawing Overview
Painting and Drawing Functions
GetUpdateRect
GetUpdateRgn
InvalidateRect
InvalidateRgn
RECT
UpdateWindow
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd162911(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:15:58