网站首页  词典首页

请输入您要查询的函数:

 

术语 getenhmetafilepaletteentries
释义 GetEnhMetaFilePaletteEntries
语法:
UINT GetEnhMetaFilePaletteEntries(
__in HENHMETAFILE hemf,
__in UINT cEntries,
__out LPPALETTEENTRY lppe
);
GetEnhMetaFilePaletteEntries功能
该GetEnhMetaFilePaletteEntries函数从指定可选的增强型图元文件调色板项。
参数
hemf [in]
一个句柄,增强型图元。
舜帝 [in]
项数要检索的可选调色板。
lppe [out]
一个一个PALETTEENTRY结构的数组,它接收调色板颜色的指针。该数组必须至少包含许多结构,因为由舜帝参数指定的项。
返回值
如果数组指针为NULL和增强型图元文件包含一个可选的调色板,返回值是项增强型图元文件中的调色板的数目;如果数组指针是一个有效的指针和增强型图元文件包含一个可选的调色板,则返回值为复制的条目数,如果图元文件不包含一个可选的调色板,返回值是零。否则,返回值是GDI_ERROR。
备注
应用程序可以存储在一个增强型图元文件通过调用CreatePalette并在创建图片和图元文件存储在它SetPaletteEntries功能可选调色板。这样,应用程序可以实现图片时,在不同的设备上显示的颜色一致。
显示的应用程序中的图片增强型图元存储可以调用GetEnhMetaFilePaletteEntries函数来确定是否存在可选的调色板。如果有,应用程序可以调用函数的GetEnhMetaFilePaletteEntries第二次来检索调色板条目,然后创建一个逻辑调色板(通过使用CreatePalette功能),选择到它的设备上下文(通过使用SelectPalette功能),然后实现它(通过使用RealizePalette函数)。逻辑调色板后,已实现,调用PlayEnhMetaFile功能显示图片使用其原来的颜色。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
图元文件概述
图元文件函数
CreatePalette
PALETTEENTRY
PlayEnhMetaFile
RealizePalette
SelectPalette
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GetEnhMetaFilePaletteEntries Function
The GetEnhMetaFilePaletteEntries function retrieves optional palette entries from the specified enhanced metafile.
Syntax
UINT GetEnhMetaFilePaletteEntries(
__in HENHMETAFILE hemf,
__in UINT cEntries,
__out LPPALETTEENTRY lppe
);
Parameters
hemf [in]
A handle to the enhanced metafile.
cEntries [in]
The number of entries to be retrieved from the optional palette.
lppe [out]
A pointer to an array of PALETTEENTRY structures that receives the palette colors. The array must contain at least as many structures as there are entries specified by the cEntries parameter.
Return Value
If the array pointer is NULL and the enhanced metafile contains an optional palette, the return value is the number of entries in the enhanced metafile's palette; if the array pointer is a valid pointer and the enhanced metafile contains an optional palette, the return value is the number of entries copied; if the metafile does not contain an optional palette, the return value is zero. Otherwise, the return value is GDI_ERROR.
Remarks
An application can store an optional palette in an enhanced metafile by calling the CreatePalette and SetPaletteEntries functions before creating the picture and storing it in the metafile. By doing this, the application can achieve consistent colors when the picture is displayed on a variety of devices.
An application that displays a picture stored in an enhanced metafile can call the GetEnhMetaFilePaletteEntries function to determine whether the optional palette exists. If it does, the application can call the GetEnhMetaFilePaletteEntries function a second time to retrieve the palette entries and then create a logical palette (by using the CreatePalette function), select it into its device context (by using the SelectPalette function), and then realize it (by using the RealizePalette function). After the logical palette has been realized, calling the PlayEnhMetaFile function displays the picture using its original colors.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
See Also
Metafiles Overview
Metafile Functions
CreatePalette
PALETTEENTRY
PlayEnhMetaFile
RealizePalette
SelectPalette
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144884(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 11:26:10