c++怎么控制在MM_HIMETRIC模式下,中文的显示
c++如何控制在MM_HIMETRIC模式下,中文的显示?
在MM_HIMETRIC模式下也就是0.01mm的显示模式下,textout中文无法显示。但是如果用MM_LOMETRIC或者MM_TEXT模式都可以显示,只是字的大小不一样。
我想问的问题就是:
如何通过textout在MM_HIMETRIC模式下,在窗口显示放大的中文(数字和等号这样的符号可以显示。唯独中文不行)。或者说,随意放大和缩小固定单位(厘米或者英寸)的字体?
我是用在打印预览上。用MM_HIMETRIC模式。需要将图标放大八倍才能看清楚,但是文字如何放大呢?
谢谢大侠
------解决方案--------------------
Text Functions
TextOut Writes a character string at a specified location using the currently selected font.
ExtTextOut Writes a character string within a rectangular region using the currently selected font.
TabbedTextOut Writes a character string at a specified location, expanding tabs to the values specified in an array of tab-stop positions.
DrawText Draws formatted text in the specified rectangle.
GetTextExtent Computes the width and height of a line of text on the attribute device context using the current font to determine the dimensions.
GetOutputTextExtent Computes the width and height of a line of text on the output device context using the current font to determine the dimensions.
GetTabbedTextExtent Computes the width and height of a character string on the attribute device context.
GetOutputTabbedTextExtent Computes the width and height of a character string on the output device context.
GrayString Draws dimmed (grayed) text at the given location.
GetTextAlign Retrieves the text-alignment flags.
SetTextAlign Sets the text-alignment flags.
GetTextFace Copies the typeface name of the current font into a buffer as a null-terminated string.
GetTextMetrics Retrieves the metrics for the current font from the attribute device context.
GetOutputTextMetrics Retrieves the metrics for the current font from the output device context.
SetTextJustification Adds space to the break characters in a string.
GetTextCharacterExtra Retrieves the current setting for the amount of intercharacter spacing.
SetTextCharacterExtra Sets the amount of intercharacter spacing.
Font Functions
GetFontData Retrieves font metric information from a scalable font file. The information to retrieve is identified by specifying an offset into the font file and the length of the information to return.
GetKerningPairs Retrieves the character kerning pairs for the font that is currently selected in the specified device context.
GetOutlineTextMetrics Retrieves font metric information for TrueType fonts.
GetGlyphOutline Retrieves the outline curve or bitmap for an outline character in the current font.
GetCharABCWidths Retrieves the widths, in logical units, of consecutive characters in a given range from the current font.
GetCharWidth Retrieves the fractional widths of consecutive characters in a given range from the current font.
GetOutputCharWidth Retrieves the widths of individual characters in a consecutive group of characters from the current font using the output device context.
SetMapperFlags Alters the algorithm that the font mapper uses when it maps logical fonts to physical fonts.
GetAspectRatioFilter Retrieves the setting for the current aspect-ratio filter.
------解决方案--------------------
Coordinate Functions
DPtoHIMETRIC Converts device units into HIMETRIC units.
DPtoLP Converts device units into logical units.
HIMETRICtoDP Converts HIMETRIC units into device units.
在MM_HIMETRIC模式下也就是0.01mm的显示模式下,textout中文无法显示。但是如果用MM_LOMETRIC或者MM_TEXT模式都可以显示,只是字的大小不一样。
我想问的问题就是:
如何通过textout在MM_HIMETRIC模式下,在窗口显示放大的中文(数字和等号这样的符号可以显示。唯独中文不行)。或者说,随意放大和缩小固定单位(厘米或者英寸)的字体?
我是用在打印预览上。用MM_HIMETRIC模式。需要将图标放大八倍才能看清楚,但是文字如何放大呢?
谢谢大侠
------解决方案--------------------
Text Functions
TextOut Writes a character string at a specified location using the currently selected font.
ExtTextOut Writes a character string within a rectangular region using the currently selected font.
TabbedTextOut Writes a character string at a specified location, expanding tabs to the values specified in an array of tab-stop positions.
DrawText Draws formatted text in the specified rectangle.
GetTextExtent Computes the width and height of a line of text on the attribute device context using the current font to determine the dimensions.
GetOutputTextExtent Computes the width and height of a line of text on the output device context using the current font to determine the dimensions.
GetTabbedTextExtent Computes the width and height of a character string on the attribute device context.
GetOutputTabbedTextExtent Computes the width and height of a character string on the output device context.
GrayString Draws dimmed (grayed) text at the given location.
GetTextAlign Retrieves the text-alignment flags.
SetTextAlign Sets the text-alignment flags.
GetTextFace Copies the typeface name of the current font into a buffer as a null-terminated string.
GetTextMetrics Retrieves the metrics for the current font from the attribute device context.
GetOutputTextMetrics Retrieves the metrics for the current font from the output device context.
SetTextJustification Adds space to the break characters in a string.
GetTextCharacterExtra Retrieves the current setting for the amount of intercharacter spacing.
SetTextCharacterExtra Sets the amount of intercharacter spacing.
Font Functions
GetFontData Retrieves font metric information from a scalable font file. The information to retrieve is identified by specifying an offset into the font file and the length of the information to return.
GetKerningPairs Retrieves the character kerning pairs for the font that is currently selected in the specified device context.
GetOutlineTextMetrics Retrieves font metric information for TrueType fonts.
GetGlyphOutline Retrieves the outline curve or bitmap for an outline character in the current font.
GetCharABCWidths Retrieves the widths, in logical units, of consecutive characters in a given range from the current font.
GetCharWidth Retrieves the fractional widths of consecutive characters in a given range from the current font.
GetOutputCharWidth Retrieves the widths of individual characters in a consecutive group of characters from the current font using the output device context.
SetMapperFlags Alters the algorithm that the font mapper uses when it maps logical fonts to physical fonts.
GetAspectRatioFilter Retrieves the setting for the current aspect-ratio filter.
------解决方案--------------------
Coordinate Functions
DPtoHIMETRIC Converts device units into HIMETRIC units.
DPtoLP Converts device units into logical units.
HIMETRICtoDP Converts HIMETRIC units into device units.