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

📄 i.html

📁 windowsAPI介绍。很详细的
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//Netscape Comm. Corp.//DTD HTML//EN">
<html>

<head>
<title>Windows 95 API Dictionary: I</title>
<base TARGET="_self">
<script LANGUAGE="JavaScript">
<!--Cloak
function statbar(txt) {
  window.status = txt;
  setTimeout("erase()",3000);
}
function erase() {
  window.status = "";
}
//Decloak-->
</script>
</head>

<body BGCOLOR="#004000" TEXT="#FFFFFF" LINK="#FFFF00" VLINK="#FF8000" ALINK="#80FF80">

<p><a NAME="top"></a></p>

<h1 ALIGN="center">- I -</h1>

<hr ALIGN="center" WIDTH="85%" SIZE="5">

<p ALIGN="left"><a NAME="inflaterect"></a></p>

<h3 ALIGN="center">InflateRect Function</h3>
<code>

<p align="center">Declare Function InflateRect Lib &quot;user32.dll&quot; (lpRect As <a
HREF="appa.html#rect">RECT</a>, ByVal x As Long, ByVal y As Long) As Long</code><br>
InflateRect increases or decreases the size of a rectangle. The values to inflate the 
rectangle by are added on both sides of it, so in reality the width or height increases 
double what you pass to it. For example, if you give it 20 as the x parameter, it will 
extend the left and right side by 20, so the end result is 40 wider. Positive values make 
the rectangle larger, and negative ones make it smaller. Mathematically, when you call the 
function, <code>x</code> is added to .Right and subtracted from .Left, and <code>y</code> 
is added to .Bottom and subtracted from .Top. You can safely ignore the value returned.<br>
</p>

<table WIDTH="95%" BORDER="2" CELLSPACING="0">
  <tr>
    <td WIDTH="20%"><code>lpRect</code></td>
    <td WIDTH="80%">The rectangle to make bigger or smaller (or both). </td>
  </tr>
  <tr>
    <td><code>x</code></td>
    <td>The number of pixels to expand the left and right sides by. Positive values increase 
    the width, negative values decrease it. </td>
  </tr>
  <tr>
    <td><code>y</code></td>
    <td>The number of pixels to expand the top and bottom by. Positive values increase the 
    height, negative values decrease it. </td>
  </tr>
</table>
<b>

<p>Example:</b><br>
<code>&nbsp;&nbsp;'Expand a rectangle by 30 on left and right and -10 on top and bottom<br>
&nbsp;&nbsp;Dim r As RECT<br>
&nbsp;&nbsp;x = SetRect(r, 50, 50, 100, 100) 'API function that sets rectangle size<br>
&nbsp;&nbsp;'.Left = 50, .Top = 50, .Right = 100, .Bottom = 100<br>
&nbsp;&nbsp;x = InflateRect(r, 30, -10)<br>
&nbsp;&nbsp;'Now, .Left = 20, .Top = 60, .Right = 130, .Bottom = 90</code><br>
<br>
<b>Related Call:</b> <a HREF="o.html#offsetrect">OffsetRect</a><br>
<b>Category:</b> <a HREF="index.html#rectmanipulation" REL="Index">RECT Manipulation</a><br>
<a HREF="index.html" REL="Index">返回到索引.</a> </p>

<hr ALIGN="center" WIDTH="85%" SIZE="5">

<p ALIGN="left"><a NAME="intersectrect"></a></p>

<h3 ALIGN="center">IntersectRect Function</h3>
<code>

<p align="center">Declare Function IntersectRect Lib &quot;user32.dll&quot; (lpDestRect As 
<a HREF="appa.html#rect">RECT</a>, lpSrc1Rect As <a HREF="appa.html#rect">RECT</a>, 
lpSrc2Rect As <a HREF="appa.html#rect">RECT</a>) As Long</code><br>
IntersectRect creates a rectangle based on the intersecting parts of two other rectangles. 
The box-shaped region where the two source rectangles overlap is the intersection 
rectangle. If one or both of the source rectangles are empty (see IsRectEmpty for 
definition of an empty rectangle) or they no not overlap anywhere, the function returns 0 
and the destination rectangle is set as all 0's. If the source rectangles do overlap, the 
function returns 1.<br>
</p>

