⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tut5.html

📁 WINDOWS程序员使用指南--汇编基础
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
nEscapement:DWORD,\</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
nOrientation:DWORD,\</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
nWeight:DWORD,\</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
cItalic:DWORD,\</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
cUnderline:DWORD,\</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
cStrikeOut:DWORD,\</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
cCharSet:DWORD,\</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
cOutputPrecision:DWORD,\</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
cClipPrecision:DWORD,\</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
cQuality:DWORD,\</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
cPitchAndFamily:DWORD,\</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
lpFacename:DWORD</font></font></font></b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1></font></font></font>
<p><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>nHeight</b>&nbsp;&nbsp;
The desired height of the characters . 0 means use default size.</font></font></font>
<br><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>nWidth</b>&nbsp;&nbsp;
The desired width of the characters. Normally this value should be 0 which
allows Windows to match the width to the height. However, in our example,
the default width makes the characters hard to read, so I use the width
of 16 instead.</font></font></font>
<br><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>nEscapement&nbsp;</b>&nbsp;
Specifies the orientation of the next character output relative to the
previous one in tenths of a degree. Normally, set to 0. Set to 900 to have
all the characters go upward from the first character, 1800 to write backwards,
or 2700 to write each character from the top down.</font></font></font>
<br><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>nOrientation</b>&nbsp;&nbsp;
Specifies how much the character should be rotated when output in tenths
of a degree. Set to 900 to have all the characters lying on their backs,
1800 for upside-down writing, etc.</font></font></font>
<br><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>nWeight&nbsp;</b>&nbsp;
Sets the line thickness of each character. Windows defines the following
sizes:</font></font></font>
<ul><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_DONTCARE&nbsp;&nbsp;&nbsp;&nbsp;
equ 0</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_THIN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
equ 100</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_EXTRALIGHT&nbsp;
equ 200</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_ULTRALIGHT&nbsp;
equ 200</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_LIGHT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
equ 300</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_NORMAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
equ 400</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_REGULAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
equ 400</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_MEDIUM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
equ 500</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_SEMIBOLD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
equ 600</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_DEMIBOLD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
equ 600</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_BOLD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
equ 700</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_EXTRABOLD&nbsp;&nbsp;
equ 800</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_ULTRABOLD&nbsp;&nbsp;
equ 800</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_HEAVY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
equ 900</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>FW_BLACK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
equ 900</font></font></font></b></ul>
<font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>cItalic</b>&nbsp;&nbsp;
0 for normal, any other value for italic characters.</font></font></font>
<br><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>cUnderline</b>&nbsp;&nbsp;
0 for normal, any other value for underlined characters.</font></font></font>
<br><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>cStrikeOut</b>&nbsp;&nbsp;
0 for normal, any other value for characters with a line through the center.</font></font></font>
<br><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>cCharSet</b>&nbsp;
The character set of the font. Normally should be OEM_CHARSET which allows
Windows to select font which is operating system-dependent.</font></font></font>
<br><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>cOutputPrecision</b>&nbsp;
Specifies how much the selected font must be closely matched to the characteristics
we want. Normally should be OUT_DEFAULT_PRECIS which defines default font
mapping behavior.</font></font></font>
<br><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>cClipPrecision&nbsp;</b>
Specifies the clipping precision. The clipping precision defines how to
clip characters that are partially outside the clipping region. You should
be able to get by with CLIP_DEFAULT_PRECIS which defines the default clipping
behavior.</font></font></font>
<br><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>cQuality&nbsp;</b>
Specifies the output quality. The output quality defines how carefully
GDI must attempt to match the logical-font attributes to those of an actual
physical font. There are three choices: DEFAULT_QUALITY, PROOF_QUALITY
and&nbsp; DRAFT_QUALITY.</font></font></font>
<br><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>cPitchAndFamily</b>&nbsp;
Specifies pitch and family of the font. You must combine the pitch value
and the family value with "or" operator.</font></font></font>
<br><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1><b>lpFacename</b>&nbsp;
A pointer to a null-terminated string that specifies the typeface of the
font.</font></font></font><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1></font></font></font>
<p><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>The
description above is by no means comprehensive. You should refer to your
Win32 API reference for more details.</font></font></font><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1></font></font></font>
<p><b><font face="Arial,Helvetica"><font size=-1><font color="#CCCCCC">&nbsp;</font><font color="#999900">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
invoke SelectObject, hdc, eax</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#999900"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mov&nbsp;&nbsp;&nbsp; hfont,eax</font></font></font></b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1></font></font></font>
<p><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>After
we get the handle to the logical font, we must use it to select the font
into the device context by calling SelectObject. SelectObject puts the
new GDI objects such as pens, brushs, and fonts into the device context
to be used by GDI functions. It returns the handle to the replaced object
which we should save for future SelectObject call. After SelectObject call,
any text output function will use the font we just selected into the device
context.</font></font></font><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1></font></font></font>
<p><b><font face="Arial,Helvetica"><font color="#999900"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
RGB&nbsp;&nbsp;&nbsp; 200,200,50</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#999900"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
invoke SetTextColor,hdc,eax</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#999900"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
RGB&nbsp;&nbsp;&nbsp; 0,0,255</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#999900"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
invoke SetBkColor,hdc,eax</font></font></font></b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1></font></font></font>
<p><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>Use
RGB macro to create a 32-bit RGB value to be used by SetColorText and SetBkColor.</font></font></font><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1></font></font></font>
<p><b><font face="Arial,Helvetica"><font color="#999900"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
invoke TextOut,hdc,0,0,ADDR TestString,SIZEOF TestString</font></font></font></b><font face="Arial,Helvetica"><font color="#999900"><font size=-1></font></font></font>
<p><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>Call
TextOut function to draw the text on the client area. The text will be
in the font and color we specified previously.</font></font></font><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1></font></font></font>
<p><b><font face="Arial,Helvetica"><font size=-1><font color="#CCCCCC">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#999900">&nbsp;
invoke SelectObject,hdc, hfont</font></font></font></b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1></font></font></font>
<p><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>When
we are through with the font, we should restore the old font back into
the device context. You should always restore the object that you replaced
in the device context.</font></font></font>
<br>
<hr WIDTH="100%">
<center><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>[<a href="http://win32asm.cjb.net">Iczelion's
Win32 Assembly HomePage</a>]</font></font></font></b></center>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -