На главную

On-line справка по Win32 API

Написать письмо
БЕСПЛАТНАЯ ежедневная online лотерея! Выигрывай каждый день БЕСПЛАТНО!
Список всех статей A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z | Скачать Вниз

GetWinMetaFileBits



The GetWinMetaFileBits function converts the enhanced-format records from a metafile into Windows-format records and stores the converted records in the specified buffer.

UINT GetWinMetaFileBits(

HENHMETAFILE hemf, // handle to the enhanced metafile
UINT cbBuffer, // buffer size
LPBYTE lpbBuffer, // pointer to buffer
INT fnMapMode, // mapping mode
HDC hdcRef // handle of reference device context
);


Parameters

hemf

Identifies the enhanced metafile.

cbBuffer

Specifies the size, in bytes, of the buffer into which the converted records are to be copied.

lpbBuffer

Points to the buffer into which the converted records are to be copied. If lpbBuffer is NULL, GetWinMetaFileBits returns the the number of bytes required to store the converted metafile records.

fnMapMode

Specifies the mapping mode to use in the converted metafile.

hdcRef

Identifies the reference device context.



Return Values

If the function succeeds and the buffer pointer is NULL, the return value is the number of bytes required to store the converted records; if the function succeeds and the buffer pointer is a valid pointer, the return value is the size of the metafile data in bytes.
If the function fails, the return value is zero.

Remarks

This function converts an enhanced metafile into a Windows-format metafile so that its picture can be displayed in an application that recognizes the older format.
Windows uses the reference device context to determine the resolution of the converted metafile.
The GetWinMetaFileBits function does not invalidate the enhanced metafile handle. An application should call the DeleteEnhMetaFile function to release the handle when it is no longer needed.

Due to the limitations of the Windows-format metafile, some information can be lost in the retrieved metafile contents. For example, an original call to the PolyBezier function in the enhanced metafile may be converted into a call to the Polyline function in the Windows-format metafile, because there is no equivalent PolyBezier function in the Windows format.
Windows 3.x applications define the viewport origin and extents of a picture stored in a Windows-format metafile. As a result, the Windows-format records created by GetWinMetaFileBits do not contain the SetViewportOrgEx and SetViewportExtEx functions. However, GetWinMetaFileBits does create Windows-format records for the SetWindowExtEx and SetMapMode functions.

To create a scalable Windows-format metafile, specify MM_ANISOTROPIC as the fnMapMode parameter.
The upper-left corner of the metafile picture is always mapped to the origin of the reference device.

See Also

DeleteEnhMetaFile, PolyBezier, Polyline, SetMapMode, SetViewportOrgEx, SetViewportExtEx, SetWindowExtEx, SetWinMetaFileBits


Пригласи друзей и счет твоего мобильника всегда будет положительным!
Предыдущая статья
 
Сайт Народ.Ру Интернет
Следующая статья
Пригласи друзей и счет твоего мобильника всегда будет положительным!

GetWinMetaFileBits



Функция GetWinMetaFileBits преобразовывает расширенный формат записей из метафайла в формат Windows-записывает и загружает преобразованные записи в определенный буфер.

UINT GetWinMetaFileBits(

HENHMETAFILE hemf, // РУЧКА в расширенный метафайл UINT cbBuffer, // буферный размер LPBYTE lpbBuffer, // указатель, чтобы буферизовать INT fnMapMode, // распределение режима HDC hdcRef // контекст исходного устройства ручки
);


Параметры

hemf

Идентифицирует расширенный метафайл.

cbBuffer

Определяет размер, в байтах, буфера в который преобразованные записи должны быть скопированы.

lpbBuffer

Точки на буфер в которые преобразованные записи должны быть скопированы. Если lpbBuffer НЕДЕЙСТВИТЕЛЕН, GetWinMetaFileBits возвращает количество байтов требовавшихся, чтобы загружать преобразованные записи метафайла.

fnMapMode

Определяет отображающий режим, чтобы использоваться в преобразованном метафайле.

hdcRef

Идентифицирует контекст устройства ссылки.



Обратные Величины

Если функция добивается успеха и буферный указатель НЕДЕЙСТВИТЕЛЕН, обратная величина является количеством байтов требовавшихся, чтобы загружать преобразованные записи; если функция добивается успеха и буферный указатель является правильным указателем, обратная величина является размером данных метафайла в байтах.
Если функция терпит неудачу, обратная величина нулевая.

Замечания

Эта функция преобразовывает расширенный метафайл в метафайл формата Windows-чтобы изображение может быть отображено в приложении, которое признает более старый формат.
Windows использует контекст устройства ссылки, чтобы определять разрешение преобразованного метафайла.
Функция GetWinMetaFileBits не аннулирует расширенную ручку метафайла. Приложение должно называть функцию DeleteEnhMetaFile, чтобы выпускать ручку когда она не - больше не нужно.

Из-за ограничений метафайла формата Windows-, некоторая информация может быть запутаться в извлеченном содержании метафайла. Например, оригинальный вызов в функцию PolyBezier в расширенном метафайле может быть преобразован на вызов в функцию Ломаной линии в метафайле формата Windows-, поскольку нет эквиалентной функции PolyBezier в формате Windows.
3.x Приложения Windows определяют начало viewport и протяженности изображения загруженные в метафайл формата Windows-. В результате, записи формата Windows-создавались GetWinMetaFileBits не содержать SetViewportOrgEx и функции SetViewportExtEx. Тем не менее, GetWinMetaFileBits создает записи формата Windows-для SetWindowExtEx и функции SetMapMode.

Для того, чтобы создавать масштабируемый метафайл формата Windows-, определите MM_ANISOTROPIC как параметр fnMapMode.
Верхний левый угол изображения метафайла всегда отображен в начало устройства ссылки.

Смотри Также

DeleteEnhMetaFile, PolyBezier, Polyline, SetMapMode, SetViewportOrgEx, SetViewportExtEx, SetWindowExtEx, SetWinMetaFileBits


Вверх Version 1.3, Oct 26 2010 © 2007, 2010, mrhx Вверх
 mrhx software  Русский перевод OpenGL  Русский перевод Win32 API
 
Используются технологии uCoz