<table WIDTH="95%" BORDER="2" CELLSPACING="0">
  <tr>
    <td WIDTH="20%"><code>lpDestRect</code></td>
    <td WIDTH="80%">The rectangle to set as the intersection of the two source rectangles. </td>
  </tr>
  <tr>
    <td><code>lpSrc1Rect</code></td>
    <td>The first source rectangle. </td>
  </tr>
  <tr>
    <td><code>lpSrc2Rect</code></td>
    <td>The second source rectangle. </td>
  </tr>
</table>
<b>

<p>Example:</b><br>
<code>&nbsp;&nbsp;'Demonstration of IntersectRect<br>
&nbsp;&nbsp;Dim target As RECT, s1 As RECT, s2 As RECT<br>
&nbsp;&nbsp;x = SetRect(s1, 50, 50, 150, 150) 'API function sets rectangle at 
(50,50)-(150,150)<br>
&nbsp;&nbsp;x = SetRect(s2, 100, 100, 200, 200) '(100,100)-(200,200)<br>
&nbsp;&nbsp;x = IntersectRect(target, s1, s2)<br>
&nbsp;&nbsp;'target.Left = 100, .Top = 100, .Right = 150, .Bottom = 150</code><br>
<br>
<b>Related Calls:</b> <a HREF="s.html#subtractrect">SubtractRect</a>, <a
HREF="u.html#unionrect">UnionRect</a><br>
<b>Category:</b> <a HREF="index.html#rectmanipulation" REL="Index">RECT Manipulation</a><br>
<a HREF="index.html" REL="Index">返回到索引.</a> </p>

<hr ALIGN="center" WIDTH="85%" SIZE="5">

<p ALIGN="left"><a NAME="isrectempty"></a></p>

<h3 ALIGN="center">IsRectEmpty Function</h3>
<code>

<p align="center">Declare Function IsRectEmpty Lib &quot;user32.dll&quot; (lpRect As <a
HREF="appa.html#rect">RECT</a>) As Long</code><br>
IsRectEmpty checks to see if a RECT-type variable contains an empty rectangle. A rectangle 
is considered empty if and only if its .Right is not to the right of .Left and/or its 
.Bottom is not below the .Top. In other words, a rectangle is empty if and only if .Right 
&lt;= .Left and/or .Bottom &lt;= .Top. The function returns 1 if the rectangle is empty, 
and 0 if it is not.<br>
</p>

<table WIDTH="95%" BORDER="2" CELLSPACING="0">
  <tr>
    <td WIDTH="20%"><code>lpRect</code></td>
    <td WIDTH="80%">The rectangle to check to see if it is empty. </td>
  </tr>
</table>
<b>

<p>Example:</b><br>
<code>&nbsp;&nbsp;'Demonstration of what is considered empty<br>
&nbsp;&nbsp;Dim r As RECT<br>
&nbsp;&nbsp;x = SetRect(50, 50, 40, 100) '.Right &lt; .Left<br>
&nbsp;&nbsp;Form1.Print IsRectEmpty(r) 'Returns 1<br>
&nbsp;&nbsp;x = SetRect(50, 50, 100, 100) '.Left &lt; .Right and .Top &lt; .Bottom<br>
&nbsp;&nbsp;Form1.Print IsRectEmpty(r) 'Returns 0<br>
&nbsp;&nbsp;x = SetRect(50, 50, 100, 50) '.Top = .Bottom<br>
&nbsp;&nbsp;Form1.Print IsRectEmpty(r) 'Returns 1</code><br>
<br>
<b>Related Call:</b> <a HREF="s.html#setrectempty">SetRectEmpty</a><br>
<b>Category:</b> <a HREF="index.html#rectmanipulation" REL="Index">RECT Manipulation</a><br>
<a HREF="index.html" REL="Index">返回到索引.</a> </p>

<hr ALIGN="center" WIDTH="85%" SIZE="5">

<p ALIGN="left"><a HREF="../html-1/homepage.html" REL="Home"
onMouseOver="statbar('Go back to the Home page.');return true"><img
SRC="../graphics/Home2.gif" ALT="Home"></a><br>
<font SIZE="-2">Paul Kuliniewicz<br>
E-mail: <a HREF="mailto:Borg953@aol.com"
onMouseOver="statbar('E-mail Paul Kuliniewicz');return true">Borg953@aol.com</a><br>
All material presented on these pages is Copyright &copy; Paul Kuliniewicz, except for 
other copyrighted material.<br>
<a HREF="http://members.aol.com/Borg953/api/i.html"
onMouseOver="statbar('Link to self');return true">http://members.aol.com/Borg953/api/i.html</a> 
</font></p>
</body>
</html>

⌨️ 快捷键说明

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