网站首页  词典首页

请输入您要查询的函数:

 

术语 createenhmetafile
释义 CreateEnhMetaFile
语法:
HDC CreateEnhMetaFile(
__in HDC hdcRef,
__in LPCTSTR lpFilename,
__in const RECT *lpRect,
__in LPCTSTR lpDescription
);
CreateEnhMetaFile功能
该CreateEnhMetaFile函数创建了一个增强型图元文件格式的设备上下文。此设备方面,可以用来存储设备无关的图片。
参数
hdcRef [in]
一个句柄,参考设备的增强型图元。此参数可以为NULL有更多信息,请参见备注。
lpFilename [in]
一个增强型图元文件指针文件名创建。如果该参数为NULL,增强型图元文件是存储的基础,其内容是丧失了使用功能的DeleteEnhMetaFile时被删除。
lpRect [in]
一个RECT结构,指定的尺寸(以0.01毫米单位)图片的指针存储在增强型图元。
lpDescription [in]
一个字符串,它指定的应用程序创建的图片,以及图片的标题名称的指针。此参数可以为NULL有更多信息,请参见备注。
返回值
如果函数成功,返回值是一个句柄为增强型图元文件设备上下文。
如果函数失败,返回值为NULL。
备注
凡文本参数必须使用Unicode字符作为宽字符函数CreateEnhMetaFile功能。凡文本参数必须使用Windows字符集,文字的使用功能,作为一个ANSI此功能。
该系统采用的参考设备的hdcRef参数确定的记录决议和设备上的图片最初出现单位。如果hdcRef参数为NULL,它使用参考当前的显示设备。
RECT结构的左和高层人士指出,由lpRect参数必须大于右侧和底部的成员,分别少。沿着矩形的边缘点都包含在图片。如果lpRect为NULL,图形设备接口(GDI)计算最小的矩形围绕应用程序绘制的图片尺寸。在lpRect参数应尽可能提供。
该字符串指出的lpDescription参数必须包含一个应用程序之间的名称和图片名称,必须终止与两个空charactersfor空字符,例如,“某某图形编辑\\ 0Bald鹰\\ 0 \\ 0”,其中\\ 0表示空字符。如果lpDescription为NULL,没有任何的增强型图元文件标题中的相应条目。
应用程序使用的设备上下文这个函数中创建存储在增强型图元的图形画面。在确定该设备处理方面,可以传递给任何GDI函数。
经过应用程序存储在一个增强型图元文件图片,它可以显示在任何输出设备通过调用PlayEnhMetaFile函数的图片。当显示的图片,系统采用矩形指出的lpRect参数和参考设备的决议数据,定位和规模的图片。
该设备上下文此函数返回包含相同的默认属性与任何新的设备上下文关联。
应用程序必须使用GetWinMetaFileBits函数将一个增强型图元较旧的Windows图元文件格式。
为增强型图元文件名应该使用。电动势扩展。
实例
有关示例,请参阅创建增强型图元。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode和ANSI namesCreateEnhMetaFileW(Unicode)和CreateEnhMetaFileA(ANSI)的
参见
图元文件概述
图元文件函数
CloseEnhMetaFile
DeleteEnhMetaFile
GetEnhMetaFileDescription
GetEnhMetaFileHeader
GetWinMetaFileBits
PlayEnhMetaFile
RECT
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==CreateEnhMetaFile Function
The CreateEnhMetaFile function creates a device context for an enhanced-format metafile. This device context can be used to store a device-independent picture.
Syntax
HDC CreateEnhMetaFile(
__in HDC hdcRef,
__in LPCTSTR lpFilename,
__in const RECT *lpRect,
__in LPCTSTR lpDescription
);
Parameters
hdcRef [in]
A handle to a reference device for the enhanced metafile. This parameter can be NULL; for more information, see Remarks.
lpFilename [in]
A pointer to the file name for the enhanced metafile to be created. If this parameter is NULL, the enhanced metafile is memory based and its contents are lost when it is deleted by using the DeleteEnhMetaFile function.
lpRect [in]
A pointer to a RECT structure that specifies the dimensions (in .01-millimeter units) of the picture to be stored in the enhanced metafile.
lpDescription [in]
A pointer to a string that specifies the name of the application that created the picture, as well as the picture's title. This parameter can be NULL; for more information, see Remarks.
Return Value
If the function succeeds, the return value is a handle to the device context for the enhanced metafile.
If the function fails, the return value is NULL.
Remarks
Where text arguments must use Unicode characters, use the CreateEnhMetaFile function as a wide-character function. Where text arguments must use characters from the Windows character set, use this function as an ANSI function.
The system uses the reference device identified by the hdcRef parameter to record the resolution and units of the device on which a picture originally appeared. If the hdcRef parameter is NULL, it uses the current display device for reference.
The left and top members of the RECT structure pointed to by the lpRect parameter must be less than the right and bottom members, respectively. Points along the edges of the rectangle are included in the picture. If lpRect is NULL, the graphics device interface (GDI) computes the dimensions of the smallest rectangle that surrounds the picture drawn by the application. The lpRect parameter should be provided where possible.
The string pointed to by the lpDescription parameter must contain a null character between the application name and the picture name and must terminate with two null charactersfor example, "XYZ Graphics Editor\\0Bald Eagle\\0\\0", where \\0 represents the null character. If lpDescription is NULL, there is no corresponding entry in the enhanced-metafile header.
Applications use the device context created by this function to store a graphics picture in an enhanced metafile. The handle identifying this device context can be passed to any GDI function.
After an application stores a picture in an enhanced metafile, it can display the picture on any output device by calling the PlayEnhMetaFile function. When displaying the picture, the system uses the rectangle pointed to by the lpRect parameter and the resolution data from the reference device to position and scale the picture.
The device context returned by this function contains the same default attributes associated with any new device context.
Applications must use the GetWinMetaFileBits function to convert an enhanced metafile to the older Windows metafile format.
The file name for the enhanced metafile should use the .emf extension.
Examples
For an example, see Creating an Enhanced Metafile .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode and ANSI namesCreateEnhMetaFileW (Unicode) and CreateEnhMetaFileA (ANSI)
See Also
Metafiles Overview
Metafile Functions
CloseEnhMetaFile
DeleteEnhMetaFile
GetEnhMetaFileDescription
GetEnhMetaFileHeader
GetWinMetaFileBits
PlayEnhMetaFile
RECT
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd183498(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:23:29