网站首页  词典首页

请输入您要查询的函数:

 

术语 updatelayeredwindow
释义 UpdateLayeredWindow
语法:
BOOL UpdateLayeredWindow( HWND hwnd,
HDC hdcDst,
POINT *pptDst,
SIZE *psize,
HDC hdcSrc,
POINT *pptSrc,
COLORREF crKey,
BLENDFUNCTION *pblend,
DWORD dwFlags
);
UpdateLayeredWindow功能
该UpdateLayeredWindow函数更新的位置,大小,形状,内容和分层窗口半透明。
参数
hwnd
[in]句柄分层窗口。分层窗口创建时指定WS_EX_LAYERED创建CreateWindowEx函数与窗口。
hdcDst
[in]
句柄设备上下文的屏幕(区)。这是处理通过指定空时调用函数获得。它用于调色板颜色匹配时,窗口的内容进行更新。如果hdcDst ISNULL下面,默认调色板将被使用。
如果hdcSrc为NULL,hdcDst必须为NULL。
pptDst
[in]指向一个POINT结构,指定新的分层窗口的屏幕位置。如果目前的情况不会改变,pptDst可以为NULL。
psize
[in]指向一个规模结构,指定新的分层窗口的大小。如果窗口的大小不会改变,psize可以为NULL。如果hdcSrc为NULL,psize必须为NULL。
hdcSrc
[in]句柄直流表面定义分层窗口。这个句柄可以通过调用CreateCompatibleDC函数获得。如果形状和窗口的可视范围内不会改变,hdcSrc可以为NULL。
pptSrc
[in]指向一个POINT结构,指定的设备上下文层的位置。如果hdcSrc为NULL,pptSrc应为NULL。
crKey
[in] COLORREF结构,指定颜色键时使用的分层窗口组成。要生成COLORREF,使用RGB宏。
pblend
[in]指向1 BLENDFUNCTION结构,它指定了透明度值时使用的分层窗口组成。
dwFlags
[in]此参数可以是下列值之一。
ULW_ALPHA
使用pblend的混合功能。如果显示模式是256色或更少,这个价值的影响是作为ULW_OPAQUE效果相同。
ULW_COLORKEY
使用crKey颜色的透明度。
ULW_OPAQUE
绘制一个不透明的分层窗口。
如果hdcSrc为NULL,dwFlags应为零。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
源DC的表面应包含定义的分层窗口可见的内容。例如,您可以选择将通过调用CreateCompatibleDC函数获得的设备上下文位图。
应用程序应呼吁hdcSrc设备上下文SetLayout正确设置镜像模式。 SetLayout将正确地反映到一个HDC所有绘画妥善保存文字字形和(可选)位图的方向秩序。它不能修改图纸到设备位无关位图(DIB)直接。有关更多信息,请参阅窗口布局和镜像。
该UpdateLayeredWindow函数保持窗口的屏幕上出现。下一个分层窗口的窗口不需要进行重新绘制时,发现由于对UpdateLayeredWindow调用,因为系统会自动重新喷漆。这使人们分层窗口无缝动画。
UpdateLayeredWindow总是更新整个窗口。要更新一个窗口的一部分,使用传统的WM_PAINT消息,并设置值混合使用SetLayeredWindowAttributes。
为了达到最佳的分层绘图窗口和窗口的任何潜在的性能,分层窗口,应尽可能小。应用程序也应该处理该消息并重新创建它的分层窗口时,显示器的颜色深度的变化。
有关更多信息,请参阅分层窗口。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
2000年最低经营systemsWindows
参见
视窗概述,AlphaBlend,CreateCompatibleBitmap,SetWindowLong函数,SetWindowPos,TransparentBlt,UpdateLayeredWindowIndirect
==英文原文==UpdateLayeredWindow Function
The UpdateLayeredWindow function updates the position, size, shape, content, and translucency of a layered window.
Syntax
BOOL UpdateLayeredWindow( HWND hwnd,
HDC hdcDst,
POINT *pptDst,
SIZE *psize,
HDC hdcSrc,
POINT *pptSrc,
COLORREF crKey,
BLENDFUNCTION *pblend,
DWORD dwFlags
);
Parameters
hwnd
[in] Handle to a layered window. A layered window is created by specifying WS_EX_LAYERED when creating the window with the CreateWindowEx function.
hdcDst
[in]
Handle to a device context (DC) for the screen. This handle is obtained by specifying NULL when calling the function. It is used for palette color matching when the window contents are updated. If hdcDst isNULL, the default palette will be used.
If hdcSrc is NULL, hdcDst must be NULL.
pptDst
[in] Pointer to a POINT structure that specifies the new screen position of the layered window. If the current position is not changing, pptDst can be NULL.
psize
[in] Pointer to a SIZE structure that specifies the new size of the layered window. If the size of the window is not changing, psize can be NULL. If hdcSrc is NULL, psize must be NULL.
hdcSrc
[in] Handle to a DC for the surface that defines the layered window. This handle can be obtained by calling the CreateCompatibleDC function. If the shape and visual context of the window are not changing, hdcSrc can be NULL.
pptSrc
[in] Pointer to a POINT structure that specifies the location of the layer in the device context. If hdcSrc is NULL, pptSrc should be NULL.
crKey
[in] COLORREF structure that specifies the color key to be used when composing the layered window. To generate a COLORREF, use the RGB macro.
pblend
[in] Pointer to a BLENDFUNCTION structure that specifies the transparency value to be used when composing the layered window.
dwFlags
[in] This parameter can be one of the following values.
ULW_ALPHA
Use pblend as the blend function. If the display mode is 256 colors or less, the effect of this value is the same as the effect of ULW_OPAQUE.
ULW_COLORKEY
Use crKey as the transparency color.
ULW_OPAQUE
Draw an opaque layered window.
If hdcSrc is NULL, dwFlags should be zero.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
The source DC should contain the surface that defines the visible contents of the layered window. For example, you can select a bitmap into a device context obtained by calling the CreateCompatibleDC function.
An application should call SetLayout on the hdcSrc device context to properly set the mirroring mode. SetLayout will properly mirror all drawing into an HDC while properly preserving text glyph and (optionally) bitmap direction order. It cannot modify drawing directly into the bits of a device-independent bitmap (DIB). For more information, see Window Layout and Mirroring .
The UpdateLayeredWindow function maintains the window's appearance on the screen. The windows underneath a layered window do not need to be repainted when they are uncovered due to a call to UpdateLayeredWindow, because the system will automatically repaint them. This permits seamless animation of the layered window.
UpdateLayeredWindow always updates the entire window. To update part of a window, use the traditional WM_PAINT and set the blend value using SetLayeredWindowAttributes .
For best drawing performance by the layered window and any underlying windows, the layered window should be as small as possible. An application should also process the message and re-create its layered windows when the display's color depth changes.
For more information, see Layered Windows .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 2000
See Also
Windows Overview , AlphaBlend , CreateCompatibleBitmap , SetWindowLong , SetWindowPos , TransparentBlt , UpdateLayeredWindowIndirect
==原始网址==http://msdn.microsoft.com/en-us/library/ms633556(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:53