mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 14:28:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@297028 c90b9560-bf6c-de11-be94-00142212c4b1
147 lines
3.3 KiB
XML
147 lines
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.imagegrabwindow" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>imagegrabwindow</refname>
|
|
<refpurpose>Captures a window</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>resource</type><methodname>imagegrabwindow</methodname>
|
|
<methodparam><type>int</type><parameter>window_handle</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>client_area</parameter><initializer>0</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Grabs a window or its client area using a windows handle (HWND property in COM instance)
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>window_handle</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The HWND window ID.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>client_area</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Include the client area of the application window.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns an image resource identifier on success, &false; on failure.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
E_NOTICE is issued if <parameter>window_handle</parameter> is invalid
|
|
window handle.
|
|
E_WARNING is issued if the Windows API is too old.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>imagegrabwindow</function> example</title>
|
|
<para>
|
|
Capture a window (IE for example)
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$browser = new COM("InternetExplorer.Application");
|
|
$handle = $browser->HWND;
|
|
$browser->Visible = true;
|
|
$im = imagegrabwindow($handle);
|
|
$browser->Quit();
|
|
imagepng($im, "iesnap.png");
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
Capture a window (IE for example) but with its content
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$browser = new COM("InternetExplorer.Application");
|
|
$handle = $browser->HWND;
|
|
$browser->Visible = true;
|
|
$browser->Navigate("http://www.libgd.org");
|
|
|
|
/* Still working? */
|
|
while ($browser->Busy) {
|
|
com_message_pump(4000);
|
|
}
|
|
$im = imagegrabwindow($handle, 0);
|
|
$browser->Quit();
|
|
imagepng($im, "iesnap.png");
|
|
imagedestroy($im);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<para>
|
|
This function is only available on Windows.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>imagegrabscreen</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|
|
|