General discussion

Locked

The SPS Weblog

By craig ·
Tags: Off Topic
blog root

This conversation is currently closed to new comments.

94 total posts (Page 1 of 10)   01 | 02 | 03 | 04 | 05   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Email and VFP: Part 1e (Shell)

by craig In reply to The SPS Weblog

<p>
You can send a Mailto URL as the command to ShellExecute to facilitate email
in VFP.  It should be noted that the command line (URL) is limited to 2048 bytes
(though on my system I couldn't create one longer than 2020 bytes) and there is no
facility for attaching files using this method.  These severe limitations aside,
it is a solution that has its places in VFP development.
</p>
<p>
<table cellspacing=5 cellpadding=5 width="90%" align=center border=1>
<tbody>
<tr>
<td>
<p>
<font face="Courier New" size=2>*******************************<br>
*!* Example of using SendViaShell<br>
*******************************<br>
LOCAL lcTo, lcSubject, lcBody, lcCC, lcBCC, lcErrReturn<br>
lcTo = "</font><a href="mailto:someone@somehost.com"><font face="Courier New" size=2>someone@somehost.com</font></a><font face="Courier New" size=2>"<br>
lcSubject = "Hey Have You Tried VFP Email?"<br>
lcBody = "Just wanted to let you know that VFP is pretty versatile" + CHR(13) + "and
has a lot of ways to send email."<br>
lcCC = "</font><a href="mailto:someoneelse@anotherhost.com"><font face="Courier New" size=2>someoneelse@anotherhost.com</font></a><font face="Courier New" size=2>"<br>
lcBCC = "</font><a href="mailto:myboss@bosshost.com"><font face="Courier New" size=2>myboss@bosshost.com</font></a><font face="Courier New" size=2>"</font>
</p>
<p>
<font face="Courier New" size=2>SendViaShell(@lcErrReturn, lcTo, lcSubject, lcBody,
lcCC, lcBCC)</font>
</p>
<p>
<font face="Courier New" size=2>IF EMPTY(lcErrReturn)<br>
  MESSAGEBOX("'" + lcSubject + "' opened successfullly.", 64, "Send email via
Shell")<br>
ELSE<br>
  MESSAGEBOX("'" + lcSubject + "' failed to be sent.  Reason:" + CHR(13)
+ lcErrReturn, 64, "Send email via Shell")<br>
ENDIF</font>
</p>
<p>
<font face="Courier New" size=2>*******************************************<br>
PROCEDURE SendViaShell(tcReturn, tcTo, tcSubject, tcBody, tcCC, tcBCC)<br>
*******************************************<br>
  DECLARE INTEGER ShellExecute IN shell32.DLL ;<br>
    INTEGER hwndWin, STRING cOperation, STRING cFile, ;<br>
    STRING cParameters, STRING cDirectory, INTEGER nShowWin</font>
</p>
<p>
<font face="Courier New" size=2>  LOCAL lcCommand, lcCRLF<br>
 
<br>
  TRY<br>
    lcCRLF = "%0D%0A"<br>
    lcCommand = "mailto:" + tcTo + "?Subject=" + tcSubject + "&Body="
+ STRTRAN(tcBody, CHR(13), lcCRLF)<br>
    IF TYPE("tcCC") = "C"<br>
      lcCommand = lcCommand + "&CC=" + tcCC<br>
    ENDIF<br>
    IF TYPE("tcBCC") = "C"<br>
      lcCommand = lcCommand + "&BCC=" + tcBCC<br>
    ENDIF<br>
    IF LEN(lcCommand) > 2020 && should be 2048, but not
on my system<br>
      THROW "Mailto command is limited to 2048 bytes"<br>
    ENDIF<br>
    ShellExecute(0, "open", lcCommand, "", "", 1)<br>
  CATCH TO loError<br>
    tcReturn = [Error: ] + STR(loError.ERRORNO) + CHR(13) + ;<br>
      [LineNo: ] + STR(loError.LINENO) + CHR(13) + ;<br>
      [Message: ] + loError.MESSAGE + CHR(13) + ;<br>
      [Procedure: ] + loError.PROCEDURE + CHR(13) + ;<br>
      [Details: ] + loError.DETAILS + CHR(13) + ;<br>
      [StackLevel: ] + STR(loError.STACKLEVEL) + CHR(13)
+ ;<br>
      [LineContents: ] + loError.LINECONTENTS<br>
  FINALLY<br>
    CLEAR DLLS "ShellExecute"<br>
  ENDTRY<br>
ENDPROC</font>
<br>
</p>
</td>
</tr>
</tbody>
</table>
</p>
<br>
<hr>
This weblog is sponsored by <a href="http://www.sweetpotatosoftware.com">SweetPotato
Software, Inc.</a><p><div class="blogdisclaim"><a href="http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,0041d75b-ce37-4493-aac9-0db82b7317d5.aspx">This post originally appeared on an external website</a></div>

Collapse -

Email and VFP: Part 1f (WinExec)

by craig In reply to The SPS Weblog

<p>
As we saw in the last example, ShellExecute comes with a pretty serious size restriction
for the MailTo URL - 2048 bytes (though it was 2020 bytes on my system).  That's
just not large enough for the contents of most emails.  If your users use Outlook
Express, then the following code may come in handy.  It raises the restriction
from about 2KB to almost 32KB.
</p>
<p>
<table cellspacing=5 cellpadding=5 width="90%" align=center border=1>
<tbody>
<tr>
<td>
<p>
<font face="Courier New" size=2>*******************************<br>
*!* Example of using SendViaWinExec<br>
*******************************<br>
LOCAL lcTo, lcSubject, lcBody, lcCC, lcBCC, lcErrReturn<br>
lcTo = "</font><a href="mailto:someone@somewhere.com"><font face="Courier New" size=2>someone@somewhere.com</font></a><font face="Courier New" size=2>"<br>
lcSubject = "Hey Have You Tried VFP Email?"<br>
lcBody = "Just wanted to let you know that VFP is pretty versatile" + CHR(13) + "and
has a lot of ways to send email."<br>
lcCC = "</font><a href="mailto:someoneelse@anotherhost.com"><font face="Courier New" size=2>someoneelse@anotherhost.com</font></a><font face="Courier New" size=2>"<br>
lcBCC = "</font><a href="mailto:myboss@boss.com"><font face="Courier New" size=2>myboss@boss.com</font></a><font face="Courier New" size=2>"</font>
</p>
<p>
<font face="Courier New" size=2>SendViaWinExec(@lcErrReturn, lcTo, lcSubject, lcBody,
lcCC, lcBCC)</font>
</p>
<p>
<font face="Courier New" size=2>IF EMPTY(lcErrReturn)<br>
  MESSAGEBOX("'" + lcSubject + "' opened successfullly.", 64, "Send email via
WinExec")<br>
ELSE<br>
  MESSAGEBOX("'" + lcSubject + "' failed to be sent.  Reason:" + CHR(13)
+ lcErrReturn, 64, "Send email via WinExec")<br>
ENDIF</font>
</p>
<p>
<font face="Courier New" size=2>*******************************************<br>
PROCEDURE SendViaWinExec(tcReturn, tcTo, tcSubject, tcBody, tcCC, tcBCC)<br>
*******************************************</font>
</p>
<p>
<font face="Courier New" size=2>DECLARE INTEGER WinExec IN kernel32 ;<br>
    STRING lpCmdLine ,;<br>
    INTEGER uCmdShow</font>
</p>
<p>
<font face="Courier New" size=2>  LOCAL lcCommand, lcCRLF<br>
 
<br>
  TRY<br>
    lcCRLF = "%0D%0A"<br>
    lcCommand = ["C:\Program Files\Outlook Express\msimn.exe" /mailurl:mailto:]
+ tcTo + "?Subject=" + tcSubject + "&Body=" + STRTRAN(tcBody, CHR(13), lcCRLF)<br>
    IF TYPE("tcCC") = "C"<br>
      lcCommand = lcCommand + "&CC=" + tcCC<br>
    ENDIF<br>
    IF TYPE("tcBCC") = "C"<br>
      lcCommand = lcCommand + "&BCC=" + tcBCC<br>
    ENDIF<br>
    IF LEN(lcCommand) > 32766 && should be 32768, but not
on my system<br>
      THROW "Mailto command is limited to 32768 bytes"<br>
    ENDIF</font>
</p>
<p>
<font face="Courier New" size=2> WinExec(lcCommand, 1)</font>
</p>
<p>
<font face="Courier New" size=2>  CATCH TO loError<br>
    tcReturn = [Error: ] + STR(loError.ERRORNO) + CHR(13) + ;<br>
      [LineNo: ] + STR(loError.LINENO) + CHR(13) + ;<br>
      [Message: ] + loError.MESSAGE + CHR(13) + ;<br>
      [Procedure: ] + loError.PROCEDURE + CHR(13) + ;<br>
      [Details: ] + loError.DETAILS + CHR(13) + ;<br>
      [StackLevel: ] + STR(loError.STACKLEVEL) + CHR(13)
+ ;<br>
      [LineContents: ] + loError.LINECONTENTS<br>
  FINALLY<br>
    CLEAR DLLS "WinExec"<br>
  ENDTRY<br>
ENDPROC</font>
</p>
</td>
</tr>
</tbody>
</table>
</p>
<p>
UPDATES<br>
<font face=Arial>07/15/2005 Changed the THROW so it reflected 32768 bytes instead
of 2048 bytes</font>
</p>
<br>
<hr>
This weblog is sponsored by <a href="http://www.sweetpotatosoftware.com">SweetPotato
Software, Inc.</a><p><div class="blogdisclaim"><a href="http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,87d1b04e-afbf-4c41-9ba7-5bcef933128b.aspx">This post originally appeared on an external website</a></div>

Collapse -

Take the MIT Weblog Survey

by craig In reply to The SPS Weblog

<p>
<img style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none" alt="Take the MIT Weblog Survey" src="http://blogsurvey.media.mit.edu/images/survey-science.gif">
</p>
<p>
This is a general social survey of the greater weblog community being conducted at
the Massachusetts Institute of Technology.<br>
<br>
Some additional <a href="http://blogsurvey.media.mit.edu/results>early%20results</A>from%20the%20survey%20look%20interesting. %20The%20full%20results%20should%20be%20coming%20out%20soon,%20so%20if%20you%20haven't%20taken%20the%20survey,%20but%20want%20to,%20now's%20the%20time.</P><P>They've%20provided%20some%20more%20<A%20href=" help#about? blogsurvey.media.mit.edu http:>detailed
information about the survey</a>, privacy etc..
</p>
Ran into this survey while reading <a href="http://www.lhotka.net/WeBlog/">Rockford
Lhotka's Weblog</a>.<br>
<hr>
This weblog is sponsored by <a href="http://www.sweetpotatosoftware.com">SweetPotato
Software, Inc.</a><p><div class="blogdisclaim"><a href="http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,14b55219-6815-44fb-8a2f-56ea92d26fbd.aspx">This post originally appeared on an external website</a></div>

Collapse -

Email and VFP: Part 1g (w3JMail)

by craig In reply to The SPS Weblog

<p>
The following code works with w3Jmail, which is <a href="http://tech.dimac.net/default2.asp?M=Products/MenuCOM.asp&P=Products/w3JMail/start.htm">available
as FREEWARE</a>.  They have other licenses available as well, so should
you need more functionality than the code below provides you can have it.  Their
documentation is good, especially when compared to most other 3rd party components
for email.  I've used w3JMail with excellent success and highly recommend it
(I'm not affiliated with the company in anyway). 
</p>
<p>
<table cellspacing=5 cellpadding=5 width="90%" align=center border=1>
<tbody>
<tr>
<td>
<font face=Tahoma color=#0000ff>
<p>
<font face="Courier New" size=2>*******************************<br>
*!* Example of using SendViaJMail<br>
*******************************<br>
***Requires FREE w3JMail v4.4 (code works with v3.0 and above)<br>
***Download at </font><a href="http://tech.dimac.net/default2.asp?M=Products/MenuCOM.asp&P=Products/w3JMail/start.htm"><font face="Courier New" size=2>http://tech.dimac.net/default2.asp?M=Products/MenuCOM.asp&P=Products/w3JMail/start.htm</font></a>
<br>
<font face="Courier New" size=2>*******************************<br>
#DEFINE PRIORITYURGENT 1<br>
#DEFINE PRIORITYHIGH 2<br>
#DEFINE PRIORITYNORMAL 3<br>
#DEFINE PRIORITYLOW 4<br>
#DEFINE PRIORITYLOWEST 5</font>
</p>
<p>
<font face="Courier New" size=2>DIMENSION aryAttach(2)<br>
aryAttach(1) = "C:\attachment1.txt" && change to an actual file that exists
on your computer<br>
aryAttach(2) = "C:\attachment2.zip" && change to an actual file that exists
on your computer</font>
</p>
<p>
<font face="Courier New" size=2>LOCAL lcToAddress, lcToName, lcFromAddress, lcFromName,
lcSubject, lcBody, lcCC, lcBCC, lcMailServer, lcUserName, lcPassword, lnPort, lcErrReturn<br>
lcToAddress = "</font><a href="mailto:someone@somehost.com"><font face="Courier New" size=2>someone@somehost.com</font></a><font face="Courier New" size=2>"<br>
lcToName =  "Their Name"<br>
lcFromAddress = "</font><a href="mailto:me@myhost.com"><font face="Courier New" size=2>me@myhost.com</font></a><font face="Courier New" size=2>"<br>
lcFromName = "My Name"<br>
lcSubject = "Hey Have You Tried VFP Email?"<br>
lcBody = "Just wanted to let you know that VFP is pretty versatile and has a lot of
ways to send email."<br>
lcCC = "</font><a href="mailto:someoneelse@someotherhost.com"><font face="Courier New" size=2>someoneelse@someotherhost.com</font></a><font face="Courier New" size=2>"<br>
lcBCC = "</font><a href="mailto:myboss@bosshost.com"><font face="Courier New" size=2>myboss@bosshost.com</font></a><font face="Courier New" size=2>"<br>
lcMailServer = "mail.myhost.com"<br>
lcUserName = "MyUsername" && my SMTP username<br>
lcPassword = "My_PaSsWoRd" && my SMTP password<br>
lnPort = 25 && SMTP standard port<br>
llHTMLFormat = .F. && Change to .T. if lcBody is HTML<br>
SendViaJMail(@lcErrReturn, lcToAddress, lcToName, lcFromAddress, lcFromName, lcSubject,
lcBody, @aryAttach, lcCC, lcBCC, lcMailServer, lcUserName, lcPassword, lnPort, PRIORITYURGENT,
llHTMLFormat)</font>
</p>
<p>
<font face="Courier New" size=2>IF EMPTY(lcErrReturn)<br>
 MESSAGEBOX("'" + lcSubject + "' sent successfullly.", 64, "Send email via JMail")<br>
ELSE<br>
 MESSAGEBOX("'" + lcSubject + "' failed to be sent.  Reason:" + CHR(13)
+ lcErrReturn, 64, "Send email via JMail")<br>
ENDIF</font>
</p>
<p>
<br>
<font face="Courier New" size=2>*******************************************<br>
PROCEDURE SendViaJMail(tcReturn, tcToAddress, tcToName, tcFromAddress, tcFromName,
tcSubject, tcBody, taFiles, tcCC, tcBCC, tcMailServer, tcUserName, tcPassword, tnPort,
tnPriority, tlHTMLFormat)<br>
*******************************************<br>
 LOCAL loSMTPMail, lnCountAttachments, loError AS EXCEPTION</font>
</p>
<p>
<font face="Courier New" size=2> tcReturn = ""</font>
</p>
<p>
<font face="Courier New" size=2> TRY<br>
     loSMTPMail  = CREATEOBJECT("jmail.SMTPMail")<br>
     WITH loSMTPMail
<br>
      IF TYPE("tcMailServer") = "C"<br>
       .ServerAddress = tcMailServer<br>
       IF TYPE("tcUserName") = "C" AND TYPE("tcPassword")
= "C"<br>
        .ServerAddress = tcUserName + ":" + tcPassword
+ "@" + .ServerAddress<br>
       ENDIF<br>
       IF TYPE("tnPort") = "N"<br>
        .ServerAddress = .ServerAddress + ":" +
TRANSFORM(tnPort)<br>
       ENDIF<br>
      ENDIF<br>
*!*   .Charset = "US-ASCII" && Can change charset, iso-8859-1
is default<br>
  IF TYPE("tcToName") = "C"<br>
   .AddRecipientEx(tcToAddress, tcToName )<br>
  ELSE<br>
         .AddRecipient(tcToAddress)<br>
       ENDIF<br>
         IF TYPE("tcCC") = "C"<br>
          .AddRecipientCc(tcCC)<br>
         ENDIF<br>
         IF TYPE("tcBCC") = "C"<br>
          .AddRecipientBcc(tcBCC)<br>
  ENDIF<br>
  IF TYPE("tcFromAddress") = "C"<br>
         .Sender = tcFromAddress<br>
        endif<br>
         IF TYPE("tcFromName") = "C"<br>
          .SenderName = tcFromName<br>
         ENDIF<br>
         IF TYPE("tlHTMLFormat") = "L" AND
tlHTMLFormat<br>
          .ContentType = "text/html"<br>
         ELSE<br>
          .ContentType = "text/plain"
&& Default<br>
         ENDIF<br>
         .Subject = tcSubject<br>
         .Body = tcBody<br>
         IF TYPE("tnPriority") = "N"<br>
          .Priority = tnPriority<br>
         ELSE<br>
          .Priority = 3 && Default<br>
         ENDIF<br>
         IF TYPE("taFiles",1) = "A"<br>
             FOR lnCountAttachments
= 1 TO ALEN(taFiles)<br>
                
.AddAttachMent(taFiles(lnCountAttachments))<br>
             ENDFOR<br>
         ENDIF<br>
         .Execute()<br>
     ENDWITH<br>
 CATCH TO loError<br>
  tcReturn = [Error: ] + STR(loError.ERRORNO) + CHR(13) + ;<br>
   [LineNo: ] + STR(loError.LINENO) + CHR(13) + ;<br>
   [Message: ] + loError.MESSAGE + CHR(13) + ;<br>
   [Procedure: ] + loError.PROCEDURE + CHR(13) + ;<br>
   [Details: ] + loError.DETAILS + CHR(13) + ;<br>
   [StackLevel: ] + STR(loError.STACKLEVEL) + CHR(13) + ;<br>
   [LineContents: ] + loError.LINECONTENTS<br>
 FINALLY<br>
     RELEASE loSMTPMail
<br>
     loSMTPMail  = .NULL.<br>
 ENDTRY<br>
ENDPROC</font>
</font><font color=#0000ff>
</p>
>>
>
>>
>
<br>
<hr>
This weblog is sponsored by <a href="http://www.sweetpotatosoftware.com">SweetPotato
Software, Inc.</a><p><div class="blogdisclaim"><a href="http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,90d53f97-21a5-49b1-a0d7-0933c6eb62e5.aspx">This post originally appeared on an external website</a></div>

Collapse -

Email and VFP: Part 1h (BLAT)

by craig In reply to The SPS Weblog

<p>
The code below requires BLAT 2.40 (the version of the DLL that was based on 1.9.4
will not send multiple comma delimited attachments).  So, if you don't have it, <a href="http://sourceforge.net/project/showfiles.php?group_id=81910">download
BLAT here</a>.
</p>
<p>
BLAT comes in two flavors, the Exe and the DLL.  I personally prefer the the
DLL... it's small around 100kb and it is a C DLL so it doesn't need to be registered
on a user's machine.  The best part of BLAT is that it was released into the
Public Domain (Free as Free gets) and it is open source (you get the code). 
The features that this little component has are pretty impressive.  Once you've
had an opportunity to run the code below, take a look at some of the <a href="http://www.blat.net/syntax/syntax.html">other
features</a> (switches) that are available.  Also, here is the <a href="http://www.blat.net/">official
site for BLAT</a> where you can get additional information regarding the project.
</p>
<p>
Okay, with all that out of the way, let's take a look at the code.
</p>
<p>
<table cellspacing=5 cellpadding=5 width="90%" align=center border=1>
<tbody>
<tr>
<td>
<p>
<font face="Courier New" size=2>*******************************<br>
*!* Example of using SendViaBLAT<br>
*******************************<br>
#DEFINE PRIORITYHIGH 1<br>
#DEFINE PRIORITYLOW 0</font>
</p>
<p>
<font face="Courier New" size=2>DIMENSION aryAttach(2)<br>
aryAttach(1) = "C:\attachment1.txt" && change to an actual file that exists
on your computer<br>
aryAttach(2) = "C:\attachment2.zip" && change to an actual file that exists
on your computer</font>
</p>
<p>
<font face="Courier New" size=2>LOCAL lcFrom, lcTo, lcSubject, lcBody, lcCC, lcBCC,
lcMailServer, lcUserName, lcPassword, lnPort, lnPriority, llHTMLFormat, lcErrReturn</font>
</p>
<p>
<font face="Courier New" size=2>lcFrom = "<a href="mailto:me@myhost.com">me@myhost.com</a>"<br>
lcTo = "<a href="mailto:someone@theirhost.com">someone@theirhost.com</a>"<br>
lcSubject = "Hey Have You Tried VFP Email?"<br>
*!* Sending the body in HTML format<br>
llHTMLFormat = .T. && change to .F. to send plain text message<br>
lcBody = "<a href='http://www.sweetpotatosoftware.com/SPSBlog/default.aspx'>"
+ ;<br>
 "Hey Have You Tried VFP Email?" + ;<br>
 "</a>"<br>
lcCC = "<a href="mailto:someoneelse@someotherhost.com">someoneelse@someotherhost.com</a>"<br>
lcBCC = "<a href="mailto:myboss@bosshost.com">myboss@bosshost.com</a>"<br>
lcMailServer = "mail.myhost.com" && my SMTP Server<br>
lnPort = 25 && default SMTP Server port<br>
lcUserName = "MyUsername" && my SMTP username<br>
lcPassword = "My_PaSsWoRd" && my SMTP password<br>
lnPriority = PRIORITYHIGH</font>
</p>
<p>
<font face="Courier New" size=2>SendViaBLAT(@lcErrReturn, lcFrom, lcTo, lcSubject,
lcBody, @aryAttach, lcCC, lcBCC, lcMailServer, lnPort, lcUserName, lcPassword, lnPriority,
llHTMLFormat)</font>
</p>
<p>
<font face="Courier New" size=2>IF EMPTY(lcErrReturn)<br>
 MESSAGEBOX("'" + lcSubject + "' sent successfullly.", 64, "Send email via BLAT")<br>
ELSE<br>
 MESSAGEBOX("'" + lcSubject + "' failed to be sent.  Reason:" + CHR(13)
+ lcErrReturn, 64, "Send email via BLAT")<br>
ENDIF</font>
</p>
<p>
<font face="Courier New" size=2>*******************************************<br>
PROCEDURE SendViaBLAT(tcReturn, tcFrom, tcTo, tcSubject, tcBody, taFiles, tcCC, tcBCC,
tcMailServer, tnPort, tcUserName, tcPassword, tnPriority, tlHTMLFormat)<br>
*******************************************<br>
 LOCAL lcBlatParam, lcBodyFile, lnCountAttachments, lnResult, loError as Exception<br>
 <br>
 lcBodyFile = ""<br>
 <br>
 TRY<br>
  *!* Include full path in Declare, such as "C:\Blat240\full\blat.dll"<br>
  *!* or make sure that blat.dll is included in the system's PATH variable<br>
  DECLARE INTEGER Send IN "blat.dll" STRING cParam<br>
  <br>
  lcBodyFile = ADDBS(SYS(2023)) + SYS(2015) + ".txt"<br>
  STRTOFILE(tcBody, lcBodyFile, 0) && body is placed in a text file
to be sent by BLAT<br>
  <br>
  lcBlatParam = GetShortPath(lcBodyFile)<br>
  <br>
  IF TYPE("tcTo") = "C"<br>
    lcBlatParam = lcBlatParam + " -to " + ALLTRIM(tcTo)<br>
  ENDIF<br>
  IF TYPE("tcFrom") = "C"<br>
    lcBlatParam = lcBlatParam + " -f " + ALLTRIM(tcFrom)<br>
  ENDIF<br>
  IF TYPE("tcCC") = "C"<br>
    lcBlatParam = lcBlatParam + " -cc " + ALLTRIM(tcCC)<br>
  ENDIF<br>
  IF TYPE("tcBCC") = "C"<br>
    lcBlatParam = lcBlatParam + " -bcc " + ALLTRIM(tcBCC)<br>
  ENDIF<br>
  IF TYPE("tcSubject") = "C"<br>
    lcBlatParam = lcBlatParam + [ -s "] + ALLTRIM(tcSubject) + ["]<br>
  ENDIF<br>
  IF TYPE("tcMailserver") = "C"<br>
    lcBlatParam = lcBlatParam + " -server " + ALLTRIM(tcMailserver)<br>
  ENDIF<br>
  IF TYPE("tnPort") = "N"<br>
    lcBlatParam = lcBlatParam + ":" + TRANSFORM(tnPort)<br>
  ENDIF<br>
  IF TYPE("tcUsername") = "C"<br>
    lcBlatParam = lcBlatParam + " -u " + ALLTRIM(tcUsername)<br>
  ENDIF<br>
  IF TYPE("tcPassword") = "C"<br>
    lcBlatParam = lcBlatParam + " -pw " + ALLTRIM(tcPassword)<br>
  ENDIF<br>
  IF TYPE("tnPriority") = "N" AND BETWEEN(tnPriority, 0, 1)<br>
    lcBlatParam = lcBlatParam + " -priority " + TRANSFORM(tnPriority)<br>
  ENDIF<br>
  IF TYPE("tlHTMLFormat") = "L" AND tlHTMLFormat<br>
    lcBlatParam = lcBlatParam + " -html"<br>
  ENDIF</font>
</p>
<p>
<font face="Courier New" size=2>  IF TYPE("taFiles", 1) = "A"<br>
    lcBlatParam = lcBlatParam + " -attach "<br>
   FOR lnCountAttachments = 1 TO ALEN(taFiles)<br>
     lcBlatParam = lcBlatParam + GetShortPath(ALLTRIM(taFiles(lnCountAttachments)))
+ ","<br>
   ENDFOR<br>
   lcBlatParam = LEFT(lcBlatParam, LEN(lcBlatParam) - 1) &&
Remove Extra Comma<br>
  ENDIF</font>
</p>
<p>
<font face="Courier New" size=2>  lnResult = Send(ALLTRIM(lcBlatParam))<br>
  <br>
  IF lnResult != 0<br>
   DO CASE<br>
    CASE lnResult = -2<br>
     THROW "The server actively denied our connection./The
mail server doesn't like the sender name. "<br>
    CASE lnResult = -1<br>
     THROW "Unable to open SMTP socket" OR ;<br>
       "SMTP get line did not return 220" OR ;<br>
       "command unable to write to socket" OR ;<br>
       "Server does not like To: address" OR ;<br>
       "Mail server error accepting message data."<br>
    CASE lnResult = 1<br>
     THROW "File name (message text) not given" OR ;<br>
       "Bad argument given"<br>
    CASE lnResult = 2<br>
     THROW "File (message text) does not exist"<br>
    CASE lnResult = 3<br>
     THROW "Error reading the file (message text) or attached
file"<br>
    CASE lnResult = 4<br>
     THROW "File (message text) not of type FILE_TYPE_DISK
"<br>
    CASE lnResult = 5<br>
     THROW "Error Reading File (message text)"<br>
    CASE lnResult = 12<br>
     THROW "-server or -f options not specified and not found
in registry"<br>
    CASE lnResult = 13<br>
     THROW "Error opening temporary file in temp directory"<br>
    OTHERWISE<br>
     THROW "Unknown Error"<br>
   ENDCASE<br>
  ENDIF</font>
</p>
<p>
<font face="Courier New" size=2> CATCH TO loError<br>
  tcReturn = [Error: ] + STR(loError.ERRORNO) + CHR(13) + ;<br>
   [LineNo: ] + STR(loError.LINENO) + CHR(13) + ;<br>
   [Message: ] + loError.MESSAGE + CHR(13) + ;<br>
   [Procedure: ] + loError.PROCEDURE + CHR(13) + ;<br>
   [Details: ] + loError.DETAILS + CHR(13) + ;<br>
   [StackLevel: ] + STR(loError.STACKLEVEL) + CHR(13) + ;<br>
   [LineContents: ] + loError.LINECONTENTS<br>
 FINALLY<br>
  CLEAR DLLS "Send"<br>
  IF FILE(lcBodyFile)<br>
   ERASE (lcBodyFile)<br>
  ENDIF<br>
 ENDTRY<br>
ENDPROC</font>
</p>
<p>
<font face="Courier New" size=2>****************************************<br>
Function GetShortPath<br>
****************************************<br>
 LPARAMETERS lcFileName<br>
 LOCAL lnReturn, lcBuffer</font>
</p>
<p>
<font face="Courier New" size=2> Declare Integer GetShortPathNameA In Win32API
As GetShortPathName String, String, Integer</font>
</p>
<p>
<font face="Courier New" size=2> lcBuffer = SPACE(255)<br>
 lnReturn= GetShortPathName(lcFileName, @lcBuffer, 255)</font>
</p>
<p>
<font face="Courier New" size=2> Clear Dlls "GetShortPathName"<br>
 <br>
 Return (Left(lcBuffer, lnReturn))<br>
ENDFUNC</font>
</p>
</td>
</tr>
</tbody>
</table>
</p>
<br>
<hr>
This weblog is sponsored by <a href="http://www.sweetpotatosoftware.com">SweetPotato
Software, Inc.</a><p><div class="blogdisclaim"><a href="http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,6b86dea6-66ec-4f8f-a610-73dd6f896fb7.aspx">This post originally appeared on an external website</a></div>

Collapse -

GDI+ and VFP

by craig In reply to The SPS Weblog

<p>
<font face=Arial>I'm doing an extensive series for FoxTalk regarding GDI+ and
VFP.  The first article will be in the August issue and I believe it will also
be made available for free to the community.  It deals with the basics of drawing
on a VFP form with GDI+, including an effective double-buffering technique. 
It's just the start, and once everyone is warmed up then the second article will ****
doors off (guaranteed). I'll be submitting the second article to David Stevenson sometime
today.  Then I'll begin working on the third article in the series.  By
the time I'm done, there should be very little that is not known or accessible to
VFP developers when it comes to GDI+.  This series of GDI+ articles and another
one (different topic) I'm doing for FoxPro Advisor is the reason behind this
blog entry (well sort of)...</font>
</p>
<p>
<font face=Arial>I've been somewhat quiet about GDI+ and VFP for the last couple months
(out on the forums), because most of the stuff I would be able to post would come
from the code I'm working on for the articles and that's not allowed under most, if
not all, publishing contracts.  It's been really difficult for me to hold a bunch
of stuff back like this.  I do like having the opportunity to have my stuff published,
but it's been a big change for me.  For years now, I've written cool code and
been able to instantly thrust it into the public domain.  What I haven't placed
in the public domain has been making its way into my website </font><a href="http://www.vfpcode.com/"><font face=Arial>www.vfpcode.com</font></a><font face=Arial> which
should be ready for primetime by the end of this year (when I'll open up the registration
for the VFP Community - and yes, VFP Code will be free and stay that way).  Don't
get me wrong, I think it's important to VFP's visibility that quality articles are
written for the industry rags, and I'm trying to do my part.  I'm just not use
to the lag time between when I've figured something out to when I can let everyone
know about it.</font>
</p>
<p>
<font face=Arial>I absolutely burn to give stuff away to the VFP Community and promote
one of the greatest languages on earth.  It's an itch that needs to be scratched
and while my forum posts, and latest SPS Blog entries on VFP Email, have helped, it's
just not enough.  So, here are 603 GDI+ DECLARE statements that I've translated,
and rest assured that I'll be going through examples of how to use many of them in
my FoxTalk series.</font>
</p>
<p>
<table cellspacing=5 cellpadding=5 width="90%" align=center border=1>
<tbody>
<tr>
<td>
<font face="Courier New" size=2>DECLARE LONG GdiplusStartup IN GDIPLUS LONG @token,
STRING @inputbuf, LONG outputbuf<br>
DECLARE LONG GdiplusShutdown IN GDIPLUS LONG token<br>
*!* Graphics<br>
DECLARE LONG GdipFlush IN GDIPLUS LONG graphics, LONG intention<br>
DECLARE LONG GdipCreateFromHDC IN GDIPLUS LONG hdc, LONG @graphics<br>
DECLARE LONG GdipCreateFromHWND IN GDIPLUS LONG hwnd, LONG @graphics<br>
DECLARE LONG GdipCreateFromHWNDICM IN GDIPLUS LONG hwnd, LONG @graphics<br>
DECLARE LONG GdipDeleteGraphics IN GDIPLUS LONG graphics<br>
DECLARE LONG GdipGetDC IN GDIPLUS LONG graphics, LONG @hdc<br>
DECLARE LONG GdipReleaseDC IN GDIPLUS LONG graphics, LONG hdc<br>
DECLARE LONG GdipSetCompositingMode IN GDIPLUS LONG graphics, LONG CompositingMd<br>
DECLARE LONG GdipGetCompositingMode IN GDIPLUS LONG graphics, LONG @CompositingMd<br>
DECLARE LONG GdipSetRenderingOrigin IN GDIPLUS LONG graphics, LONG x, LONG y<br>
DECLARE LONG GdipGetRenderingOrigin IN GDIPLUS LONG graphics, LONG @x, LONG @y<br>
DECLARE LONG GdipSetCompositingQuality IN GDIPLUS LONG graphics, LONG CompositingQlty<br>
DECLARE LONG GdipGetCompositingQuality IN GDIPLUS LONG graphics, LONG @CompositingQlty<br>
DECLARE LONG GdipSetSmoothingMode IN GDIPLUS LONG graphics, LONG SmoothingMd<br>
DECLARE LONG GdipGetSmoothingMode IN GDIPLUS LONG graphics, LONG @SmoothingMd<br>
DECLARE LONG GdipSetPixelOffsetMode IN GDIPLUS LONG graphics, LONG PixOffsetMode<br>
DECLARE LONG GdipGetPixelOffsetMode IN GDIPLUS LONG graphics, LONG @PixOffsetMode<br>
DECLARE LONG GdipSetTextRenderingHint IN GDIPLUS LONG graphics, LONG mode<br>
DECLARE LONG GdipGetTextRenderingHint IN GDIPLUS LONG graphics, LONG @mode<br>
DECLARE LONG GdipSetTextContrast IN GDIPLUS LONG graphics, LONG contrast<br>
DECLARE LONG GdipGetTextContrast IN GDIPLUS LONG graphics, LONG @contrast<br>
DECLARE LONG GdipSetInterpolationMode IN GDIPLUS LONG graphics, LONG interpolation<br>
DECLARE LONG GdipGetInterpolationMode IN GDIPLUS LONG graphics, LONG @interpolation<br>
DECLARE LONG GdipSetWorldTransform IN GDIPLUS LONG graphics, LONG matrix<br>
DECLARE LONG GdipResetWorldTransform IN GDIPLUS LONG graphics<br>
DECLARE LONG GdipMultiplyWorldTransform IN GDIPLUS LONG graphics, LONG matrix, LONG
order<br>
DECLARE LONG GdipTranslateWorldTransform IN GDIPLUS LONG graphics, SINGLE dx, SINGLE
dy, LONG order<br>
DECLARE LONG GdipScaleWorldTransform IN GDIPLUS LONG graphics, SINGLE sx, SINGLE sy,
LONG order<br>
DECLARE LONG GdipRotateWorldTransform IN GDIPLUS LONG graphics, SINGLE angle, LONG
order<br>
DECLARE LONG GdipGetWorldTransform IN GDIPLUS LONG graphics, LONG matrix<br>
DECLARE LONG GdipResetPageTransform IN GDIPLUS LONG graphics<br>
DECLARE LONG GdipGetPageUnit IN GDIPLUS LONG graphics, LONG @unit<br>
DECLARE LONG GdipGetPageScale IN GDIPLUS LONG graphics, SINGLE @sscale<br>
DECLARE LONG GdipSetPageUnit IN GDIPLUS LONG graphics, LONG unit<br>
DECLARE LONG GdipSetPageScale IN GDIPLUS LONG graphics, SINGLE sscale<br>
DECLARE LONG GdipGetDpiX IN GDIPLUS LONG graphics, SINGLE @dpi<br>
DECLARE LONG GdipGetDpiY IN GDIPLUS LONG graphics, SINGLE @dpi<br>
DECLARE LONG GdipTransformPoints IN GDIPLUS LONG graphics, LONG destSpace, LONG srcSpace,
STRING @pPoint, LONG Count<br>
DECLARE LONG GdipTransformPointsI IN GDIPLUS LONG graphics, LONG destSpace, LONG srcSpace,
STRING @pPoint, LONG Count<br>
DECLARE LONG GdipGetNearestColor IN GDIPLUS LONG graphics, LONG @argb<br>
DECLARE LONG GdipCreateHalftonePalette IN GDIPLUS<br>
DECLARE LONG GdipDrawLine IN GDIPLUS LONG graphics, LONG pen, SINGLE x1, SINGLE y1,
SINGLE x2, SINGLE y2<br>
DECLARE LONG GdipDrawLineI IN GDIPLUS LONG graphics, LONG pen, LONG x1, LONG y1, LONG
x2, LONG y2<br>
DECLARE LONG GdipDrawLines IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint, LONG
Count<br>
DECLARE LONG GdipDrawLinesI IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint, LONG
Count<br>
DECLARE LONG GdipDrawArc IN GDIPLUS LONG graphics, LONG pen, SINGLE x, SINGLE y, SINGLE
nWidth, SINGLE Height, SINGLE startAngle, SINGLE sweepAngle<br>
DECLARE LONG GdipDrawArcI IN GDIPLUS LONG graphics, LONG pen, LONG x, LONG y, LONG
nWidth, LONG Height, SINGLE startAngle, SINGLE sweepAngle<br>
DECLARE LONG GdipDrawBezier IN GDIPLUS LONG graphics, LONG pen, SINGLE x1, SINGLE
y1, SINGLE x2, SINGLE y2, SINGLE x3, SINGLE y3, SINGLE x4, SINGLE y4<br>
DECLARE LONG GdipDrawBezierI IN GDIPLUS LONG graphics, LONG pen, LONG x1, LONG y1,
LONG x2, LONG y2, LONG x3, LONG y3, LONG x4, LONG y4<br>
DECLARE GdipDrawBeziers IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint, LONG Count<br>
DECLARE LONG GdipDrawBeziersI IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint,
LONG Count<br>
DECLARE LONG GdipDrawRectangle IN GDIPLUS LONG graphics, LONG pen, SINGLE x, SINGLE
y, SINGLE nWidth, SINGLE Height<br>
DECLARE LONG GdipDrawRectangleI IN GDIPLUS LONG graphics, LONG pen, LONG x, LONG y,
LONG nWidth, LONG Height<br>
DECLARE LONG GdipDrawRectangles IN GDIPLUS LONG graphics, LONG pen, STRING @rects,
LONG Count<br>
DECLARE LONG GdipDrawRectanglesI IN GDIPLUS LONG graphics, LONG pen, STRING @rects,
LONG Count<br>
DECLARE LONG GdipDrawEllipse IN GDIPLUS LONG graphics, LONG pen, SINGLE x, SINGLE
y, SINGLE nWidth, SINGLE Height<br>
DECLARE LONG GdipDrawEllipseI IN GDIPLUS LONG graphics, LONG pen, LONG x, LONG y,
LONG nWidth, LONG Height<br>
DECLARE LONG GdipDrawPie IN GDIPLUS LONG graphics, LONG pen, SINGLE x, SINGLE y, SINGLE
nWidth, SINGLE Height, SINGLE startAngle, SINGLE sweepAngle<br>
DECLARE LONG GdipDrawPieI IN GDIPLUS LONG graphics, LONG pen, LONG x, LONG y, LONG
nWidth, LONG Height, SINGLE startAngle, SINGLE sweepAngle<br>
DECLARE LONG GdipDrawPolygon IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint, LONG
Count<br>
DECLARE LONG GdipDrawPolygonI IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint,
LONG Count<br>
DECLARE LONG GdipDrawPath IN GDIPLUS LONG graphics, LONG pen, LONG path<br>
DECLARE LONG GdipDrawCurve IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint, LONG
Count<br>
DECLARE LONG GdipDrawCurveI IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint, LONG
Count<br>
DECLARE LONG GdipDrawCurve2 IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint, LONG
Count, SINGLE tension<br>
DECLARE LONG GdipDrawCurve2I IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint, LONG
Count, SINGLE tension<br>
DECLARE LONG GdipDrawCurve3 IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint, LONG
Count, LONG offset, LONG numberOfSegments, SINGLE tension<br>
DECLARE LONG GdipDrawCurve3I IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint, LONG
Count, LONG offset, LONG numberOfSegments, SINGLE tension<br>
DECLARE LONG GdipDrawClosedCurve IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint,
LONG Count<br>
DECLARE LONG GdipDrawClosedCurveI IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint,
LONG Count<br>
DECLARE LONG GdipDrawClosedCurve2 IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint,
LONG Count, SINGLE tension<br>
DECLARE LONG GdipDrawClosedCurve2I IN GDIPLUS LONG graphics, LONG pen, STRING @pPoint,
LONG Count, SINGLE tension<br>
DECLARE LONG GdipGraphicsClear IN GDIPLUS LONG graphics, LONG lColor<br>
DECLARE LONG GdipFillRectangle IN GDIPLUS LONG graphics, LONG brush, SINGLE x, SINGLE
y, SINGLE nWidth, SINGLE Height<br>
DECLARE LONG GdipFillRectangleI IN GDIPLUS LONG graphics, LONG brush, LONG x, LONG
y, LONG nWidth, LONG Height<br>
DECLARE LONG GdipFillRectangles IN GDIPLUS LONG graphics, LONG brush, STRING @rects,
LONG Count<br>
DECLARE LONG GdipFillRectanglesI IN GDIPLUS LONG graphics, LONG brush, STRING @rects,
LONG Count<br>
DECLARE LONG GdipFillPolygon IN GDIPLUS LONG graphics, LONG brush, STRING @pPoint,
LONG Count, LONG FillMd<br>
DECLARE LONG GdipFillPolygonI IN GDIPLUS LONG graphics, LONG brush, STRING @pPoint,
LONG Count, LONG FillMd<br>
DECLARE LONG GdipFillPolygon2 IN GDIPLUS LONG graphics, LONG brush, STRING @pPoint,
LONG Count<br>
DECLARE LONG GdipFillPolygon2I IN GDIPLUS LONG graphics, LONG brush, STRING @pPoint,
LONG Count<br>
DECLARE LONG GdipFillEllipse IN GDIPLUS LONG graphics, LONG brush, SINGLE x, SINGLE
y, SINGLE nWidth, SINGLE Height<br>
DECLARE LONG GdipFillEllipseI IN GDIPLUS LONG graphics, LONG brush, LONG x, LONG y,
LONG nWidth, LONG Height<br>
DECLARE LONG GdipFillPie IN GDIPLUS LONG graphics, LONG brush, SINGLE x, SINGLE y,
SINGLE nWidth, SINGLE Height, SINGLE startAngle, SINGLE sweepAngle<br>
DECLARE LONG GdipFillPieI IN GDIPLUS LONG graphics, LONG brush, LONG x, LONG y, LONG
nWidth, LONG Height, SINGLE startAngle, SINGLE sweepAngle<br>
DECLARE LONG GdipFillPath IN GDIPLUS LONG graphics, LONG brush, LONG path<br>
DECLARE LONG GdipFillClosedCurve IN GDIPLUS LONG graphics, LONG brush, STRING @pPoint,
LONG Count<br>
DECLARE LONG GdipFillClosedCurveI IN GDIPLUS LONG graphics, LONG brush, STRING @pPoint,
LONG Count<br>
DECLARE LONG GdipFillClosedCurve2 IN GDIPLUS LONG graphics, LONG brush, STRING @pPoint,
LONG Count, SINGLE tension, LONG FillMd<br>
DECLARE LONG GdipFillClosedCurve2I IN GDIPLUS LONG graphics, LONG brush, STRING @pPoint,
LONG Count, SINGLE tension, LONG FillMd<br>
DECLARE LONG GdipFillRegion IN GDIPLUS LONG graphics, LONG brush, LONG region<br>
DECLARE LONG GdipDrawImage IN GDIPLUS LONG graphics, LONG nImage, SINGLE x, SINGLE
y<br>
DECLARE LONG GdipDrawImageI IN GDIPLUS LONG graphics, LONG nImage, LONG x, LONG y<br>
DECLARE LONG GdipDrawImageRect IN GDIPLUS LONG graphics, LONG nImage, SINGLE x, SINGLE
y, SINGLE nWidth, SINGLE Height<br>
DECLARE LONG GdipDrawImageRectI IN GDIPLUS LONG graphics, LONG nImage, LONG x, LONG
y, LONG nWidth, LONG Height<br>
DECLARE LONG GdipDrawImagePoints IN GDIPLUS LONG graphics, LONG nImage, STRING @dstpoints,
LONG Count<br>
DECLARE LONG GdipDrawImagePointsI IN GDIPLUS LONG graphics, LONG nImage, STRING @dstpoints,
LONG Count<br>
DECLARE LONG GdipDrawImagePointRect IN GDIPLUS LONG graphics, LONG nImage, SINGLE
x, SINGLE y, SINGLE srcx, SINGLE srcy, SINGLE srcwidth, SINGLE srcheight, LONG srcUnit<br>
DECLARE LONG GdipDrawImagePointRectI IN GDIPLUS LONG graphics, LONG nImage, LONG x,
LONG y, LONG srcx, LONG srcy, LONG srcwidth, LONG srcheight, LONG srcUnit<br>
DECLARE LONG GdipDrawImageRectRect IN GDIPLUS LONG graphics, LONG nImage, SINGLE dstx,
SINGLE dsty, LONG dstwidth, SINGLE dstheight, SINGLE srcx, SINGLE srcy, SINGLE srcwidth,
SINGLE srcheight, LONG srcUnit, LONG imageAttributes, LONG pCALLBACK, LONG callbackData<br>
DECLARE LONG GdipDrawImageRectRectI IN GDIPLUS LONG graphics, LONG nImage, LONG dstx,
LONG dsty, LONG dstwidth, LONG dstheight, LONG srcx, LONG srcy, LONG srcwidth, LONG
srcheight, LONG srcUnit, LONG imageAttributes, LONG pCALLBACK, LONG callbackData<br>
DECLARE LONG GdipDrawImagePointsRect IN GDIPLUS LONG graphics, LONG nImage, STRING
@pPoint, LONG Count, SINGLE srcx, SINGLE srcy, SINGLE srcwidth, SINGLE srcheight,
LONG srcUnit, LONG imageAttributes, LONG pCALLBACK, LONG callbackData<br>
DECLARE LONG GdipDrawImagePointsRectI IN GDIPLUS LONG graphics, LONG nImage, STRING
@pPoint, LONG Count, LONG srcx, LONG srcy, LONG srcwidth, LONG srcheight, LONG srcUnit,
LONG imageAttributes, LONG pCALLBACK, LONG callbackData<br>
DECLARE LONG GdipEnumerateMetafileDestPoint IN GDIPLUS LONG graphics, LONG metafile,
STRING @destPoint, LONG @lpEnumerateMetafileProc, LONG callbackData, LONG @imageAttributes<br>
DECLARE LONG GdipEnumerateMetafileDestPointI IN GDIPLUS LONG @graphics, LONG metafile,
STRING @destPoint, LONG lpEnumerateMetafileProc, LONG callbackData, LONG imageAttributes<br>
DECLARE LONG GdipEnumerateMetafileDestRect IN GDIPLUS LONG graphics, LONG metafile,
STRING @destRect, LONG @lpEnumerateMetafileProc, LONG callbackData, LONG @imageAttributes<br>
DECLARE LONG GdipEnumerateMetafileDestRectI IN GDIPLUS LONG graphics, LONG metafile,
STRING @destRect, LONG @lpEnumerateMetafileProc, LONG callbackData, LONG @imageAttributes<br>
DECLARE LONG GdipEnumerateMetafileDestPoints IN GDIPLUS LONG graphics, LONG metafile,
STRING @destPoint, LONG Count, LONG @lpEnumerateMetafileProc, LONG callbackData, LONG
@imageAttributes<br>
DECLARE LONG GdipEnumerateMetafileDestPointsI IN GDIPLUS LONG graphics, LONG metafile,
STRING @destPoint, LONG Count, LONG @lpEnumerateMetafileProc, LONG callbackData, LONG
@imageAttributes<br>
DECLARE LONG GdipEnumerateMetafileSrcRectDestPoint IN GDIPLUS LONG graphics, LONG
metafile, STRING @destPoint, STRING @srcRect, LONG srcUnit, LONG lpEnumerateMetafileProc,
LONG callbackData, LONG imageAttributes<br>
DECLARE LONG GdipEnumerateMetafileSrcRectDestPointI IN GDIPLUS LONG graphics, LONG
metafile, STRING @destPoint, STRING @srcRect, LONG srcUnit, LONG lpEnumerateMetafileProc,
LONG callbackData, LONG imageAttributes<br>
DECLARE LONG GdipEnumerateMetafileSrcRectDestRect IN GDIPLUS LONG graphics, LONG metafile,
STRING @destRect, STRING @srcRect, LONG srcUnit, LONG lpEnumerateMetafileProc, LONG
callbackData, LONG imageAttributes<br>
DECLARE LONG GdipEnumerateMetafileSrcRectDestRectI IN GDIPLUS LONG graphics, LONG
metafile, STRING @destRect, STRING @srcRect, LONG srcUnit, LONG lpEnumerateMetafileProc,
LONG callbackData, LONG imageAttributes<br>
DECLARE LONG GdipEnumerateMetafileSrcRectDestPoints IN GDIPLUS LONG graphics, LONG
metafile, STRING @destPoints, LONG Count, STRING @srcRect, LONG srcUnit, LONG lpEnumerateMetafileProc,
LONG callbackData, LONG imageAttributes<br>
DECLARE LONG GdipEnumerateMetafileSrcRectDestPointsI IN GDIPLUS LONG graphics, LONG
metafile, STRING @destPoints, LONG Count, STRING @srcRect, LONG srcUnit, LONG lpEnumerateMetafileProc,
LONG callbackData, LONG imageAttributes<br>
DECLARE LONG GdipPlayMetafileRecord IN GDIPLUS LONG metafile, STRING recordType, LONG
flags, LONG dataSize, STRING @byteData<br>
DECLARE LONG GdipSetClipGraphics IN GDIPLUS LONG graphics, LONG srcgraphics, LONG
CombineMd<br>
DECLARE LONG GdipSetClipRect IN GDIPLUS LONG graphics, SINGLE x, SINGLE y, SINGLE
nWidth, SINGLE Height, LONG CombineMd<br>
DECLARE LONG GdipSetClipRectI IN GDIPLUS LONG graphics, LONG x, LONG y, LONG nWidth,
LONG Height, LONG CombineMd<br>
DECLARE LONG GdipSetClipPath IN GDIPLUS LONG graphics, LONG path, LONG CombineMd<br>
DECLARE LONG GdipSetClipRegion IN GDIPLUS LONG graphics, LONG region, LONG CombineMd<br>
DECLARE LONG GdipSetClipHrgn IN GDIPLUS LONG graphics, LONG hRgn, LONG CombineMd<br>
DECLARE LONG GdipResetClip IN GDIPLUS LONG graphics<br>
DECLARE LONG GdipTranslateClip IN GDIPLUS LONG graphics, SINGLE dx, SINGLE dy<br>
DECLARE LONG GdipTranslateClipI IN GDIPLUS LONG graphics, LONG dx, LONG dy<br>
DECLARE LONG GdipGetClip IN GDIPLUS LONG graphics, LONG region<br>
DECLARE LONG GdipGetClipBounds IN GDIPLUS LONG graphics, STRING @nRect<br>
DECLARE LONG GdipGetClipBoundsI IN GDIPLUS LONG graphics, STRING @nRect<br>
DECLARE LONG GdipIsClipEmpty IN GDIPLUS LONG graphics, LONG @result<br>
DECLARE LONG GdipGetVisibleClipBounds IN GDIPLUS LONG graphics, STRING @nRect<br>
DECLARE LONG GdipGetVisibleClipBoundsI IN GDIPLUS LONG graphics, STRING @nRect<br>
DECLARE LONG GdipIsVisibleClipEmpty IN GDIPLUS LONG graphics, LONG @result<br>
DECLARE LONG GdipIsVisiblePoint IN GDIPLUS LONG graphics, SINGLE x, SINGLE y, LONG
@result<br>
DECLARE LONG GdipIsVisiblePointI IN GDIPLUS LONG graphics, LONG x, LONG y, LONG @result<br>
DECLARE LONG GdipIsVisibleRect IN GDIPLUS LONG graphics, SINGLE x, SINGLE y, SINGLE
nWidth, SINGLE Height, LONG @result<br>
DECLARE LONG GdipIsVisibleRectI IN GDIPLUS LONG graphics, LONG x, LONG y, LONG nWidth,
LONG Height, LONG @result<br>
DECLARE LONG GdipSaveGraphics IN GDIPLUS LONG graphics, LONG @STATE<br>
DECLARE LONG GdipRestoreGraphics IN GDIPLUS LONG graphics, LONG STATE<br>
DECLARE LONG GdipBeginContainer IN GDIPLUS LONG graphics, STRING @dstrect, STRING
@srcRect, LONG unit, LONG @STATE<br>
DECLARE LONG GdipBeginContainerI IN GDIPLUS LONG graphics, STRING @dstrect, STRING
@srcRect, LONG unit, LONG @STATE<br>
DECLARE LONG GdipBeginContainer2 IN GDIPLUS LONG graphics, LONG @STATE<br>
DECLARE LONG GdipEndContainer IN GDIPLUS LONG graphics, LONG STATE<br>
DECLARE LONG GdipGetMetafileHeaderFromWmf IN GDIPLUS LONG hWmf, STRING @WmfPlaceableFileHdr,
STRING @header<br>
DECLARE LONG GdipGetMetafileHeaderFromEmf IN GDIPLUS LONG hEmf, STRING @header<br>
DECLARE LONG GdipGetMetafileHeaderFromFile IN GDIPLUS STRING FilName, STRING @header<br>
DECLARE LONG GdipGetMetafileHeaderFromStream IN GDIPLUS INTEGER stream, STRING @header<br>
DECLARE LONG GdipGetMetafileHeaderFromMetafile IN GDIPLUS LONG metafile, STRING @header<br>
DECLARE LONG GdipGetHemfFromMetafile IN GDIPLUS LONG metafile, LONG @hEmf<br>
DECLARE LONG GdipCreateStreamOnFile IN GDIPLUS STRING FilName, LONG access, INTEGER
@stream<br>
DECLARE LONG GdipCreateMetafileFromWmf IN GDIPLUS LONG hWmf, LONG bDeleteWmf, STRING
@WmfPlaceableFileHdr, LONG metafile<br>
DECLARE LONG GdipCreateMetafileFromEmf IN GDIPLUS LONG hEmf, LONG bDeleteEmf, LONG
@metafile<br>
DECLARE LONG GdipCreateMetafileFromFile IN GDIPLUS STRING @byvalfile, LONG @metafile<br>
DECLARE LONG GdipCreateMetafileFromWmfFile IN GDIPLUS STRING file, STRING @WmfPlaceableFileHdr,
LONG @metafile<br>
DECLARE LONG GdipCreateMetafileFromStream IN GDIPLUS INTEGER stream, Long @metafile<br>
DECLARE LONG GdipRecordMetafile IN GDIPLUS LONG referenceHdc, LONG @etype, STRING
@frameRect, LONG frameUnit, STRING description, LONG @metafile<br>
DECLARE LONG GdipRecordMetafileI IN GDIPLUS LONG referenceHdc, LONG @etype, STRING
@frameRect, LONG frameUnit, STRING description, LONG @metafile<br>
DECLARE LONG GdipRecordMetafileFileName IN GDIPLUS STRING FilName, LONG referenceHdc,
LONG @etype, STRING @frameRect, LONG frameUnit, STRING description, LONG @metafile<br>
DECLARE LONG GdipRecordMetafileFileNameI IN GDIPLUS STRING FilName, LONG referenceHdc,
LONG @etype, STRING @frameRect, LONG frameUnit, STRING description, LONG @metafile<br>
DECLARE LONG GdipRecordMetafileFileStream IN GDIPLUS INTEGER stream, LONG referenceHdc,
LONG @etype, STRING frameRect, LONG frameUnit, STRING description, LONG @metafile<br>
DECLARE LONG GdipRecordMetafileFileStreamI IN GDIPLUS INTEGER stream, LONG referenceHdc,
LONG @etype, STRING @frameRect, LONG frameUnit, STRING description, LONG @metafile<br>
DECLARE LONG GdipSetMetafileDownLevelRasterizationLimit IN GDIPLUS LONG metafile,
LONG metafileRasterizationLimitDpi<br>
DECLARE LONG GdipGetMetafileDownLevelRasterizationLimit IN GDIPLUS LONG metafile,
LONG @metafileRasterizationLimitDpi<br>
DECLARE LONG GdipGetImageDecodersSize IN GDIPLUS LONG @numDecoders, LONG @SIZE<br>
DECLARE LONG GdipGetImageDecoders IN GDIPLUS LONG numDecoders, LONG SIZE, STRING @decoders<br>
DECLARE LONG GdipGetImageEncodersSize IN GDIPLUS LONG @numEncoders, LONG @SIZE<br>
DECLARE LONG GdipGetImageEncoders IN GDIPLUS LONG numEncoders, LONG SIZE, STRING @encoders<br>
DECLARE LONG GdipComment IN GDIPLUS LONG graphics, LONG sizeData, STRING @nData<br>
*!* Image<br>
DECLARE LONG GdipLoadImageFromFile IN GDIPLUS STRING FilName, LONG @nImage<br>
DECLARE LONG GdipLoadImageFromFileICM IN GDIPLUS STRING FilName, LONG @nImage<br>
DECLARE LONG GdipLoadImageFromStream IN GDIPLUS INTEGER stream, LONG @nImage<br>
DECLARE LONG GdipLoadImageFromStreamICM IN GDIPLUS INTEGER stream, LONG @nImage<br>
DECLARE LONG GdipDisposeImage IN GDIPLUS LONG nImage<br>
DECLARE LONG GdipSaveImageToFile IN GDIPLUS LONG nImage, STRING FilName, STRING @clsidEncoder,
STRING @encoderParams<br>
DECLARE LONG GdipSaveImageToStream IN GDIPLUS LONG nImage, INTEGER stream, STRING
@clsidEncoder, STRING @encoderParams<br>
DECLARE LONG GdipSaveAdd IN GDIPLUS LONG nImage, LONG @encoderParams<br>
DECLARE LONG GdipSaveAddImage IN GDIPLUS LONG nImage, LONG newnImage, LONG @encoderParams<br>
DECLARE LONG GdipGetImageGraphicsContext IN GDIPLUS LONG nImage, LONG @graphics<br>
DECLARE LONG GdipGetImageBounds IN GDIPLUS LONG nImage, STRING @srcRect, LONG @srcUnit<br>
DECLARE LONG GdipGetImageDimension IN GDIPLUS LONG nImage, SINGLE @nWidth, SINGLE
@Height<br>
DECLARE LONG GdipGetImageType IN GDIPLUS LONG nImage, LONG @itype<br>
DECLARE LONG GdipGetImageWidth IN GDIPLUS LONG nImage, LONG @nWidth<br>
DECLARE LONG GdipGetImageHeight IN GDIPLUS LONG nImage, LONG @Height<br>
DECLARE LONG GdipGetImageHorizontalResolution IN GDIPLUS LONG nImage, SINGLE @resolution<br>
DECLARE LONG GdipGetImageVerticalResolution IN GDIPLUS LONG nImage, SINGLE @resolution<br>
DECLARE LONG GdipGetImageFlags IN GDIPLUS LONG nImage, LONG @flags<br>
DECLARE LONG GdipGetImageRawFormat IN GDIPLUS LONG nImage, STRING @format<br>
DECLARE LONG GdipGetImagePixelFormat IN GDIPLUS LONG nImage, LONG @PixelFormat<br>
DECLARE LONG GdipGetImageThumbnail IN GDIPLUS LONG nImage, LONG thumbWidth, LONG thumbHeight,
LONG @thumbnImage, LONG pCALLBACK, LONG callbackData<br>
DECLARE LONG GdipGetEncoderParameterListSize IN GDIPLUS LONG nImage, STRING @clsidEncoder,
LONG @SIZE<br>
DECLARE LONG GdipGetEncoderParameterList IN GDIPLUS LONG nImage, STRING @clsidEncoder,
LONG SIZE, LONG @buffer<br>
DECLARE LONG GdipImageGetFrameDimensionsCount IN GDIPLUS LONG nImage, LONG @Count<br>
DECLARE LONG GdipImageGetFrameDimensionsList IN GDIPLUS LONG nImage, STRING @dimensionIDs,
LONG Count<br>
DECLARE LONG GdipImageGetFrameCount IN GDIPLUS LONG nImage, STRING @dimensionID, LONG
@Count<br>
DECLARE LONG GdipImageSelectActiveFrame IN GDIPLUS LONG nImage, STRING @dimensionID,
LONG frameIndex<br>
DECLARE LONG GdipImageRotateFlip IN GDIPLUS LONG nImage, LONG rfType<br>
DECLARE LONG GdipGetImagePalette IN GDIPLUS LONG nImage, LONG @palette, LONG SIZE<br>
DECLARE LONG GdipSetImagePalette IN GDIPLUS LONG nImage, LONG @palette<br>
DECLARE LONG GdipGetImagePaletteSize IN GDIPLUS LONG nImage, LONG @SIZE<br>
DECLARE LONG GdipGetPropertyCount IN GDIPLUS LONG nImage, LONG @numOfProperty<br>
DECLARE LONG GdipGetPropertyIdList IN GDIPLUS LONG nImage, LONG numOfProperty, LONG
@list<br>
DECLARE LONG GdipGetPropertyItemSize IN GDIPLUS LONG nImage, LONG propId, LONG @SIZE<br>
DECLARE LONG GdipGetPropertyItem IN GDIPLUS LONG nImage, LONG propId, LONG propSize,
STRING @buffer<br>
DECLARE LONG GdipGetPropertySize IN GDIPLUS LONG nImage, LONG @totalBufferSize, LONG
@numProperties<br>
DECLARE LONG GdipGetAllPropertyItems IN GDIPLUS LONG nImage, LONG totalBufferSize,
LONG numProperties, STRING @allItems<br>
DECLARE LONG GdipRemovePropertyItem IN GDIPLUS LONG nImage, LONG propId<br>
DECLARE LONG GdipSetPropertyItem IN GDIPLUS LONG nImage, STRING @item<br>
DECLARE LONG GdipImageForceValidation IN GDIPLUS LONG nImage<br>
*!* Bitmap<br>
DECLARE LONG GdipCreateBitmapFromFile IN GDIPLUS LONG FilName, LONG @nBitmap<br>
DECLARE LONG GdipCreateBitmapFromFileICM IN GDIPLUS LONG FilName, LONG @nBitmap<br>
DECLARE LONG GdipCreateBitmapFromStream IN GDIPLUS INTEGER stream, Long @nBitmap<br>
DECLARE LONG GdipCreateBitmapFromStreamICM IN GDIPLUS INTEGER stream, Long @nBitmap<br>
DECLARE LONG GdipCreateBitmapFromScan0 IN GDIPLUS LONG nWidth, LONG Height, LONG stride,
LONG PixelFormat, STRING @scan0, LONG @nBitmap<br>
DECLARE LONG GdipCreateBitmapFromGraphics IN GDIPLUS LONG nWidth, LONG Height, LONG
graphics, LONG @nBitmap<br>
DECLARE LONG GdipCreateBitmapFromDirectDrawSurface IN GDIPLUS LONG @surface, Long
@nBitmap<br>
DECLARE LONG GdipCreateBitmapFromGdiDib IN GDIPLUS STRING @gdiBitmapInfo, LONG gdiBitmapData,
LONG @nBitmap<br>
DECLARE LONG GdipCreateBitmapFromHBITMAP IN GDIPLUS LONG hbm, LONG hpal, LONG @nBitmap<br>
DECLARE LONG GdipCreateHBITMAPFromBitmap IN GDIPLUS LONG nBitmap, LONG @hbmReturn,
LONG background<br>
DECLARE LONG GdipCreateBitmapFromHICON IN GDIPLUS LONG hicon, LONG @nBitmap<br>
DECLARE LONG GdipCreateHICONFromBitmap IN GDIPLUS LONG nBitmap, LONG @hbmReturn<br>
DECLARE LONG GdipCreateBitmapFromResource IN GDIPLUS LONG hInstance, STRING lpBitmapName,
LONG @nBitmap<br>
DECLARE LONG GdipCloneBitmapArea IN GDIPLUS SINGLE x, SINGLE y, SINGLE nWidth, SINGLE
Height, LONG PixelFormat, LONG srcBitmap, LONG @dstBitmap<br>
DECLARE LONG GdipCloneBitmapAreaI IN GDIPLUS LONG x, LONG y, LONG nWidth, LONG Height,
LONG PixelFormat, LONG srcBitmap, LONG @dstBitmap<br>
DECLARE LONG GdipBitmapLockBits IN GDIPLUS LONG nBitmap, STRING @nRect, LONG flags,
LONG PixelFormat, LONG @lockedBitmapData<br>
DECLARE LONG GdipBitmapUnlockBits IN GDIPLUS LONG nBitmap, LONG @lockedBitmapData<br>
DECLARE LONG GdipBitmapGetPixel IN GDIPLUS LONG nBitmap, LONG x, LONG y, LONG @COLOR<br>
DECLARE LONG GdipBitmapSetPixel IN GDIPLUS LONG nBitmap, LONG x, LONG y, LONG COLOR<br>
DECLARE LONG GdipBitmapSetResolution IN GDIPLUS LONG nBitmap, SINGLE xdpi, SINGLE
ydpi<br>
*!* CachedBitmap<br>
DECLARE LONG GdipCreateCachedBitmap IN GDIPLUS LONG nBitmap, LONG graphics, LONG @cachedBitmap<br>
DECLARE LONG GdipDeleteCachedBitmap IN GDIPLUS LONG cachedBitmap<br>
DECLARE LONG GdipDrawCachedBitmap IN GDIPLUS LONG graphics, LONG cachedBitmap, LONG
x, LONG y<br>
*!* Brush<br>
DECLARE LONG GdipCloneBrush IN GDIPLUS LONG brush, LONG @cloneBrush<br>
DECLARE LONG GdipDeleteBrush IN GDIPLUS LONG brush<br>
DECLARE LONG GdipGetBrushType IN GDIPLUS LONG brush, LONG @brshType<br>
*!* HatchBrush<br>
DECLARE LONG GdipCreateHatchBrush IN GDIPLUS LONG style, LONG forecolr, LONG backcolr,
LONG @brush<br>
DECLARE LONG GdipGetHatchStyle IN GDIPLUS LONG brush, LONG @style<br>
DECLARE LONG GdipGetHatchForegroundColor IN GDIPLUS LONG brush, LONG @forecolr<br>
DECLARE LONG GdipGetHatchBackgroundColor IN GDIPLUS LONG brush, LONG @backcolr<br>
*!* SolidBrush<br>
DECLARE LONG GdipCreateSolidFill IN GDIPLUS LONG argb, LONG @brush<br>
DECLARE LONG GdipSetSolidFillColor IN GDIPLUS LONG brush, LONG argb<br>
DECLARE LONG GdipGetSolidFillColor IN GDIPLUS LONG brush, LONG @argb<br>
*!* LineBrush<br>
DECLARE LONG GdipCreateLineBrush IN GDIPLUS STRING @point1, STRING @point2, LONG color1,
LONG color2, LONG WrapMd, LONG @lineGradient<br>
DECLARE LONG GdipCreateLineBrushI IN GDIPLUS STRING @point1, STRING @point2, LONG
color1, LONG color2, LONG WrapMd, LONG @lineGradient<br>
DECLARE LONG GdipCreateLineBrushFromRect IN GDIPLUS STRING @nRect, LONG color1, LONG
color2, LONG mode, LONG WrapMd, LONG @lineGradient<br>
DECLARE LONG GdipCreateLineBrushFromRectI IN GDIPLUS STRING @nRect, LONG color1, LONG
color2, LONG mode, LONG WrapMd, LONG @lineGradient<br>
DECLARE LONG GdipCreateLineBrushFromRectWithAngle IN GDIPLUS STRING @nRect, LONG color1,
LONG color2, SINGLE angle, LONG isAngleScalable, LONG WrapMd, LONG @lineGradient<br>
DECLARE LONG GdipCreateLineBrushFromRectWithAngleI IN GDIPLUS STRING @nRect, LONG
color1, LONG color2, SINGLE angle, LONG isAngleScalable, LONG WrapMd, LONG @lineGradient<br>
DECLARE LONG GdipSetLineColors IN GDIPLUS LONG brush, LONG color1, LONG color2<br>
DECLARE LONG GdipGetLineColors IN GDIPLUS LONG brush, LONG @lColors<br>
DECLARE LONG GdipGetLineRect IN GDIPLUS LONG brush, STRING @nRect<br>
DECLARE LONG GdipGetLineRectI IN GDIPLUS LONG brush, STRING @nRect<br>
DECLARE LONG GdipSetLineGammaCorrection IN GDIPLUS LONG brush, LONG useGammaCorrection<br>
DECLARE LONG GdipGetLineGammaCorrection IN GDIPLUS LONG brush, LONG @useGammaCorrection<br>
DECLARE LONG GdipGetLineBlendCount IN GDIPLUS LONG brush, LONG @Count<br>
DECLARE LONG GdipGetLineBlend IN GDIPLUS LONG brush, SINGLE @blend, SINGLE @positions,
LONG Count<br>
DECLARE LONG GdipSetLineBlend IN GDIPLUS LONG brush, SINGLE @blend, SINGLE @positions,
LONG Count<br>
DECLARE LONG GdipGetLinePresetBlendCount IN GDIPLUS LONG brush, LONG @Count<br>
DECLARE LONG GdipGetLinePresetBlend IN GDIPLUS LONG brush, LONG @blend, SINGLE @positions,
LONG Count<br>
DECLARE LONG GdipSetLinePresetBlend IN GDIPLUS LONG brush, LONG @blend, SINGLE @positions,
LONG Count<br>
DECLARE LONG GdipSetLineSigmaBlend IN GDIPLUS LONG brush, SINGLE FOCUS, SINGLE theScale<br>
DECLARE LONG GdipSetLineLinearBlend IN GDIPLUS LONG brush, SINGLE FOCUS, SINGLE theScale<br>
DECLARE LONG GdipSetLineWrapMode IN GDIPLUS LONG brush, LONG WrapMd<br>
DECLARE LONG GdipGetLineWrapMode IN GDIPLUS LONG brush, LONG @WrapMd<br>
DECLARE LONG GdipGetLineTransform IN GDIPLUS LONG brush, LONG @matrix<br>
DECLARE LONG GdipSetLineTransform IN GDIPLUS LONG brush, LONG matrix<br>
DECLARE LONG GdipResetLineTransform IN GDIPLUS LONG brush<br>
DECLARE LONG GdipMultiplyLineTransform IN GDIPLUS LONG brush, LONG matrix, LONG order<br>
DECLARE LONG GdipTranslateLineTransform IN GDIPLUS LONG brush, SINGLE dx, SINGLE dy,
LONG order<br>
DECLARE LONG GdipScaleLineTransform IN GDIPLUS LONG brush, SINGLE sx, SINGLE sy, LONG
order<br>
DECLARE LONG GdipRotateLineTransform IN GDIPLUS LONG brush, SINGLE angle, LONG order<br>
*!* TextureBrush<br>
DECLARE LONG GdipCreateTexture IN GDIPLUS LONG nImage, LONG WrapMd, LONG @texture<br>
DECLARE LONG GdipCreateTexture2 IN GDIPLUS LONG nImage, LONG WrapMd, SINGLE x, SINGLE
y, SINGLE nWidth, SINGLE Height, LONG @texture<br>
DECLARE LONG GdipCreateTextureIA IN GDIPLUS LONG nImage, LONG imageAttributes, SINGLE
x, SINGLE y, SINGLE nWidth, SINGLE Height, LONG @texture<br>
DECLARE LONG GdipCreateTexture2I IN GDIPLUS LONG nImage, LONG WrapMd, LONG x, LONG
y, LONG nWidth, LONG Height, LONG @texture<br>
DECLARE LONG GdipCreateTextureIAI IN GDIPLUS LONG nImage, LONG imageAttributes, LONG
x, LONG y, LONG nWidth, LONG Height, LONG @texture<br>
DECLARE LONG GdipGetTextureTransform IN GDIPLUS LONG brush, LONG matrix<br>
DECLARE LONG GdipSetTextureTransform IN GDIPLUS LONG brush, LONG matrix<br>
DECLARE LONG GdipResetTextureTransform IN GDIPLUS LONG brush<br>
DECLARE LONG GdipTranslateTextureTransform IN GDIPLUS LONG brush, SINGLE dx, SINGLE
dy, LONG order<br>
DECLARE LONG GdipMultiplyTextureTransform IN GDIPLUS LONG brush, LONG matrix, LONG
order<br>
DECLARE LONG GdipScaleTextureTransform IN GDIPLUS LONG brush, SINGLE sx, SINGLE sy,
LONG order<br>
DECLARE LONG GdipRotateTextureTransform IN GDIPLUS LONG brush, SINGLE angle, LONG
order<br>
DECLARE LONG GdipSetTextureWrapMode IN GDIPLUS LONG brush, LONG WrapMd<br>
DECLARE LONG GdipGetTextureWrapMode IN GDIPLUS LONG brush, LONG @WrapMd<br>
DECLARE LONG GdipGetTextureImage IN GDIPLUS LONG brush, LONG @nImage<br>
*!* PathGradientBrush<br>
DECLARE LONG GdipCreatePathGradient IN GDIPLUS STRING @pPoint, LONG Count, LONG WrapMd,
LONG @polyGradient<br>
DECLARE LONG GdipCreatePathGradientI IN GDIPLUS STRING @pPoint, LONG Count, LONG WrapMd,
LONG @polyGradient<br>
DECLARE LONG GdipCreatePathGradientFromPath IN GDIPLUS LONG path, LONG @polyGradient<br>
DECLARE LONG GdipGetPathGradientCenterColor IN GDIPLUS LONG brush, LONG @lColors<br>
DECLARE LONG GdipSetPathGradientCenterColor IN GDIPLUS LONG brush, LONG lColors<br>
DECLARE LONG GdipGetPathGradientSurroundColorsWithCount IN GDIPLUS LONG brush, LONG
@argb, LONG @Count<br>
DECLARE LONG GdipSetPathGradientSurroundColorsWithCount IN GDIPLUS LONG brush, LONG
@argb, LONG @Count<br>
DECLARE LONG GdipGetPathGradientPath IN GDIPLUS LONG brush, LONG path<br>
DECLARE LONG GdipSetPathGradientPath IN GDIPLUS LONG brush, LONG path<br>
DECLARE LONG GdipGetPathGradientCenterPoint IN GDIPLUS LONG brush, STRING @pPoint<br>
DECLARE LONG GdipGetPathGradientCenterPointI IN GDIPLUS LONG brush, STRING @pPoint<br>
DECLARE LONG GdipSetPathGradientCenterPoint IN GDIPLUS LONG brush, STRING @pPoint<br>
DECLARE LONG GdipSetPathGradientCenterPointI IN GDIPLUS LONG brush, STRING @pPoint<br>
DECLARE LONG GdipGetPathGradientRect IN GDIPLUS LONG brush, STRING @nRect<br>
DECLARE LONG GdipGetPathGradientRectI IN GDIPLUS LONG brush, STRING @nRect<br>
DECLARE LONG GdipGetPathGradientPointCount IN GDIPLUS LONG brush, LONG @Count<br>
DECLARE LONG GdipGetPathGradientSurroundColorCount IN GDIPLUS LONG brush, LONG @Count<br>
DECLARE LONG GdipSetPathGradientGammaCorrection IN GDIPLUS LONG brush, LONG useGammaCorrection<br>
DECLARE LONG GdipGetPathGradientGammaCorrection IN GDIPLUS LONG brush, LONG @useGammaCorrection<br>
DECLARE LONG GdipGetPathGradientBlendCount IN GDIPLUS LONG brush, LONG @Count<br>
DECLARE LONG GdipGetPathGradientBlend IN GDIPLUS LONG brush, SINGLE @blend, SINGLE
@positions, LONG Count<br>
DECLARE LONG GdipSetPathGradientBlend IN GDIPLUS LONG brush, SINGLE @blend, SINGLE
@positions, LONG Count<br>
DECLARE LONG GdipGetPathGradientPresetBlendCount IN GDIPLUS LONG brush, LONG @Count<br>
DECLARE LONG GdipGetPathGradientPresetBlend IN GDIPLUS LONG brush, LONG @blend, SINGLE
@positions, LONG Count<br>
DECLARE LONG GdipSetPathGradientPresetBlend IN GDIPLUS LONG brush, LONG @blend, SINGLE
@positions, LONG Count<br>
DECLARE LONG GdipSetPathGradientSigmaBlend IN GDIPLUS LONG brush, SINGLE FOCUS, SINGLE
sscale<br>
DECLARE LONG GdipSetPathGradientLinearBlend IN GDIPLUS LONG brush, SINGLE FOCUS, SINGLE
sscale<br>
DECLARE LONG GdipGetPathGradientWrapMode IN GDIPLUS LONG brush, LONG @WrapMd<br>
DECLARE LONG GdipSetPathGradientWrapMode IN GDIPLUS LONG brush, LONG WrapMd<br>
DECLARE LONG GdipGetPathGradientTransform IN GDIPLUS LONG brush, LONG matrix<br>
DECLARE LONG GdipSetPathGradientTransform IN GDIPLUS LONG brush, LONG matrix<br>
DECLARE LONG GdipResetPathGradientTransform IN GDIPLUS LONG brush<br>
DECLARE LONG GdipMultiplyPathGradientTransform IN GDIPLUS LONG brush, LONG matrix,
LONG order<br>
DECLARE LONG GdipTranslatePathGradientTransform IN GDIPLUS LONG brush, SINGLE dx,
SINGLE dy, LONG order<br>
DECLARE LONG GdipScalePathGradientTransform IN GDIPLUS LONG brush, SINGLE sx, SINGLE
sy, LONG order<br>
DECLARE LONG GdipRotatePathGradientTransform IN GDIPLUS LONG brush, SINGLE angle,
LONG order<br>
DECLARE LONG GdipGetPathGradientFocusScales IN GDIPLUS LONG brush, SINGLE @xScale,
SINGLE @yScale<br>
DECLARE LONG GdipSetPathGradientFocusScales IN GDIPLUS LONG brush, SINGLE xScale,
SINGLE yScale<br>
*!* Path<br>
DECLARE LONG GdipCreatePath IN GDIPLUS LONG brushmode, LONG @path<br>
DECLARE LONG GdipCreatePath2 IN GDIPLUS STRING @pPoint, STRING @types, LONG Count,
LONG @brushmode, LONG @path<br>
DECLARE LONG GdipCreatePath2I IN GDIPLUS STRING @pPoint, STRING @types, LONG Count,
LONG @brushmode, LONG @path<br>
DECLARE LONG GdipClonePath IN GDIPLUS LONG path, LONG @clonePath<br>
DECLARE LONG GdipDeletePath IN GDIPLUS LONG path<br>
DECLARE LONG GdipResetPath IN GDIPLUS LONG path<br>
DECLARE LONG GdipGetPointCount IN GDIPLUS LONG path, LONG @Count<br>
DECLARE LONG GdipGetPathTypes IN GDIPLUS LONG path, STRING @types, LONG Count<br>
DECLARE LONG GdipGetPathPoints IN GDIPLUS LONG path, STRING @pPoint, LONG Count<br>
DECLARE LONG GdipGetPathPointsI IN GDIPLUS LONG path, STRING @pPoint, LONG Count<br>
DECLARE LONG GdipGetPathFillMode IN GDIPLUS LONG path, LONG brushmode<br>
DECLARE LONG GdipSetPathFillMode IN GDIPLUS LONG path, LONG brushmode<br>
DECLARE LONG GdipGetPathData IN GDIPLUS LONG path, STRING @pdata<br>
DECLARE LONG GdipStartPathFigure IN GDIPLUS LONG path<br>
DECLARE LONG GdipClosePathFigure IN GDIPLUS LONG path<br>
DECLARE LONG GdipClosePathFigures IN GDIPLUS LONG path<br>
DECLARE LONG GdipSetPathMarker IN GDIPLUS LONG path<br>
DECLARE LONG GdipClearPathMarkers IN GDIPLUS LONG path<br>
DECLARE LONG GdipReversePath IN GDIPLUS LONG path<br>
DECLARE LONG GdipGetPathLastPoint IN GDIPLUS LONG path, STRING @lastPoint<br>
DECLARE LONG GdipAddPathLine IN GDIPLUS LONG path, SINGLE x1, SINGLE y1, SINGLE x2,
SINGLE y2<br>
DECLARE LONG GdipAddPathLine2 IN GDIPLUS LONG path, STRING @pPoint, LONG Count<br>
DECLARE LONG GdipAddPathArc IN GDIPLUS LONG path, SINGLE x, SINGLE y, SINGLE nWidth,
SINGLE Height, SINGLE startAngle, SINGLE sweepAngle<br>
DECLARE LONG GdipAddPathBezier IN GDIPLUS LONG path, SINGLE x1, SINGLE y1, SINGLE
x2, SINGLE y2, SINGLE x3, SINGLE y3, SINGLE x4, SINGLE y4<br>
DECLARE LONG GdipAddPathBeziers IN GDIPLUS LONG path, STRING @pPoint, LONG Count<br>
DECLARE LONG GdipAddPathCurve IN GDIPLUS LONG path, STRING @pPoint, LONG Count<br>
DECLARE LONG GdipAddPathCurve2 IN GDIPLUS LONG path, STRING @pPoint, LONG Count, SINGLE
tension<br>
DECLARE LONG GdipAddPathCurve3 IN GDIPLUS LONG path, STRING @pPoint, LONG Count, LONG
offset, LONG numberOfSegments, SINGLE tension<br>
DECLARE LONG GdipAddPathClosedCurve IN GDIPLUS LONG path, STRING @pPoint, LONG Count<br>
DECLARE LONG GdipAddPathClosedCurve2 IN GDIPLUS LONG path, STRING @pPoint, LONG Count,
SINGLE tension<br>
DECLARE LONG GdipAddPathRectangle IN GDIPLUS LONG path, SINGLE x, SINGLE y, SINGLE
nWidth, SINGLE Height<br>
DECLARE LONG GdipAddPathRectangles IN GDIPLUS LONG path, STRING @nRect, LONG Count<br>
DECLARE LONG GdipAddPathEllipse IN GDIPLUS LONG path, SINGLE x, SINGLE y, SINGLE nWidth,
SINGLE Height<br>
DECLARE LONG GdipAddPathPie IN GDIPLUS LONG path, SINGLE x, SINGLE y, SINGLE nWidth,
SINGLE Height, SINGLE startAngle, SINGLE sweepAngle<br>
DECLARE LONG GdipAddPathPolygon IN GDIPLUS LONG path, STRING @pPoint, LONG Count<br>
DECLARE LONG GdipAddPathPath IN GDIPLUS LONG path, LONG addingPath, LONG bConnect<br>
DECLARE LONG GdipAddPathString IN GDIPLUS LONG path, STRING str, LONG length, LONG
family, LONG style, SINGLE emSize, STRING @layoutRect, LONG StringFormat<br>
DECLARE LONG GdipAddPathStringI IN GDIPLUS LONG path, STRING str, LONG length, LONG
family, LONG style, SINGLE emSize, STRING @layoutRect, LONG StringFormat<br>
DECLARE LONG GdipAddPathLineI IN GDIPLUS LONG path, LONG x1, LONG y1, LONG x2, LONG
y2<br>
DECLARE LONG GdipAddPathLine2I IN GDIPLUS LONG path, STRING @pPoint, LONG Count<br>
DECLARE LONG GdipAddPathArcI IN GDIPLUS LONG path, LONG x, LONG y, LONG nWidth, LONG
Height, SINGLE startAngle, SINGLE sweepAngle<br>
DECLARE LONG GdipAddPathBezierI IN GDIPLUS LONG path, LONG x1, LONG y1, LONG x2, LONG
y2, LONG x3, LONG y3, LONG x4, LONG y4<br>
DECLARE LONG GdipAddPathBeziersI IN GDIPLUS LONG path, STRING @pPoint, LONG Count<br>
DECLARE LONG GdipAddPathCurveI IN GDIPLUS LONG path, STRING @pPoint, LONG Count<br>
DECLARE LONG GdipAddPathCurve2I IN GDIPLUS LONG path, STRING @pPoint, LONG Count,
LONG tension<br>
DECLARE LONG GdipAddPathCurve3I IN GDIPLUS LONG path, STRING @pPoint, LONG Count,
LONG offset, LONG numberOfSegments, SINGLE tension<br>
DECLARE LONG GdipAddPathClosedCurveI IN GDIPLUS LONG path, STRING @pPoint, LONG Count<br>
DECLARE LONG GdipAddPathClosedCurve2I IN GDIPLUS LONG path, STRING @pPoint, LONG Count,
SINGLE tension<br>
DECLARE LONG GdipAddPathRectangleI IN GDIPLUS LONG path, LONG x, LONG y, LONG nWidth,
LONG Height<br>
DECLARE LONG GdipAddPathRectanglesI IN GDIPLUS LONG path, STRING @rects, LONG Count<br>
DECLARE LONG GdipAddPathEllipseI IN GDIPLUS LONG path, LONG x, LONG y, LONG nWidth,
LONG Height<br>
DECLARE LONG GdipAddPathPieI IN GDIPLUS LONG path, LONG x, LONG y, LONG nWidth, LONG
Height, SINGLE startAngle, SINGLE sweepAngle<br>
DECLARE LONG GdipAddPathPolygonI IN GDIPLUS LONG path, STRING @pPoint, LONG Count<br>
DECLARE LONG GdipFlattenPath IN GDIPLUS LONG path, LONG matrix, SINGLE flatness<br>
DECLARE LONG GdipWindingModeOutline IN GDIPLUS LONG path, LONG matrix, SINGLE flatness<br>
DECLARE LONG GdipWidenPath IN GDIPLUS LONG nativePath, LONG pen, LONG matrix, SINGLE
flatness<br>
DECLARE LONG GdipWarpPath IN GDIPLUS LONG path, LONG matrix, STRING @pPoint, LONG
Count, SINGLE srcx, SINGLE srcy, SINGLE srcwidth, SINGLE srcheight, LONG WarpMd, SINGLE
flatness<br>
DECLARE LONG GdipTransformPath IN GDIPLUS LONG path, LONG matrix<br>
DECLARE LONG GdipGetPathWorldBounds IN GDIPLUS LONG path, STRING @bounds, LONG matrix,
LONG pen<br>
DECLARE LONG GdipGetPathWorldBoundsI IN GDIPLUS LONG path, STRING @bounds, LONG matrix,
LONG pen<br>
DECLARE LONG GdipIsVisiblePathPoint IN GDIPLUS LONG path, SINGLE x, SINGLE y, LONG
graphics, LONG @result<br>
DECLARE LONG GdipIsVisiblePathPointI IN GDIPLUS LONG path, LONG x, LONG y, LONG graphics,
LONG @result<br>
DECLARE LONG GdipIsOutlineVisiblePathPoint IN GDIPLUS LONG path, SINGLE x, SINGLE
y, LONG pen, LONG graphics, LONG @result<br>
DECLARE LONG GdipIsOutlineVisiblePathPointI IN GDIPLUS LONG path, LONG x, LONG y,
LONG pen, LONG graphics, LONG @result<br>
*!* PathIterator<br>
DECLARE LONG GdipCreatePathIter IN GDIPLUS LONG @iterator, LONG path<br>
DECLARE LONG GdipDeletePathIter IN GDIPLUS LONG iterator<br>
DECLARE LONG GdipPathIterNextSubpath IN GDIPLUS LONG iterator, LONG @resultCount,
LONG @startIndex, LONG @endIndex, LONG @isClosed<br>
DECLARE LONG GdipPathIterNextSubpathPath IN GDIPLUS LONG iterator, LONG @resultCount,
LONG path, LONG @isClosed<br>
DECLARE LONG GdipPathIterNextPathType IN GDIPLUS LONG iterator, LONG @resultCount,
STRING @pathType, LONG @startIndex, LONG @endIndex<br>
DECLARE LONG GdipPathIterNextMarker IN GDIPLUS LONG iterator, LONG @resultCount, LONG
@startIndex, LONG @endIndex<br>
DECLARE LONG GdipPathIterNextMarkerPath IN GDIPLUS LONG iterator, LONG @resultCount,
LONG path<br>
DECLARE LONG GdipPathIterGetCount IN GDIPLUS LONG iterator, LONG @Count<br>
DECLARE LONG GdipPathIterGetSubpathCount IN GDIPLUS LONG iterator, LONG @Count<br>
DECLARE LONG GdipPathIterIsValid IN GDIPLUS LONG iterator, LONG @valid<br>
DECLARE LONG GdipPathIterHasCurve IN GDIPLUS LONG iterator, LONG @hasCurve<br>
DECLARE LONG GdipPathIterRewind IN GDIPLUS LONG iterator<br>
DECLARE LONG GdipPathIterEnumerate IN GDIPLUS LONG iterator, LONG @resultCount, STRING
@pPoint, STRING @types, LONG Count<br>
DECLARE LONG GdipPathIterCopyData IN GDIPLUS LONG iterator, LONG @resultCount, STRING
@pPoint, STRING @types, LONG startIndex, LONG endIndex<br>
*!* Region<br>
DECLARE LONG GdipCreateRegion IN GDIPLUS LONG @region<br>
DECLARE LONG GdipCreateRegionRect IN GDIPLUS STRING @nRect, LONG @region<br>
DECLARE LONG GdipCreateRegionRectI IN GDIPLUS STRING @nRect, LONG @region<br>
DECLARE LONG GdipCreateRegionPath IN GDIPLUS LONG path, LONG @region<br>
DECLARE LONG GdipCreateRegionRgnData IN GDIPLUS STRING @regionData, LONG SIZE, LONG
@region<br>
DECLARE LONG GdipCreateRegionHrgn IN GDIPLUS LONG hRgn, LONG @region<br>
DECLARE LONG GdipCloneRegion IN GDIPLUS LONG region, LONG @cloneRegion<br>
DECLARE LONG GdipDeleteRegion IN GDIPLUS LONG region<br>
DECLARE LONG GdipSetInfinite IN GDIPLUS LONG region<br>
DECLARE LONG GdipSetEmpty IN GDIPLUS LONG region<br>
DECLARE LONG GdipCombineRegionRect IN GDIPLUS LONG region, STRING @nRect, LONG CombineMd<br>
DECLARE LONG GdipCombineRegionRectI IN GDIPLUS LONG region, STRING @nRect, LONG CombineMd<br>
DECLARE LONG GdipCombineRegionPath IN GDIPLUS LONG region, LONG path, LONG CombineMd<br>
DECLARE LONG GdipCombineRegionRegion IN GDIPLUS LONG region, LONG region2, LONG CombineMd<br>
DECLARE LONG GdipTranslateRegion IN GDIPLUS LONG region, SINGLE dx, SINGLE dy<br>
DECLARE LONG GdipTranslateRegionI IN GDIPLUS LONG region, LONG dx, LONG dy<br>
DECLARE LONG GdipTransformRegion IN GDIPLUS LONG region, LONG matrix<br>
DECLARE LONG GdipGetRegionBounds IN GDIPLUS LONG region, LONG graphics, STRING @nRect<br>
DECLARE LONG GdipGetRegionBoundsI IN GDIPLUS LONG region, LONG graphics, STRING @nRect<br>
DECLARE LONG GdipGetRegionHRgn IN GDIPLUS LONG region, LONG graphics, LONG @hRgn<br>
DECLARE LONG GdipIsEmptyRegion IN GDIPLUS LONG region, LONG graphics, LONG @result<br>
DECLARE LONG GdipIsInfiniteRegion IN GDIPLUS LONG region, LONG graphics, LONG @result<br>
DECLARE LONG GdipIsEqualRegion IN GDIPLUS LONG region, LONG region2, LONG graphics,
LONG @result<br>
DECLARE LONG GdipGetRegionDataSize IN GDIPLUS LONG region, LONG @bufferSize<br>
DECLARE LONG GdipGetRegionData IN GDIPLUS LONG region, STRING @buffer, LONG bufferSize,
LONG @sizeFilled<br>
DECLARE LONG GdipIsVisibleRegionPoint IN GDIPLUS LONG region, SINGLE x, SINGLE y,
LONG graphics, LONG @result<br>
DECLARE LONG GdipIsVisibleRegionPointI IN GDIPLUS LONG region, LONG x, LONG y, LONG
graphics, LONG @result<br>
DECLARE LONG GdipIsVisibleRegionRect IN GDIPLUS LONG region, SINGLE x, SINGLE y, SINGLE
nWidth, SINGLE Height, LONG graphics, LONG @result<br>
DECLARE LONG GdipIsVisibleRegionRectI IN GDIPLUS LONG region, LONG x, LONG y, LONG
nWidth, LONG Height, LONG graphics, LONG @result<br>
DECLARE LONG GdipGetRegionScansCount IN GDIPLUS LONG region, LONG @Ucount, LONG matrix<br>
DECLARE LONG GdipGetRegionScans IN GDIPLUS LONG region, STRING @rects, LONG @Count,
LONG matrix<br>
DECLARE LONG GdipGetRegionScansI IN GDIPLUS LONG region, STRING @rects, LONG @Count,
LONG matrix<br>
*!* Pen<br>
DECLARE LONG GdipCreatePen1 IN GDIPLUS LONG Colr, SINGLE nWidth, LONG unit, LONG @pen<br>
DECLARE LONG GdipCreatePen2 IN GDIPLUS LONG brush, SINGLE nWidth, LONG unit, LONG
@pen<br>
DECLARE LONG GdipClonePen IN GDIPLUS LONG pen, LONG @clonepen<br>
DECLARE LONG GdipDeletePen IN GDIPLUS LONG pen<br>
DECLARE LONG GdipSetPenWidth IN GDIPLUS LONG pen, SINGLE nWidth<br>
DECLARE LONG GdipGetPenWidth IN GDIPLUS LONG pen, SINGLE @nWidth<br>
DECLARE LONG GdipSetPenUnit IN GDIPLUS LONG pen, LONG unit<br>
DECLARE LONG GdipGetPenUnit IN GDIPLUS LONG pen, LONG @unit<br>
DECLARE LONG GdipSetPenLineCap IN GDIPLUS LONG pen, LONG startCap, LONG endCap, LONG
dcap<br>
DECLARE LONG GdipSetPenStartCap IN GDIPLUS LONG pen, LONG startCap<br>
DECLARE LONG GdipSetPenEndCap IN GDIPLUS LONG pen, LONG endCap<br>
DECLARE LONG GdipSetPenDashCap IN GDIPLUS LONG pen, LONG dcap<br>
DECLARE LONG GdipGetPenStartCap IN GDIPLUS LONG pen, LONG @startCap<br>
DECLARE LONG GdipGetPenEndCap IN GDIPLUS LONG pen, LONG @endCap<br>
DECLARE LONG GdipGetPenDashCap IN GDIPLUS LONG pen, LONG @dcap<br>
DECLARE LONG GdipSetPenLineJoin IN GDIPLUS LONG pen, LONG LnJoin<br>
DECLARE LONG GdipGetPenLineJoin IN GDIPLUS LONG pen, LONG @LnJoin<br>
DECLARE LONG GdipSetPenCustomStartCap IN GDIPLUS LONG pen, LONG customCap<br>
DECLARE LONG GdipGetPenCustomStartCap IN GDIPLUS LONG pen, LONG @customCap<br>
DECLARE LONG GdipSetPenCustomEndCap IN GDIPLUS LONG pen, LONG customCap<br>
DECLARE LONG GdipGetPenCustomEndCap IN GDIPLUS LONG pen, LONG @customCap<br>
DECLARE LONG GdipSetPenMiterLimit IN GDIPLUS LONG pen, SINGLE miterLimit<br>
DECLARE LONG GdipGetPenMiterLimit IN GDIPLUS LONG pen, SINGLE @miterLimit<br>
DECLARE LONG GdipSetPenMode IN GDIPLUS LONG pen, LONG penMode<br>
DECLARE LONG GdipGetPenMode IN GDIPLUS LONG pen, LONG @penMode<br>
DECLARE LONG GdipSetPenTransform IN GDIPLUS LONG pen, LONG matrix<br>
DECLARE LONG GdipGetPenTransform IN GDIPLUS LONG pen, LONG matrix<br>
DECLARE LONG GdipResetPenTransform IN GDIPLUS LONG pen<br>
DECLARE LONG GdipMultiplyPenTransform IN GDIPLUS LONG pen, LONG matrix, LONG order<br>
DECLARE LONG GdipTranslatePenTransform IN GDIPLUS LONG pen, SINGLE dx, SINGLE dy,
LONG order<br>
DECLARE LONG GdipScalePenTransform IN GDIPLUS LONG pen, SINGLE sx, SINGLE sy, LONG
order<br>
DECLARE LONG GdipRotatePenTransform IN GDIPLUS LONG pen, SINGLE angle, LONG order<br>
DECLARE LONG GdipSetPenColor IN GDIPLUS LONG pen, LONG argb<br>
DECLARE LONG GdipGetPenColor IN GDIPLUS LONG pen, LONG @argb<br>
DECLARE LONG GdipSetPenBrushFill IN GDIPLUS LONG pen, LONG brush<br>
DECLARE LONG GdipGetPenBrushFill IN GDIPLUS LONG pen, LONG @brush<br>
DECLARE LONG GdipGetPenFillType IN GDIPLUS LONG pen, LONG @ptype<br>
DECLARE LONG GdipGetPenDashStyle IN GDIPLUS LONG pen, LONG @dStyle<br>
DECLARE LONG GdipSetPenDashStyle IN GDIPLUS LONG pen, LONG dStyle<br>
DECLARE LONG GdipGetPenDashOffset IN GDIPLUS LONG pen, SINGLE @offset<br>
DECLARE LONG GdipSetPenDashOffset IN GDIPLUS LONG pen, SINGLE offset<br>
DECLARE LONG GdipGetPenDashCount IN GDIPLUS LONG pen, LONG @Count<br>
DECLARE LONG GdipSetPenDashArray IN GDIPLUS LONG pen, SINGLE @dash, LONG Count<br>
DECLARE LONG GdipGetPenDashArray IN GDIPLUS LONG pen, SINGLE @dash, LONG Count<br>
DECLARE LONG GdipGetPenCompoundCount IN GDIPLUS LONG pen, LONG @Count<br>
DECLARE LONG GdipSetPenCompoundArray IN GDIPLUS LONG pen, SINGLE @dash, LONG Count<br>
DECLARE LONG GdipGetPenCompoundArray IN GDIPLUS LONG pen, SINGLE @dash, LONG Count<br>
*!* FontFamily<br>
DECLARE LONG GdipCreateFontFamilyFromName IN GDIPLUS STRING FontName, LONG fontCollection,
LONG @fontFamily<br>
DECLARE LONG GdipDeleteFontFamily IN GDIPLUS LONG fontFamily<br>
DECLARE LONG GdipCloneFontFamily IN GDIPLUS LONG fontFamily, LONG @clonedFontFamily<br>
DECLARE LONG GdipGetGenericFontFamilySansSerif IN GDIPLUS LONG @nativeFamily<br>
DECLARE LONG GdipGetGenericFontFamilySerif IN GDIPLUS LONG @nativeFamily<br>
DECLARE LONG GdipGetGenericFontFamilyMonospace IN GDIPLUS LONG @nativeFamily<br>
DECLARE LONG GdipGetFamilyName IN GDIPLUS LONG family, STRING FilName, INTEGER language<br>
DECLARE LONG GdipIsStyleAvailable IN GDIPLUS LONG family, LONG style, LONG @IsStyleAvailable<br>
DECLARE LONG GdipFontCollectionEnumerable IN GDIPLUS LONG fontCollection, LONG graphics,
LONG @numFound<br>
DECLARE LONG GdipFontCollectionEnumerate IN GDIPLUS LONG fontCollection, LONG numSought,
LONG @gpfamilies, LONG numFound, LONG graphics<br>
DECLARE LONG GdipGetEmHeight IN GDIPLUS LONG family, LONG style, INTEGER @EmHeight<br>
DECLARE LONG GdipGetCellAscent IN GDIPLUS LONG family, LONG style, INTEGER @CellAscent<br>
DECLARE LONG GdipGetCellDescent IN GDIPLUS LONG family, LONG style, INTEGER @CellDescent<br>
DECLARE LONG GdipGetLineSpacing IN GDIPLUS LONG family, LONG style, INTEGER @LineSpacing<br>
*!* Font<br>
DECLARE LONG GdipCreateFontFromDC IN GDIPLUS LONG hdc, LONG @createdfont<br>
DECLARE LONG GdipCreateFontFromLogfontA IN GDIPLUS LONG hdc, LOGFONTA @lfont, LONG
@createdfont<br>
DECLARE LONG GdipCreateFontFromLogfontW IN GDIPLUS LONG hdc, LOGFONTW @lfont, LONG
@createdfont<br>
DECLARE LONG GdipCreateFont IN GDIPLUS LONG fontFamily, SINGLE emSize, LONG style,
LONG unit, LONG @createdfont<br>
DECLARE LONG GdipCloneFont IN GDIPLUS LONG curFont, LONG @cloneFont<br>
DECLARE LONG GdipDeleteFont IN GDIPLUS LONG curFont<br>
DECLARE LONG GdipGetFamily IN GDIPLUS LONG curFont, LONG @family<br>
DECLARE LONG GdipGetFontStyle IN GDIPLUS LONG curFont, LONG @style<br>
DECLARE LONG GdipGetFontSize IN GDIPLUS LONG curFont, SINGLE @SIZE<br>
DECLARE LONG GdipGetFontUnit IN GDIPLUS LONG curFont, LONG @unit<br>
DECLARE LONG GdipGetFontHeight IN GDIPLUS LONG curFont, LONG graphics, SINGLE @Height<br>
DECLARE LONG GdipGetFontHeightGivenDPI IN GDIPLUS LONG curFont, SINGLE dpi, SINGLE
@Height<br>
DECLARE LONG GdipGetLogFontA IN GDIPLUS LONG curFont, LONG graphics, LOGFONTA @lfont<br>
DECLARE LONG GdipGetLogFontW IN GDIPLUS LONG curFont, LONG graphics, LOGFONTW @lfont<br>
DECLARE LONG GdipNewInstalledFontCollection IN GDIPLUS LONG @fontCollection<br>
DECLARE LONG GdipNewPrivateFontCollection IN GDIPLUS LONG @fontCollection<br>
DECLARE LONG GdipDeletePrivateFontCollection IN GDIPLUS LONG @fontCollection<br>
DECLARE LONG GdipGetFontCollectionFamilyCount IN GDIPLUS LONG fontCollection, LONG
@numFound<br>
DECLARE LONG GdipGetFontCollectionFamilyList IN GDIPLUS LONG fontCollection, LONG
numSought, LONG @gpfamilies, LONG @numFound<br>
DECLARE LONG GdipPrivateAddFontFile IN GDIPLUS LONG fontCollection, STRING FilName<br>
DECLARE LONG GdipPrivateAddMemoryFont IN GDIPLUS LONG fontCollection, LONG memory,
LONG length<br>
*!* String<br>
DECLARE LONG GdipDrawString IN GDIPLUS LONG graphics, STRING str, LONG length, LONG
thefont, STRING @layoutRect, LONG StringFormat, LONG brush<br>
DECLARE LONG GdipMeasureString IN GDIPLUS LONG graphics, STRING str, LONG length,
LONG thefont, STRING @layoutRect, LONG StringFormat, STRING @boundingBox, LONG @codepointsFitted,
LONG @linesFilled<br>
DECLARE LONG GdipMeasureCharacterRanges IN GDIPLUS LONG graphics, STRING str, LONG
length, LONG thefont, STRING @layoutRect, LONG StringFormat, LONG regionCount, LONG
@regions<br>
DECLARE LONG GdipDrawDriverString IN GDIPLUS LONG graphics, STRING st

Collapse -

GDI+ Constants

by craig In reply to The SPS Weblog

<p>
I ran into this really cool GDI+ typelib that was written by Dana Seaman as I was
studying GDI+ for VFP.  Given VFP's lack of Enumerations, it sure was a big help
and saved me countless searches to find the values.  These will go hand-in-hand
with the Declares I posted this morning.  With Dana's permission, here they are:
</p>
<p>
<table cellspacing=5 cellpadding=5 width="90%" align=center border=1>
<tbody>
<tr>
<td>
<p>
<font face="Courier New">**************************<br>
*!* VFP GDI+ Constants<br>
*!* 07/16/2005 - Created and modified for VFP<br>
*!* by Craig Boyd from Dana Seaman's gdi+ typelib<br>
*!* Dana's email addresses have been removed to
<br>
*!* prevent spamming, they're easy enough to get<br>
*!* as the tlb is freely available from CyberActiveX<br>
*!* website.  Permission to post was granted 07-17-2005<br>
**************************<br>
*!* #DEFINE GDIplus_TYPELIB_DATE "Friday, 07 February 2003 02:40:20 UTC" <br>
*!* #DEFINE GDIplus_TYPELIB_AUTHOR "Dana Seaman"<br>
*!* #DEFINE GDIplus_TYPELIB_VERSION "1.05" <br>
*!* #DEFINE GDIplus_TYPELIB_COPYRIGHT "Copyright 2003, Dana Seaman" <br>
*!* #DEFINE GDIplus_TYPELIB_DESCRIPTION "Windows GDI+ Type Library" <br>
*!* #DEFINE GDIplus_TYPELIB_URL "</font><a href="http://www.cyberactivex.com/"><font face="Courier New">http://www.cyberactivex.com/</font></a><font face="Courier New">" </font>
</p>
<p>
<font face="Courier New">#DEFINE IPictureGUID "{7BF80980-BF32-101A-8BBB-00AA00300CAB}" </font>
</p>
<p>
<font face="Courier New">#DEFINE ImageFormatUndefined  "{B96B3CA9-0728-11D3-9D7B-0000F81EF32E}" <br>
#DEFINE ImageFormatMemoryBMP  "{B96B3CAA-0728-11D3-9D7B-0000F81EF32E}" <br>
#DEFINE ImageFormatBMP    "{B96B3CAB-0728-11D3-9D7B-0000F81EF32E}" <br>
#DEFINE ImageFormatEMF    "{B96B3CAC-0728-11D3-9D7B-0000F81EF32E}" <br>
#DEFINE ImageFormatWMF    "{B96B3CAD-0728-11D3-9D7B-0000F81EF32E}" <br>
#DEFINE ImageFormatJPEG    "{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}" <br>
#DEFINE ImageFormatPNG    "{B96B3CAF-0728-11D3-9D7B-0000F81EF32E}" <br>
#DEFINE ImageFormatGIF    "{B96B3CB0-0728-11D3-9D7B-0000F81EF32E}" <br>
#DEFINE ImageFormatTIFF    "{B96B3CB1-0728-11D3-9D7B-0000F81EF32E}" <br>
#DEFINE ImageFormatEXIF    "{B96B3CB2-0728-11D3-9D7B-0000F81EF32E}" <br>
#DEFINE ImageFormatIcon    "{B96B3CB5-0728-11D3-9D7B-0000F81EF32E}" </font>
</p>
<p>
<font face="Courier New">#DEFINE FrameDimensionTime   "{6AEDBD6D-3FB5-418A-83A6-7F45229DC872}" <br>
#DEFINE FrameDimensionResolution "{84236F7B-3BD3-428F-8DAB-4EA1439CA315}" <br>
#DEFINE FrameDimensionPage   "{7462DC86-6180-4C7E-8E3F-EE7333A7A483}" </font>
</p>
<p>
<font face="Courier New">#DEFINE FormatIDImageInformation "{E5836CBE-5EEF-0F1D-ACDE-AE4C43B608CE}" <br>
#DEFINE FormatIDJpegAppHeaders  "{1C4AFDCD-6177-43CF-ABC7-5F51AF39EE85}" </font>
</p>
<p>
<font face="Courier New">#DEFINE EncoderCompression  "{E09D739D-CCD4-44EE-8EBA-3FBF8BE4FC58}" <br>
#DEFINE EncoderColorDepth  "{66087055-AD66-4C7C-9A18-38A2310B8337}" <br>
#DEFINE EncoderScanMethod  "{3A4E2661-3109-4E56-8536-42C156E7DCFA}" <br>
#DEFINE EncoderVersion   "{24D18C76-814A-41A4-BF53-1C219CCCF797}" <br>
#DEFINE EncoderRenderMethod  "{6D42C53A-229A-4825-8BB7-5C99E2B9A8B8}" <br>
#DEFINE EncoderQuality   "{1D5BE4B5-FA4A-452D-9CDD-5DB35105E7EB}" <br>
#DEFINE EncoderTransformation "{8D0EB2D1-A58E-4EA8-AA14-108074B7B6F9}" <br>
#DEFINE EncoderLuminanceTable "{EDB33BCE-0266-4A77-B904-27216099E717}" <br>
#DEFINE EncoderChrominanceTable "{F2E455DC-09B3-4316-8260-676ADA32481C}" <br>
#DEFINE EncoderSaveFlag   "{292266FC-AC40-47BF-8CFC-A85B89A655DE}" </font>
</p>
<p>
<font face="Courier New">#DEFINE CodecIImageBytes  "{025D1823-6C7D-447B-BBDB-A3CBC3DFA2FC}" </font>
</p>
<p>
<font face="Courier New">#DEFINE DIB_RGB_COLORS 0 </font>
</p>
<p>
<font face="Courier New">#DEFINE PixelFormatIndexed    65536 <br>
#DEFINE PixelFormatGDI     131072 <br>
#DEFINE PixelFormatAlpha    262144 <br>
#DEFINE PixelFormatPAlpha    524288 <br>
#DEFINE PixelFormatExtended    1048576 <br>
#DEFINE PixelFormatCanonical   2097152 <br>
#DEFINE PixelFormatUndefined   0 <br>
#DEFINE PixelFormatDontCare    0 <br>
#DEFINE PixelFormat1bppIndexed   196865 <br>
#DEFINE PixelFormat4bppIndexed   197634 <br>
#DEFINE PixelFormat8bppIndexed   198659 <br>
#DEFINE PixelFormat16bppGrayScale  1052676 <br>
#DEFINE PixelFormat16bppRGB555   135173 <br>
#DEFINE PixelFormat16bppRGB565   135174 <br>
#DEFINE PixelFormat16bppARGB1555  397319 <br>
#DEFINE PixelFormat24bppRGB    137224 <br>
#DEFINE PixelFormat32bppRGB    139273 <br>
#DEFINE PixelFormat32bppARGB   2498570 <br>
#DEFINE PixelFormat32bppPARGB   925707 <br>
#DEFINE PixelFormat48bppRGB    1060876 <br>
#DEFINE PixelFormat64bppARGB   3424269 <br>
#DEFINE PixelFormat64bppPARGB   29622286 <br>
#DEFINE PixelFormatMax     15 </font>
</p>
<p>
<font face="Courier New">#DEFINE AlphaShift 24 <br>
#DEFINE RedShift 16 <br>
#DEFINE GreenShift 8 <br>
#DEFINE BlueShift 0 </font>
</p>
<p>
<font face="Courier New">#DEFINE AlphaMask -16777216 <br>
#DEFINE RedMask  16711680 <br>
#DEFINE GreenMask 65280 <br>
#DEFINE BlueMask 255 </font>
</p>
<p>
<font face="Courier New">#DEFINE FillModeAlternate 0 <br>
#DEFINE FillModeWinding  1 </font>
</p>
<p>
<font face="Courier New">#DEFINE QualityModeInvalid -1 <br>
#DEFINE QualityModeDefault 0 <br>
#DEFINE QualityModeLow  1 <br>
#DEFINE QualityModeHigh  2 </font>
</p>
<p>
<font face="Courier New">#DEFINE CompositingModeSourceOver 0 <br>
#DEFINE CompositingModeSourceCopy 1<br>
 <br>
#DEFINE CompositingQualityInvalid   -1 <br>
#DEFINE CompositingQualityDefault   0 <br>
#DEFINE CompositingQualityHighSpeed   1 <br>
#DEFINE CompositingQualityHighQuality  2 <br>
#DEFINE CompositingQualityGammaCorrected 3 <br>
#DEFINE CompositingQualityAssumeLinear  4 </font>
</p>
<p>
<font face="Courier New">#DEFINE UnitWorld  0 <br>
#DEFINE UnitDisplay  1 <br>
#DEFINE UnitPixel  2 <br>
#DEFINE UnitPoint  3 <br>
#DEFINE UnitInch  4 <br>
#DEFINE UnitDocument 5 <br>
#DEFINE UnitMillimeter 6 </font>
</p>
<p>
<font face="Courier New">#DEFINE MetafileFrameUnitPixel   2 <br>
#DEFINE MetafileFrameUnitPoint   3 <br>
#DEFINE MetafileFrameUnitInch   4 <br>
#DEFINE MetafileFrameUnitDocument  5 <br>
#DEFINE MetafileFrameUnitMillimeter  6 <br>
#DEFINE MetafileFrameUnitGdi   7 </font>
</p>
<p>
<font face="Courier New">#DEFINE CoordinateSpaceWorld 0 <br>
#DEFINE CoordinateSpacePage  1 <br>
#DEFINE CoordinateSpaceDevice 2 </font>
</p>
<p>
<font face="Courier New">#DEFINE WrapModeTile  0 <br>
#DEFINE WrapModeTileFlipX 1 <br>
#DEFINE WrapModeTileFlipy 2 <br>
#DEFINE WrapModeTileFlipXY 3 <br>
#DEFINE WrapModeClamp  4 </font>
</p>
<p>
<font face="Courier New">#DEFINE HatchStyleHorizontal    0 <br>
#DEFINE HatchStyleVertical     1 <br>
#DEFINE HatchStyleForwardDiagonal   2 <br>
#DEFINE HatchStyleBackwardDiagonal   3 <br>
#DEFINE HatchStyleCross      4 <br>
#DEFINE HatchStyleDiagonalCross    5 <br>
#DEFINE HatchStyle05Percent     6 <br>
#DEFINE HatchStyle10Percent     7 <br>
#DEFINE HatchStyle20Percent     8 <br>
#DEFINE HatchStyle25Percent     9 <br>
#DEFINE HatchStyle30Percent     10 <br>
#DEFINE HatchStyle40Percent     11 <br>
#DEFINE HatchStyle50Percent     12 <br>
#DEFINE HatchStyle60Percent     13 <br>
#DEFINE HatchStyle70Percent     14 <br>
#DEFINE HatchStyle75Percent     15 <br>
#DEFINE HatchStyle80Percent     16 <br>
#DEFINE HatchStyle90Percent     17 <br>
#DEFINE HatchStyleLightDownwardDiagonal  18 <br>
#DEFINE HatchStyleLightUpwardDiagonal  19 <br>
#DEFINE HatchStyleDarkDownwardDiagonal  20 <br>
#DEFINE HatchStyleDarkUpwardDiagonal  21 <br>
#DEFINE HatchStyleWideDownwardDiagonal  22 <br>
#DEFINE HatchStyleWideUpwardDiagonal  23 <br>
#DEFINE HatchStyleLightVertical    24 <br>
#DEFINE HatchStyleLightHorizontal   25 <br>
#DEFINE HatchStyleNarrowVertical   26 <br>
#DEFINE HatchStyleNarrowHorizontal   27 <br>
#DEFINE HatchStyleDarkVertical    28 <br>
#DEFINE HatchStyleDarkHorizontal   29 <br>
#DEFINE HatchStyleDashedDownwardDiagonal 30 <br>
#DEFINE HatchStyleDashedUpwardDiagonal  31 <br>
#DEFINE HatchStyleDashedHorizontal   32 <br>
#DEFINE HatchStyleDashedVertical   33 <br>
#DEFINE HatchStyleSmallConfetti    34 <br>
#DEFINE HatchStyleLargeConfetti    35 <br>
#DEFINE HatchStyleZigZag     36 <br>
#DEFINE HatchStyleWave      37 <br>
#DEFINE HatchStyleDiagonalBrick    38 <br>
#DEFINE HatchStyleHorizontalBrick   39 <br>
#DEFINE HatchStyleWeave      40 <br>
#DEFINE HatchStylePlaid      41 <br>
#DEFINE HatchStyleDivot      42 <br>
#DEFINE HatchStyleDottedGrid    43 <br>
#DEFINE HatchStyleDottedDiamond    44 <br>
#DEFINE HatchStyleShingle     45 <br>
#DEFINE HatchStyleTrellis     46 <br>
#DEFINE HatchStyleSphere     47 <br>
#DEFINE HatchStyleSmallGrid     48 <br>
#DEFINE HatchStyleSmallCheckerBoard   49 <br>
#DEFINE HatchStyleLargeCheckerBoard   50 <br>
#DEFINE HatchStyleOutlinedDiamond   51 <br>
#DEFINE HatchStyleSolidDiamond    52 <br>
#DEFINE HatchStyleTotal      53<br>
 <br>
#DEFINE HatchStyleLargeGrid 4<br>
#DEFINE HatchStyleMin  0 <br>
#DEFINE HatchStyleMax  52</font>
</p>
<p>
<font face="Courier New">#DEFINE DashStyleSolid   0 <br>
#DEFINE DashStyleDash   1 <br>
#DEFINE DashStyleDot   2 <br>
#DEFINE DashStyleDashDot  3 <br>
#DEFINE DashStyleDashDotDot  4 <br>
#DEFINE DashStyleCustom   5</font>
</p>
<p>
<font face="Courier New">#DEFINE DashCapFlat   0 <br>
#DEFINE DashCapRound  2 <br>
#DEFINE DashCapTriangle  3 </font>
</p>
<p>
<font face="Courier New">#DEFINE LineCapFlat    0 <br>
#DEFINE LineCapSquare   1 <br>
#DEFINE LineCapRound   2 <br>
#DEFINE LineCapTriangle   3 <br>
#DEFINE LineCapNoAnchor   16 <br>
#DEFINE LineCapSquareAnchor  17 <br>
#DEFINE LineCapRoundAnchor  18 <br>
#DEFINE LineCapDiamondAnchor 19 <br>
#DEFINE LineCapArrowAnchor  20 <br>
#DEFINE LineCapAnchorMask  240 <br>
#DEFINE LineCapCustom   255 </font>
</p>
<p>
<font face="Courier New">#DEFINE CustomLineCapTypeDefault   0 <br>
#DEFINE CustomLineCapTypeAdjustableArrow 1 </font>
</p>
<p>
<font face="Courier New">#DEFINE LineJoinMiter   0 <br>
#DEFINE LineJoinBevel   1 <br>
#DEFINE LineJoinRound   2 <br>
#DEFINE LineJoinMiterClipped 3 </font>
</p>
<p>
<font face="Courier New">#DEFINE PathPointTypeStart   0 <br>
#DEFINE PathPointTypeLine   1 <br>
#DEFINE PathPointTypeBezier   3 <br>
#DEFINE PathPointTypeBezier3  3 <br>
#DEFINE PathPointTypePathTypeMask 7 <br>
#DEFINE PathPointTypeDashMode  16 <br>
#DEFINE PathPointTypePathMarker  32 <br>
#DEFINE PathPointTypeCloseSubpath 128 </font>
</p>
<p>
<font face="Courier New">#DEFINE WarpModePerspective 0 <br>
#DEFINE WarpModeBilinear 1 </font>
</p>
<p>
<font face="Courier New">#DEFINE LinearGradientModeHorizontal  0 <br>
#DEFINE LinearGradientModeVertical   1 <br>
#DEFINE LinearGradientModeForwardDiagonal 2 <br>
#DEFINE LinearGradientModeBackwardDiagonal 3 </font>
</p>
<p>
<font face="Courier New">#DEFINE CombineModeReplace  0 <br>
#DEFINE CombineModeIntersect 1 <br>
#DEFINE CombineModeUnion  2 <br>
#DEFINE CombineModeXor   3 <br>
#DEFINE CombineModeExclude  4 <br>
#DEFINE CombineModeComplement 5 </font>
</p>
<p>
<font face="Courier New">#DEFINE ImageTypeUnknown 0 <br>
#DEFINE ImageTypeBitmap  1 <br>
#DEFINE ImageTypeMetafile 2 </font>
</p>
<p>
<font face="Courier New">#DEFINE InterpolationModeInvalid    -1 <br>
#DEFINE InterpolationModeDefault    0 <br>
#DEFINE InterpolationModeLowQuality    1 <br>
#DEFINE InterpolationModeHighQuality   2 <br>
#DEFINE InterpolationModeBilinear    3 <br>
#DEFINE InterpolationModeBicubic    4 <br>
#DEFINE InterpolationModeNearestNeighbor  5 <br>
#DEFINE InterpolationModeHighQualityBilinear 6 <br>
#DEFINE InterpolationModeHighQualityBicubic  7 </font>
</p>
<p>
<font face="Courier New">#DEFINE PenAlignmentCenter 0 <br>
#DEFINE PenAlignmentInset 1 </font>
</p>
<p>
<font face="Courier New">#DEFINE BrushTypeSolidColor  0 <br>
#DEFINE BrushTypeHatchFill  1 <br>
#DEFINE BrushTypeTextureFill 2 <br>
#DEFINE BrushTypePathGradient 3 <br>
#DEFINE BrushTypeLinearGradient 4 </font>
</p>
<p>
<font face="Courier New">#DEFINE PenTypeSolidColor  0 <br>
#DEFINE PenTypeHatchFill  1 <br>
#DEFINE PenTypeTextureFill  2 <br>
#DEFINE PenTypePathGradient  3 <br>
#DEFINE PenTypeLinearGradient 4 <br>
#DEFINE PenTypeUnknown   -1 </font>
</p>
<p>
<font face="Courier New">#DEFINE MatrixOrderPrepend 0 <br>
#DEFINE MatrixOrderAppend 1 </font>
</p>
<p>
<font face="Courier New">#DEFINE GenericFontFamilySerif  0 <br>
#DEFINE GenericFontFamilySansSerif 1 <br>
#DEFINE GenericFontFamilyMonospace 2 </font>
</p>
<p>
<font face="Courier New">#DEFINE FontStyleRegular 0 <br>
#DEFINE FontStyleBold  1 <br>
#DEFINE FontStyleItalic  2 <br>
#DEFINE FontStyleBoldItalic 3 <br>
#DEFINE FontStyleUnderline 4 <br>
#DEFINE FontStyleStrikeout 8 </font>
</p>
<p>
<font face="Courier New">#DEFINE SmoothingModeInvalid  -1 <br>
#DEFINE SmoothingModeDefault  0 <br>
#DEFINE SmoothingModeHighSpeed  1 <br>
#DEFINE SmoothingModeHighQuality 2 <br>
#DEFINE SmoothingModeNone   3 <br>
#DEFINE SmoothingModeAntiAlias  4 </font>
</p>
<p>
<font face="Courier New">#DEFINE PixelOffsetModeInvalid  -1 <br>
#DEFINE PixelOffsetModeDefault  0 <br>
#DEFINE PixelOffsetModeHighSpeed 1 <br>
#DEFINE PixelOffsetModeHighQuality 2 <br>
#DEFINE PixelOffsetModeNone   3 <br>
#DEFINE PixelOffsetModeHalf   4 </font>
</p>
<p>
<font face="Courier New">#DEFINE TextRenderingHintSystemDefault    0 <br>
#DEFINE TextRenderingHintSingleBitPerPixelGridFit 1 <br>
#DEFINE TextRenderingHintAntiAliasGridFit   3 <br>
#DEFINE TextRenderingHintClearTypeGridFit   5 </font>
</p>
<p>
<font face="Courier New">#DEFINE MetafileTypeInvalid   0 <br>
#DEFINE MetafileTypeWmf    1 <br>
#DEFINE MetafileTypeWmfPlaceable 2 <br>
#DEFINE MetafileTypeEmf    3 <br>
#DEFINE MetafileTypeEmfPlusOnly  4 <br>
#DEFINE MetafileTypeEmfPlusDual  5 </font>
</p>
<p>
<font face="Courier New">#DEFINE EmfTypeEmfOnly  3 <br>
#DEFINE EmfTypeEmfPlusOnly 4 <br>
#DEFINE EmfTypeEmfPlusDual 5 </font>
</p>
<p>
<font face="Courier New">#DEFINE ObjectTypeInvalid   0 <br>
#DEFINE ObjectTypeBrush    1 <br>
#DEFINE ObjectTypePen    2 <br>
#DEFINE ObjectTypePath    3 <br>
#DEFINE ObjectTypeRegion   4 <br>
#DEFINE ObjectTypeImage    5 <br>
#DEFINE ObjectTypeFont    6 <br>
#DEFINE ObjectTypeStringFormat  7 <br>
#DEFINE ObjectTypeImageAttributes 8 <br>
#DEFINE ObjectTypeCustomLineCap  9 </font>
</p>
<p>
<font face="Courier New">#DEFINE ObjectTypeMax 9 <br>
#DEFINE ObjectTypeMin 1 </font>
</p>
<p>
<font face="Courier New">#DEFINE StringFormatFlagsDirectionRightToLeft 1 <br>
#DEFINE StringFormatFlagsDirectionVertical  2 <br>
#DEFINE StringFormatFlagsNoFitBlackBox   4 <br>
#DEFINE StringFormatFlagsDisplayFormatControl 32 <br>
#DEFINE StringFormatFlagsNoFontFallback   1024 <br>
#DEFINE StringFormatFlagsMeasureTrailingSpaces 2048 <br>
#DEFINE StringFormatFlagsNoWrap     4096 <br>
#DEFINE StringFormatFlagsLineLimit    8192 <br>
#DEFINE StringFormatFlagsNoClip     16384 </font>
</p>
<p>
<font face="Courier New">#DEFINE StringTrimmingNone    0 <br>
#DEFINE StringTrimmingCharacter   1 <br>
#DEFINE StringTrimmingWord    2 <br>
#DEFINE StringTrimmingEllipsisCharacter 3 <br>
#DEFINE StringTrimmingEllipsisWord  4 <br>
#DEFINE StringTrimmingEllipsisPath  5 </font>
</p>
<p>
<font face="Courier New">#DEFINE StringDigitSubstituteUser   0 <br>
#DEFINE StringDigitSubstituteNone   1 <br>
#DEFINE StringDigitSubstituteNational  2 <br>
#DEFINE StringDigitSubstituteTraditional 3 </font>
</p>
<p>
<font face="Courier New">#DEFINE HotkeyPrefixNone 0 <br>
#DEFINE HotkeyPrefixShow 1 <br>
#DEFINE HotkeyPrefixHide 2 </font>
</p>
<p>
<font face="Courier New">#DEFINE StringAlignmentNear 0 <br>
#DEFINE StringAlignmentCenter 1 <br>
#DEFINE StringAlignmentFar  2 </font>
</p>
<p>
<font face="Courier New">#DEFINE DriverStringOptionsCmapLookup   1 <br>
#DEFINE DriverStringOptionsVertical    2 <br>
#DEFINE DriverStringOptionsRealizedAdvance  4 <br>
#DEFINE DriverStringOptionsLimitSubpixel  8 </font>
</p>
<p>
<font face="Courier New">#DEFINE FlushIntentionFlush 0 <br>
#DEFINE FlushIntentionSync 1 </font>
</p>
<p>
<font face="Courier New">#DEFINE EncoderParameterValueTypeByte   1 <br>
#DEFINE EncoderParameterValueTypeASCII   2 <br>
#DEFINE EncoderParameterValueTypeShort   3 <br>
#DEFINE EncoderParameterValueTypeLong   4 <br>
#DEFINE EncoderParameterValueTypeRational  5 <br>
#DEFINE EncoderParameterValueTypeLongRange  6 <br>
#DEFINE EncoderParameterValueTypeUndefined  7 <br>
#DEFINE EncoderParameterValueTypeRationalRange 8 </font>
</p>
<p>
<font face="Courier New">#DEFINE EncoderValueColorTypeCMYK    0 <br>
#DEFINE EncoderValueColorTypeYCCK    1 <br>
#DEFINE EncoderValueCompressionLZW    2 <br>
#DEFINE EncoderValueCompressionCCITT3   3 <br>
#DEFINE EncoderValueCompressionCCITT4   4 <br>
#DEFINE EncoderValueCompressionRle    5 <br>
#DEFINE EncoderValueCompressionNone    6 <br>
#DEFINE EncoderValueScanMethodInterlaced  7 <br>
#DEFINE EncoderValueScanMethodNonInterlaced  8 <br>
#DEFINE EncoderValueVersionGif87    9 <br>
#DEFINE EncoderValueVersionGif89    10 <br>
#DEFINE EncoderValueRenderProgressive   11 <br>
#DEFINE EncoderValueRenderNonProgressive  12 <br>
#DEFINE EncoderValueTransformRotate90   13 <br>
#DEFINE EncoderValueTransformRotate180   14 <br>
#DEFINE EncoderValueTransformRotate270   15 <br>
#DEFINE EncoderValueTransformFlipHorizontal  16 <br>
#DEFINE EncoderValueTransformFlipVertical  17 <br>
#DEFINE EncoderValueMultiFrame     18 <br>
#DEFINE EncoderValueLastFrame     19 <br>
#DEFINE EncoderValueFlush      20 <br>
#DEFINE EncoderValueFrameDimensionTime   21 <br>
#DEFINE EncoderValueFrameDimensionResolution 22 <br>
#DEFINE EncoderValueFrameDimensionPage   23 </font>
</p>
<p>
<font face="Courier New">#DEFINE EmfToWmfBitsFlagsDefault   0 <br>
#DEFINE EmfToWmfBitsFlagsEmbedEmf   1 <br>
#DEFINE EmfToWmfBitsFlagsIncludePlaceable 2 <br>
#DEFINE EmfToWmfBitsFlagsNoXORClip   4 </font>
</p>
<p>
<font face="Courier New">#DEFINE WmfRecordTypeSetBkColor    66049 <br>
#DEFINE WmfRecordTypeSetBkMode    65794 <br>
#DEFINE WmfRecordTypeSetMapMode    5795 <br>
#DEFINE WmfRecordTypeSetROP2    65796 <br>
#DEFINE WmfRecordTypeSetRelAbs    65797 <br>
#DEFINE WmfRecordTypeSetPolyFillMode  65798 <br>
#DEFINE WmfRecordTypeSetStretchBltMode  65799 <br>
#DEFINE WmfRecordTypeSetTextCharExtra  65800 <br>
#DEFINE WmfRecordTypeSetTextColor   66057 <br>
#DEFINE WmfRecordTypeSetTextJustification 66058 <br>
#DEFINE WmfRecordTypeSetWindowOrg   66059 <br>
#DEFINE WmfRecordTypeSetWindowExt   66060 <br>
#DEFINE WmfRecordTypeSetViewportOrg   6061 <br>
#DEFINE WmfRecordTypeSetViewportExt   66062 <br>
#DEFINE WmfRecordTypeOffsetWindowOrg  66063 <br>
#DEFINE WmfRecordTypeScaleWindowExt   6576 <br>
#DEFINE WmfRecordTypeOffsetViewportOrg  6065 <br>
#DEFINE WmfRecordTypeScaleViewportExt  66578 <br>
#DEFINE WmfRecordTypeLineTo     66067 <br>
#DEFINE WmfRecordTypeMoveTo     6068 <br>
#DEFINE WmfRecordTypeExcludeClipRect  66581 <br>
#DEFINE WmfRecordTypeIntersectClipRect  66582 <br>
#DEFINE WmfRecordTypeArc     67607 <br>
#DEFINE WmfRecordTypeEllipse    66584 <br>
#DEFINE WmfRecordTypeFloodFill    66585 <br>
#DEFINE WmfRecordTypePie     67610 <br>
#DEFINE WmfRecordTypeRectangle    66587 <br>
#DEFINE WmfRecordTypeRoundRect    67100 <br>
#DEFINE WmfRecordTypePatBlt     67101 <br>
#DEFINE WmfRecordTypeSaveDC     5566 <br>
#DEFINE WmfRecordTypeSetPixel    66591 <br>
#DEFINE WmfRecordTypeOffsetClipRgn   66080 <br>
#DEFINE WmfRecordTypeTextOut    66849 <br>
#DEFINE WmfRecordTypeBitBlt     67874 <br>
#DEFINE WmfRecordTypeStretchBlt    68387 <br>
#DEFINE WmfRecordTypePolygon    66340 <br>
#DEFINE WmfRecordTypePolyline    66341 <br>
#DEFINE WmfRecordTypeEscape     67110 <br>
#DEFINE WmfRecordTypeRestoreDC    65831 <br>
#DEFINE WmfRecordTypeFillRegion    66088 <br>
#DEFINE WmfRecordTypeFrameRegion   66601 <br>
#DEFINE WmfRecordTypeInvertRegion   65834 <br>
#DEFINE WmfRecordTypePaintRegion   65835 <br>
#DEFINE WmfRecordTypeSelectClipRegion  65836 <br>
#DEFINE WmfRecordTypeSelectObject   65837 <br>
#DEFINE WmfRecordTypeSetTextAlign   65838 <br>
#DEFINE WmfRecordTypeDrawText    67119 <br>
#DEFINE WmfRecordTypeChord     67632 <br>
#DEFINE WmfRecordTypeSetMapperFlags   6097 <br>
#DEFINE WmfRecordTypeExtTextOut    68146 <br>
#DEFINE WmfRecordTypeSetDIBToDev   68915 <br>
#DEFINE WmfRecordTypeSelectPalette   66100 <br>
#DEFINE WmfRecordTypeRealizePalette   65589 <br>
#DEFINE WmfRecordTypeAnimatePalette   66614 <br>
#DEFINE WmfRecordTypeSetPalEntries   65591 <br>
#DEFINE WmfRecordTypePolyPolygon   66872 <br>
#DEFINE WmfRecordTypeResizePalette   65849 <br>
#DEFINE WmfRecordTypeDIBBitBlt    67904 <br>
#DEFINE WmfRecordTypeDIBStretchBlt   68417 <br>
#DEFINE WmfRecordTypeDIBCreatePatternBrush 65858 <br>
#DEFINE WmfRecordTypeStretchDIB    69443 <br>
#DEFINE WmfRecordTypeExtFloodFill   66888 <br>
#DEFINE WmfRecordTypeSetLayout    65865 <br>
#DEFINE WmfRecordTypeResetDC    65868 <br>
#DEFINE WmfRecordTypeStartDoc    65869 <br>
#DEFINE WmfRecordTypeStartPage    65615 <br>
#DEFINE WmfRecordTypeEndPage    65616 <br>
#DEFINE WmfRecordTypeAbortDoc    65618 <br>
#DEFINE WmfRecordTypeEndDoc     65630 <br>
#DEFINE WmfRecordTypeDeleteObject   66032 <br>
#DEFINE WmfRecordTypeCreatePalette   65783 <br>
#DEFINE WmfRecordTypeCreateBrush   65784 <br>
#DEFINE WmfRecordTypeCreatePatternBrush  66041 <br>
#DEFINE WmfRecordTypeCreatePenIndirect  66298 <br>
#DEFINE WmfRecordTypeCreateFontIndirect  66299 <br>
#DEFINE WmfRecordTypeCreateBrushIndirect 66300 <br>
#DEFINE WmfRecordTypeCreateBitmapIndirect 66301 <br>
#DEFINE WmfRecordTypeCreateRegion   67327 </font>
</p>
<p>
<font face="Courier New">#DEFINE EmfRecordTypeHeader       1 <br>
#DEFINE EmfRecordTypePolyBezier      2 <br>
#DEFINE EmfRecordTypePolygon      3 <br>
#DEFINE EmfRecordTypePolyline      4 <br>
#DEFINE EmfRecordTypePolyBezierTo     5 <br>
#DEFINE EmfRecordTypePolyLineTo      6 <br>
#DEFINE EmfRecordTypePolyPolyline     7 <br>
#DEFINE EmfRecordTypePolyPolygon     8 <br>
#DEFINE EmfRecordTypeSetWindowExtEx     9 <br>
#DEFINE EmfRecordTypeSetWindowOrgEx     10 <br>
#DEFINE EmfRecordTypeSetViewportExtEx    11 <br>
#DEFINE EmfRecordTypeSetViewportOrgEx    12 <br>
#DEFINE EmfRecordTypeSetBrushOrgEx     13 <br>
#DEFINE EmfRecordTypeEOF       14 <br>
#DEFINE EmfRecordTypeSetPixelV      15 <br>
#DEFINE EmfRecordTypeSetMapperFlags     16 <br>
#DEFINE EmfRecordTypeSetMapMode      17 <br>
#DEFINE EmfRecordTypeSetBkMode      18 <br>
#DEFINE EmfRecordTypeSetPolyFillMode    19 <br>
#DEFINE EmfRecordTypeSetROP2      20 <br>
#DEFINE EmfRecordTypeSetStretchBltMode    21 <br>
#DEFINE EmfRecordTypeSetTextAlign     22 <br>
#DEFINE EmfRecordTypeSetColorAdjustment    23 <br>
#DEFINE EmfRecordTypeSetTextColor     24 <br>
#DEFINE EmfRecordTypeSetBkColor      25 <br>
#DEFINE EmfRecordTypeOffsetClipRgn     26 <br>
#DEFINE EmfRecordTypeMoveToEx      27 <br>
#DEFINE EmfRecordTypeSetMetaRgn      28 <br>
#DEFINE EmfRecordTypeExcludeClipRect    29 <br>
#DEFINE EmfRecordTypeIntersectClipRect    30 <br>
#DEFINE EmfRecordTypeScaleViewportExtEx    31 <br>
#DEFINE EmfRecordTypeScaleWindowExtEx    32 <br>
#DEFINE EmfRecordTypeSaveDC       33 <br>
#DEFINE EmfRecordTypeRestoreDC      34 <br>
#DEFINE EmfRecordTypeSetWorldTransform    35 <br>
#DEFINE EmfRecordTypeModifyWorldTransform   36 <br>
#DEFINE EmfRecordTypeSelectObject     37 <br>
#DEFINE EmfRecordTypeCreatePen      38 <br>
#DEFINE EmfRecordTypeCreateBrushIndirect   39 <br>
#DEFINE EmfRecordTypeDeleteObject     40 <br>
#DEFINE EmfRecordTypeAngleArc      41 <br>
#DEFINE EmfRecordTypeEllipse      42 <br>
#DEFINE EmfRecordTypeRectangle      43 <br>
#DEFINE EmfRecordTypeRoundRect      44 <br>
#DEFINE EmfRecordTypeArc       45 <br>
#DEFINE EmfRecordTypeChord       46 <br>
#DEFINE EmfRecordTypePie       47 <br>
#DEFINE EmfRecordTypeSelectPalette     48 <br>
#DEFINE EmfRecordTypeCreatePalette     49 <br>
#DEFINE EmfRecordTypeSetPaletteEntries    50 <br>
#DEFINE EmfRecordTypeResizePalette     51 <br>
#DEFINE EmfRecordTypeRealizePalette     52 <br>
#DEFINE EmfRecordTypeExtFloodFill     53 <br>
#DEFINE EmfRecordTypeLineTo       54 <br>
#DEFINE EmfRecordTypeArcTo       55 <br>
#DEFINE EmfRecordTypePolyDraw      56 <br>
#DEFINE EmfRecordTypeSetArcDirection    57 <br>
#DEFINE EmfRecordTypeSetMiterLimit     58 <br>
#DEFINE EmfRecordTypeBeginPath      59 <br>
#DEFINE EmfRecordTypeEndPath      60 <br>
#DEFINE EmfRecordTypeCloseFigure     61 <br>
#DEFINE EmfRecordTypeFillPath      62 <br>
#DEFINE EmfRecordTypeStrokeAndFillPath    63 <br>
#DEFINE EmfRecordTypeStrokePath      64 <br>
#DEFINE EmfRecordTypeFlattenPath     65 <br>
#DEFINE EmfRecordTypeWidenPath      66 <br>
#DEFINE EmfRecordTypeSelectClipPath     67 <br>
#DEFINE EmfRecordTypeAbortPath      68 <br>
#DEFINE EmfRecordTypeReserved_069     69 <br>
#DEFINE EmfRecordTypeGdiComment      70 <br>
#DEFINE EmfRecordTypeFillRgn      71 <br>
#DEFINE EmfRecordTypeFrameRgn      72 <br>
#DEFINE EmfRecordTypeInvertRgn      73 <br>
#DEFINE EmfRecordTypePaintRgn      74 <br>
#DEFINE EmfRecordTypeExtSelectClipRgn    75 <br>
#DEFINE EmfRecordTypeBitBlt       76 <br>
#DEFINE EmfRecordTypeStretchBlt      77 <br>
#DEFINE EmfRecordTypeMaskBlt      78 <br>
#DEFINE EmfRecordTypePlgBlt       79 <br>
#DEFINE EmfRecordTypeSetDIBitsToDevice    80 <br>
#DEFINE EmfRecordTypeStretchDIBits     81 <br>
#DEFINE EmfRecordTypeExtCreateFontIndirect   82 <br>
#DEFINE EmfRecordTypeExtTextOutA     83 <br>
#DEFINE EmfRecordTypeExtTextOutW     84 <br>
#DEFINE EmfRecordTypePolyBezier16     85 <br>
#DEFINE EmfRecordTypePolygon16      86 <br>
#DEFINE EmfRecordTypePolyline16      87 <br>
#DEFINE EmfRecordTypePolyBezierTo16     88 <br>
#DEFINE EmfRecordTypePolylineTo16     89 <br>
#DEFINE EmfRecordTypePolyPolyline16     90 <br>
#DEFINE EmfRecordTypePolyPolygon16     91 <br>
#DEFINE EmfRecordTypePolyDraw16      92 <br>
#DEFINE EmfRecordTypeCreateMonoBrush    93 <br>
#DEFINE EmfRecordTypeCreateDIBPatternBrushPt  94 <br>
#DEFINE EmfRecordTypeExtCreatePen     95 <br>
#DEFINE EmfRecordTypePolyTextOutA     96 <br>
#DEFINE EmfRecordTypePolyTextOutW     97 <br>
#DEFINE EmfRecordTypeSetICMMode      98 <br>
#DEFINE EmfRecordTypeCreateColorSpace    99 <br>
#DEFINE EmfRecordTypeSetColorSpace     100 <br>
#DEFINE EmfRecordTypeDeleteColorSpace    101 <br>
#DEFINE EmfRecordTypeGLSRecord      102 <br>
#DEFINE EmfRecordTypeGLSBoundedRecord    103 <br>
#DEFINE EmfRecordTypePixelFormat     104 <br>
#DEFINE EmfRecordTypeDrawEscape      105 <br>
#DEFINE EmfRecordTypeExtEscape      106 <br>
#DEFINE EmfRecordTypeStartDoc      107 <br>
#DEFINE EmfRecordTypeSmallTextOut     108 <br>
#DEFINE EmfRecordTypeForceUFIMapping    109 <br>
#DEFINE EmfRecordTypeNamedEscape     110 <br>
#DEFINE EmfRecordTypeColorCorrectPalette   111 <br>
#DEFINE EmfRecordTypeSetICMProfileA     112 <br>
#DEFINE EmfRecordTypeSetICMProfileW     113 <br>
#DEFINE EmfRecordTypeAlphaBlend      114 <br>
#DEFINE EmfRecordTypeSetLayout      115 <br>
#DEFINE EmfRecordTypeTransparentBlt     116 <br>
#DEFINE EmfRecordTypeReserved_117     117 <br>
#DEFINE EmfRecordTypeGradientFill     118 <br>
#DEFINE EmfRecordTypeSetLinkedUFIs     119 <br>
#DEFINE EmfRecordTypeSetTextJustification   120 <br>
#DEFINE EmfRecordTypeColorMatchToTargetW   121 <br>
#DEFINE EmfRecordTypeCreateColorSpaceW    122 <br>
#DEFINE EmfRecordTypeMax       122 <br>
#DEFINE EmfRecordTypeMin       1 <br>
#DEFINE EmfPlusRecordTypeInvalid     16384 <br>
#DEFINE EmfPlusRecordTypeHeader      16385 <br>
#DEFINE EmfPlusRecordTypeEndOfFile     16386 <br>
#DEFINE EmfPlusRecordTypeComment     16387 <br>
#DEFINE EmfPlusRecordTypeGetDC      16388 <br>
#DEFINE EmfPlusRecordTypeMultiFormatStart   16389 <br>
#DEFINE EmfPlusRecordTypeMultiFormatSection   16390 <br>
#DEFINE EmfPlusRecordTypeMultiFormatEnd    16391 <br>
#DEFINE EmfPlusRecordTypeObject      16392 <br>
#DEFINE EmfPlusRecordTypeClear      16393 <br>
#DEFINE EmfPlusRecordTypeFillRects     16394 <br>
#DEFINE EmfPlusRecordTypeDrawRects     16395 <br>
#DEFINE EmfPlusRecordTypeFillPolygon    16396 <br>
#DEFINE EmfPlusRecordTypeDrawLines     16397 <br>
#DEFINE EmfPlusRecordTypeFillEllipse    16398 <br>
#DEFINE EmfPlusRecordTypeDrawEllipse    16399 <br>
#DEFINE EmfPlusRecordTypeFillPie     16400 <br>
#DEFINE EmfPlusRecordTypeDrawPie     16401 <br>
#DEFINE EmfPlusRecordTypeDrawArc     16402 <br>
#DEFINE EmfPlusRecordTypeFillRegion     16403 <br>
#DEFINE EmfPlusRecordTypeFillPath     16404 <br>
#DEFINE EmfPlusRecordTypeDrawPath     16405 <br>
#DEFINE EmfPlusRecordTypeFillClosedCurve   16406 <br>
#DEFINE EmfPlusRecordTypeDrawClosedCurve   16407 <br>
#DEFINE EmfPlusRecordTypeDrawCurve     16408 <br>
#DEFINE EmfPlusRecordTypeDrawBeziers    16409 <br>
#DEFINE EmfPlusRecordTypeDrawImage     16410 <br>
#DEFINE EmfPlusRecordTypeDrawImagePoints   16411 <br>
#DEFINE EmfPlusRecordTypeDrawString     16412 <br>
#DEFINE EmfPlusRecordTypeSetRenderingOrigin   16413 <br>
#DEFINE EmfPlusRecordTypeSetAntiAliasMode   16414 <br>
#DEFINE EmfPlusRecordTypeSetTextRenderingHint  16415 <br>
#DEFINE EmfPlusRecordTypeSetTextContrast   16416 <br>
#DEFINE EmfPlusRecordTypeSetInterpolationMode  16417 <br>
#DEFINE EmfPlusRecordTypeSetPixelOffsetMode   16418 <br>
#DEFINE EmfPlusRecordTypeSetCompositingMode   16419 <br>
#DEFINE EmfPlusRecordTypeSetCompositingQuality  16420 <br>
#DEFINE EmfPlusRecordTypeSave      16421 <br>
#DEFINE EmfPlusRecordTypeRestore     16422 <br>
#DEFINE EmfPlusRecordTypeBeginContainer    16423 <br>
#DEFINE EmfPlusRecordTypeBeginContainerNoParams  16424 <br>
#DEFINE EmfPlusRecordTypeEndContainer    16425 <br>
#DEFINE EmfPlusRecordTypeSetWorldTransform   16426 <br>
#DEFINE EmfPlusRecordTypeResetWorldTransform  16427 <br>
#DEFINE EmfPlusRecordTypeMultiplyWorldTransform  16428 <br>
#DEFINE EmfPlusRecordTypeTranslateWorldTransform 16429 <br>
#DEFINE EmfPlusRecordTypeScaleWorldTransform  16430 <br>
#DEFINE EmfPlusRecordTypeRotateWorldTransform  16431 <br>
#DEFINE EmfPlusRecordTypeSetPageTransform   16432 <br>
#DEFINE EmfPlusRecordTypeResetClip     16433 <br>
#DEFINE EmfPlusRecordTypeSetClipRect    16434 <br>
#DEFINE EmfPlusRecordTypeSetClipPath    16435 <br>
#DEFINE EmfPlusRecordTypeSetClipRegion    16436 <br>
#DEFINE EmfPlusRecordTypeOffsetClip     16437 <br>
#DEFINE EmfPlusRecordTypeDrawDriverString   16438 <br>
#DEFINE EmfPlusRecordTotal       16439 <br>
#DEFINE EmfPlusRecordTypeMax      16438 <br>
#DEFINE EmfPlusRecordTypeMin      16385 </font>
</p>
<p>
<font face="Courier New">#DEFINE ImageCodecFlagsEncoder   1 <br>
#DEFINE ImageCodecFlagsDecoder   2 <br>
#DEFINE ImageCodecFlagsSupportBitmap 4 <br>
#DEFINE ImageCodecFlagsSupportVector 8 <br>
#DEFINE ImageCodecFlagsSeekableEncode 16 <br>
#DEFINE ImageCodecFlagsBlockingDecode 32 <br>
#DEFINE ImageCodecFlagsBuiltin   65536 <br>
#DEFINE ImageCodecFlagsSystem   131072 <br>
#DEFINE ImageCodecFlagsUser    262144</font>
</p>
<p>
<font face="Courier New">#DEFINE ImageLockModeRead   1 <br>
#DEFINE ImageLockModeWrite   2 <br>
#DEFINE ImageLockModeUserInputBuf 4<br>
 <br>
#DEFINE ImageFlagsNone    0 <br>
#DEFINE ImageFlagsScalable   1 <br>
#DEFINE ImageFlagsHasAlpha   2 <br>
#DEFINE ImageFlagsHasTranslucent 4 <br>
#DEFINE ImageFlagsPartiallyScalable 8 <br>
#DEFINE ImageFlagsColorSpaceRGB  16 <br>
#DEFINE ImageFlagsColorSpaceCMYK 32 <br>
#DEFINE ImageFlagsColorSpaceGRAY 64 <br>
#DEFINE ImageFlagsColorSpaceYCBCR 128 <br>
#DEFINE ImageFlagsColorSpaceYCCK 256 <br>
#DEFINE ImageFlagsHasRealDPI  4096 <br>
#DEFINE ImageFlagsHasRealPixelSize 8192 <br>
#DEFINE ImageFlagsReadOnly   65536 <br>
#DEFINE ImageFlagsCaching   131072 </font>
</p>
<p>
<font face="Courier New">#DEFINE RotateNoneFlipNone 0 <br>
#DEFINE Rotate90FlipNone 1 <br>
#DEFINE Rotate180FlipNone 2 <br>
#DEFINE Rotate270FlipNone 3 <br>
#DEFINE RotateNoneFlipX  4 <br>
#DEFINE Rotate90FlipX  5 <br>
#DEFINE Rotate180FlipX  6 <br>
#DEFINE Rotate270FlipX  7 </font>
</p>
<p>
<font face="Courier New">#DEFINE Rotate180FlipXY  0 <br>
#DEFINE Rotate270FlipXY  1 <br>
#DEFINE RotateNoneFlipXY 2 <br>
#DEFINE Rotate90FlipXY  3 <br>
#DEFINE Rotate180FlipY  4 <br>
#DEFINE Rotate270FlipY  5 <br>
#DEFINE RotateNoneFlipY  6 <br>
#DEFINE Rotate90FlipY  7 </font>
</p>
<p>
<font face="Courier New">#DEFINE PropertyTagTypeByte       1 <br>
#DEFINE PropertyTagTypeASCII      2 <br>
#DEFINE PropertyTagTypeShort      3 <br>
#DEFINE PropertyTagTypeLong       4 <br>
#DEFINE PropertyTagTypeRational      5 <br>
#DEFINE PropertyTagTypeUndefined     7 <br>
#DEFINE PropertyTagTypeSLONG      9 <br>
#DEFINE PropertyTagTypeSRational     10 <br>
#DEFINE PropertyTagExifIFD       34665 <br>
#DEFINE PropertyTagsIFD        34853 <br>
#DEFINE PropertyTagNewSubfileType     254 <br>
#DEFINE PropertyTagSubfileType      255 <br>
#DEFINE PropertyTagImageWidth      256 <br>
#DEFINE PropertyTagImageHeight      257 <br>
#DEFINE PropertyTagBitsPerSample     258 <br>
#DEFINE PropertyTagCompression      259 <br>
#DEFINE PropertyTagPhotometricInterp    262 <br>
#DEFINE PropertyTagThreshHolding     263 <br>
#DEFINE PropertyTagCellWidth      264 <br>
#DEFINE PropertyTagCellHeight      265 <br>
#DEFINE PropertyTagFillOrder      266 <br>
#DEFINE PropertyTagDocumentName      269 <br>
#DEFINE PropertyTagImageDescription     270 <br>
#DEFINE PropertyTagEquipMake      271 <br>
#DEFINE PropertyTagEquipModel      272 <br>
#DEFINE PropertyTagStripOffsets      273 <br>
#DEFINE PropertyTagOrientation      274 <br>
#DEFINE PropertyTagSamplesPerPixel     277 <br>
#DEFINE PropertyTagRowsPerStrip      278 <br>
#DEFINE PropertyTagStripBytesCount     279 <br>
#DEFINE PropertyTagMinSampleValue     280 <br>
#DEFINE PropertyTagMaxSampleValue     281 <br>
#DEFINE PropertyTagXResolution      282 <br>
#DEFINE PropertyTagYResolution      283 <br>
#DEFINE PropertyTagPlanarConfig      284 <br>
#DEFINE PropertyTagPageName       285 <br>
#DEFINE PropertyTagXPosition      286 <br>
#DEFINE PropertyTagYPosition      287 <br>
#DEFINE PropertyTagFreeOffset      288 <br>
#DEFINE PropertyTagFreeByteCounts     289 <br>
#DEFINE PropertyTagGrayResponseUnit     290 <br>
#DEFINE PropertyTagGrayResponseCurve    291 <br>
#DEFINE PropertyTagT4Option       292 <br>
#DEFINE PropertyTagT6Option       293 <br>
#DEFINE PropertyTagResolutionUnit     296 <br>
#DEFINE PropertyTagPageNumber      297 <br>
#DEFINE PropertyTagTransferFuncition    301 <br>
#DEFINE PropertyTagSoftwareUsed      305 <br>
#DEFINE PropertyTagDateTime       306 <br>
#DEFINE PropertyTagArtist       315 <br>
#DEFINE PropertyTagHostComputer      316 <br>
#DEFINE PropertyTagPredictor      317 <br>
#DEFINE PropertyTagWhitePoint      318 <br>
#DEFINE PropertyTagPrimaryChromaticities   319 <br>
#DEFINE PropertyTagColorMap       320 <br>
#DEFINE PropertyTagHalftoneHints     321 <br>
#DEFINE PropertyTagTileWidth      322 <br>
#DEFINE PropertyTagTileLength      323 <br>
#DEFINE PropertyTagTileOffset      324 <br>
#DEFINE PropertyTagTileByteCounts     325 <br>
#DEFINE PropertyTagInkSet       332 <br>
#DEFINE PropertyTagInkNames       333 <br>
#DEFINE PropertyTagNumberOfInks      334 <br>
#DEFINE PropertyTagDotRange&nbs

Collapse -

Email and VFP: Part 1i (EsSmtp)

by craig In reply to The SPS Weblog

<p>
As we've seen in the previous entries, emailing from VFP can be done in a variety
of ways.  In this entry, I explore the use of a freely avaliable ActiveX control,
simply known as EsSmtp.  This control was once sold commercially by <a href="http://www.eurosource.se/">Eurosource</a>,
but now resides on <a href="http://sourceforge.net/projects/activex/">SourceForge</a>. 
It's not only free, it's open source (you get the source code). There's quite a few
controls available, but the only one I am currently familiar with is EsSmtp.
</p>
<p>
You'll need to download and register this control in order for this example to work. 
You can <a href="http://sourceforge.net/project/showfiles.php?group_id=47048">Download
it here</a>.  And, additional information about the properties and methods of
the control can be <a href="http://activex.sourceforge.net/essmtp.html">found here</a>.
</p>
<p>
Okay, without taking up anymore precious time, here's the code.
</p>
<p>
<table cellspacing=5 cellpadding=5 width="90%" align=center border=1>
<tbody>
<tr>
<td>
<p>
<font face="Courier New" size=2>*******************************<br>
*!* Example of using SendViaEsSmtp<br>
*******************************<br>
DIMENSION aryAttach(2)<br>
aryAttach(1) = "C:\attachment1.txt" && change to an actual file that exists
on your computer<br>
aryAttach(2) = "C:\attachment2.zip" && change to an actual file that exists
on your computer</font>
</p>
<p>
<font face="Courier New" size=2>LOCAL lcFromName, lcFromAddress, lcTo, lcSubject,
lcBody, lcCC, lcBCC, lcSMTPServer, lcErrReturn</font>
</p>
<p>
<font face="Courier New" size=2>lcFromName = "My Name"<br>
lcFromAddress = "</font><a href="mailto:me@myhost.com"><font face="Courier New" size=2>me@myhost.com</font></a><font face="Courier New" size=2>"<br>
lcTo = "</font><a href="mailto:someone@theirhost.com"><font face="Courier New" size=2>someone@theirhost.com</font></a><font face="Courier New" size=2>"<br>
lcSubject = "Hey Have You Tried VFP Email?"<br>
lcBody = "Just wanted to let you know that VFP is pretty versatile and has a lot of
ways to send email."<br>
lcCC = "</font><a href="mailto:someoneelse@someotherhost.com"><font face="Courier New" size=2>someoneelse@someotherhost.com</font></a><font face="Courier New" size=2>"<br>
lcBCC = "</font><a href="mailto:myboss@bosshost.com"><font face="Courier New" size=2>myboss@bosshost.com</font></a><font face="Courier New" size=2>"<br>
lcSMTPServer = "mail.myhost.com"</font>
</p>
<p>
<font face="Courier New" size=2>SendViaEsSmtp(@lcErrReturn, lcFromName, lcFromAddress,
lcTo, lcSubject, lcBody, @aryAttach, lcCC, lcBCC, lcSMTPServer)</font>
</p>
<p>
<font face="Courier New" size=2>IF EMPTY(lcErrReturn)<br>
 MESSAGEBOX("'" + lcSubject + "' sent successfullly.", 64, "Send email via EsSmtp")<br>
ELSE<br>
 MESSAGEBOX("'" + lcSubject + "' failed to be sent.  Reason:" + CHR(13)
+ lcErrReturn, 64, "Send email via EsSmtp")<br>
ENDIF</font>
</p>
<p>
<font face="Courier New" size=2>*******************************************<br>
PROCEDURE SendViaEsSmtp(tcReturn, tcFromName, tcFromAddress, tcTo, tcSubject, tcBody,
taFiles, tcCC, tcBCC, tcSMTPSever)<br>
*******************************************<br>
 LOCAL loEsSmtp, lnCountAttachments, lnErrorNo<br>
 TRY<br>
  loEsSmtp = CREATEOBJECT("ESSMTP.EsSmtpCtrl.1")<br>
  WITH loEsSmtp<br>
   IF TYPE("tcSMTPSever") = "C"<br>
    .SMTPServer = tcSMTPSever<br>
   ENDIF   <br>
   IF TYPE("tcFromName") = "C"<br>
    .SourceName = tcFromName<br>
   ENDIF<br>
   IF TYPE("tcFromAddress") = "C"<br>
    .SourceAddress = tcFromAddress<br>
   ENDIF<br>
   .DestinationAddress = tcTo<br>
   IF TYPE("tcCC") = "C"<br>
    .CCDestinationAddress = tcCC<br>
   ENDIF<br>
   IF TYPE("tcBCC") = "C"<br>
    .BCCDestinationAddress = tcBCC<br>
   ENDIF<br>
   .Subject = tcSubject<br>
   .MailData = tcBody<br>
   IF TYPE("taFiles", 1) = "A"<br>
    FOR lnCountAttachments = 1 TO ALEN(taFiles)<br>
     .AddAttachment(taFiles(lnCountAttachments), 0) &&
0 signifies base64 encoding when needed<br>
    ENDFOR<br>
   ENDIF<br>
   IF .SendMail() != 1 && there was a problem<br>
    lnErrorNo = .ErrorNo<br>
    DO CASE<br>
     CASE lnErrorNo = 421<br>
      THROW "Service not available, closing transmission
channel"<br>
     CASE lnErrorNo = 450<br>
      THROW "Requested mail action not taken: mailbox
unavailable [E.g., mailbox busy]"<br>
     CASE lnErrorNo = 451<br>
      THROW "Requested action aborted: local error in
processing"<br>
     CASE lnErrorNo = 452<br>
      THROW "Requested action not taken: insufficient
system storage"<br>
     CASE lnErrorNo = 500<br>
      THROW "Syntax error, command unrecognized [This
may include errors such as command line too long]"<br>
     CASE lnErrorNo = 501<br>
      THROW "Syntax error in parameters or arguments"<br>
     CASE lnErrorNo = 502<br>
      THROW "Command not implemented"<br>
     CASE lnErrorNo = 503<br>
      THROW "Bad sequence of commands"<br>
     CASE lnErrorNo = 504<br>
      THROW "Command parameter not implemented"<br>
     CASE lnErrorNo = 550<br>
      THROW "Requested action not taken: mailbox unavailable
[E.g., mailbox not found, no access]"<br>
     CASE lnErrorNo = 552<br>
      THROW "Requested mail action aborted: exceeded
storage allocation"<br>
     CASE lnErrorNo = 553<br>
      THROW "Requested action not taken: mailbox name
not allowed [E.g., mailbox syntax incorrect]"<br>
     CASE lnErrorNo = 554<br>
      THROW "Transaction failed"<br>
     OTHERWISE<br>
      THROW "Unknown Error - Might be WinSock Related"<br>
     ENDCASE<br>
   ENDIF<br>
  ENDWITH</font>
</p>
<p>
<font face="Courier New" size=2> CATCH TO loError<br>
  tcReturn = [Error: ] + STR(loError.ERRORNO) + CHR(13) + ;<br>
   [LineNo: ] + STR(loError.LINENO) + CHR(13) + ;<br>
   [Message: ] + loError.MESSAGE + CHR(13) + ;<br>
   [Procedure: ] + loError.PROCEDURE + CHR(13) + ;<br>
   [Details: ] + loError.DETAILS + CHR(13) + ;<br>
   [StackLevel: ] + STR(loError.STACKLEVEL) + CHR(13) + ;<br>
   [LineContents: ] + loError.LINECONTENTS<br>
 FINALLY<br>
  RELEASE loEsSmtp<br>
  loEsSmtp = .NULL.<br>
 ENDTRY<br>
ENDPROC</font>
</p>
</td>
</tr>
</tbody>
</table>
</p>
<br>
<hr>
This weblog is sponsored by <a href="http://www.sweetpotatosoftware.com">SweetPotato
Software, Inc.</a><p><div class="blogdisclaim"><a href="http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,def9a19f-04ab-46ff-8421-f700822f1773.aspx">This post originally appeared on an external website</a></div>

Collapse -

RSS 2.0 and VFP

by craig In reply to The SPS Weblog

<p>
<font face=Arial>Ken Levy mentioned out on the UT yesterday that it would be a cool
VFP open source project to create a table that RSS could be imported into and the
exported out of. I thought it was an excellent idea. So, I played around with
RSS 2.0 last night. After more than a little reading on the specifications for RSS
2.0, and some trial and error, I was able to create a workable XML schema (XSD) for
RSS 2.0. When I say workable, I mean I wanted it to work with VFP's XMLAdapter
class. I'll be working on the other RSS schemas as time permits.</font>
</p>
<p>
<font face=Arial>Below is a runnable example using the new schema and pulling RSS
2.0 sample content from:<br>
<u><a href="http://media-cyber.law.harvard.edu/blogs/gems/tech/rss2sample.xml">http://media-cyber.law.harvard.edu/blogs/gems/tech/rss2sample.xml</a></u></font>
</p>
<p>
<font face=Arial>It's a lot of code, but most of it is the XML schema, and that could
be placed in a file to be used as the XMLAdapter's schema. I just wanted to provide
an example here that runs right out of the box with a copy of VFP 9 and an internet
connetction. Have fun! (I'll quit getting side-tracked and get back to Emal and VFP
shortly)</font>
</p>
<p>
<table cellspacing=5 cellpadding=5 width="90%" align=center border=1>
<tbody>
<tr>
<td>
<p>
<font face="Courier New" size=2>LOCAL loXMLAdapter, loBrowser, lcXSD, lcRSSContent,
lcXMLHeader, lcXMLFooter</font>
</p>
<p>
<font face="Courier New" size=2>lcXMLHeader = GetHeader()<br>
lcXSD = VFPRSS2Schema()<br>
lcRSSContent = RetrieveRSS("</font><a href="http://media-cyber.law.harvard.edu/blogs/gems/tech/rss2sample.xml"><font face="Courier New" size=2>http://media-cyber.law.harvard.edu/blogs/gems/tech/rss2sample.xml</font></a><font face="Courier New" size=2>")<br>
lcXMLFooter = GetFooter()</font>
</p>
<p>
<font face="Courier New" size=2>oXMLAdapter = NEWOBJECT('XMLAdapter')<br>
oXMLAdapter.LOADXML(lcXMLHeader + lcXSD + lcRSSContent + lcXMLFooter)</font>
</p>
<p>
<font face="Courier New" size=2>CLOSE DATABASES ALL<br>
oXMLAdapter.TABLES(1).TOCURSOR && Cloud<br>
oXMLAdapter.TABLES(2).TOCURSOR && Image<br>
oXMLAdapter.TABLES(3).TOCURSOR && Textinput<br>
oXMLAdapter.TABLES(4).TOCURSOR && Enclosure<br>
oXMLAdapter.TABLES(5).TOCURSOR && Item<br>
oXMLAdapter.TABLES(6).TOCURSOR && Channel<br>
SET</font>
</p>
<p>
<font face="Courier New" size=2>*****************************<br>
FUNCTION GetHeader()<br>
*****************************<br>
 LOCAL lcHeader<br>
 TEXT TO lcHeader NOSHOW<br>
<?xml version="1.0" encoding="utf-8" ?><br>
<VFPDataSet><br>
 ENDTEXT<br>
 RETURN lcHeader<br>
ENDFUNC</font>
</p>
<p>
<font face="Courier New" size=2>*****************************<br>
FUNCTION GetFooter()<br>
*****************************<br>
 LOCAL lcFooter<br>
 TEXT TO lcFooter NOSHOW<br>
</VFPDataSet><br>
 ENDTEXT<br>
 RETURN lcFooter<br>
ENDFUNC</font>
</p>
<p>
<font face="Courier New" size=2>*****************************<br>
FUNCTION VFPRSS2Schema()<br>
*****************************<br>
 LOCAL lcXML<br>
 TEXT TO lcXML NOSHOW<br>
<xsd:schema id="VFPDataSet" xmlns:xsd="</font><a href="http://www.w3.org/2001/XMLSchema"><font face="Courier New" size=2>http://www.w3.org/2001/XMLSchema</font></a><font face="Courier New" size=2>"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"><br>
 <xsd:element name="VFPDataSet" msdata:IsDataSet="true"><br>
  <xsd:complexType><br>
   <xsd:choice maxOccurs="unbounded"><br>
   <xsd:element name="channel"><br>
    <xsd:complexType><br>
     <xsd:sequence><br>
      <xsd:element name="title" minOccurs="1" maxOccurs="1"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="link" minOccurs="1" maxOccurs="1"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="description" minOccurs="1"
maxOccurs="1"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="language" minOccurs="0"
maxOccurs="1"  default="en-us"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="copyright" minOccurs="0"
maxOccurs="1"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="managingEditor" minOccurs="0"
maxOccurs="1"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="webMaster" minOccurs="0"
maxOccurs="1"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="pubDate" minOccurs="0" maxOccurs="1"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="lastBuildDate" minOccurs="0"
maxOccurs="1"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="category" minOccurs="0"
maxOccurs="unbounded"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="generator" minOccurs="0"
maxOccurs="1"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="docs" default="</font><a href="http://blogs.law.harvard.edu/tech/rss"><font face="Courier New" size=2>http://blogs.law.harvard.edu/tech/rss</font></a><font face="Courier New" size=2>"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="cloud"><br>
       <xsd:complexType><br>
        <xsd:sequence><br>
         <xsd:element name="domain"
minOccurs="1" maxOccurs="1"><br>
           <xsd:simpleType><br>
            <xsd:restriction
base="xsd:string"><br>
            </xsd:restriction><br>
           </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="port"
minOccurs="1" maxOccurs="1"><br>
           <xsd:simpleType><br>
            <xsd:restriction
base="xsd:integer"><br>
            </xsd:restriction><br>
           </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="path"
minOccurs="1" maxOccurs="1"><br>
           <xsd:simpleType><br>
            <xsd:restriction
base="xsd:string"><br>
            </xsd:restriction><br>
           </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="registerProcedure"
minOccurs="1" maxOccurs="1"><br>
           <xsd:simpleType><br>
            <xsd:restriction
base="xsd:string"><br>
            </xsd:restriction><br>
           </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="protocol"
minOccurs="1" maxOccurs="1"><br>
           <xsd:simpleType><br>
            <xsd:restriction
base="xsd:string"><br>
            </xsd:restriction><br>
           </xsd:simpleType><br>
         </xsd:element><br>
        </xsd:sequence><br>
       </xsd:complexType><br>
      </xsd:element><br>
      <xsd:element name="ttl"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:integer"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="image"><br>
       <xsd:complexType><br>
        <xsd:sequence><br>
         <xsd:element name="url" minOccurs="1"
maxOccurs="1"><br>
           <xsd:simpleType><br>
            <xsd:restriction
base="xsd:anyURI"><br>
            </xsd:restriction><br>
           </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="title"
minOccurs="1" maxOccurs="1"><br>
           <xsd:simpleType><br>
            <xsd:restriction
base="xsd:string"><br>
            </xsd:restriction><br>
           </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="link"
minOccurs="1" maxOccurs="1"><br>
           <xsd:simpleType><br>
            <xsd:restriction
base="xsd:anyURI"><br>
            </xsd:restriction><br>
           </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="width"
default="88"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:decimal"><br>
            <xsd:maxInclusive
value="144"></xsd:maxInclusive><br>
            <xsd:minInclusive
value="0"></xsd:minInclusive><br>
            <xsd:fractionDigits
value="0"></xsd:fractionDigits><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="height"
default="31"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:decimal"><br>
            <xsd:maxInclusive
value="400"></xsd:maxInclusive><br>
            <xsd:minInclusive
value="0"></xsd:minInclusive><br>
            <xsd:fractionDigits
value="0"></xsd:fractionDigits><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="description"><br>
           <xsd:simpleType><br>
            <xsd:restriction
base="xsd:anyURI"><br>
            </xsd:restriction><br>
           </xsd:simpleType><br>
         </xsd:element><br>
        </xsd:sequence><br>
       </xsd:complexType><br>
      </xsd:element><br>
      <xsd:element name="rating"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="textInput"><br>
       <xsd:complexType><br>
        <xsd:sequence><br>
         <xsd:element name="title"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:string"><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="description"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:string"><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="name"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:string"><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="link"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:anyURI"><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
        </xsd:sequence><br>
       </xsd:complexType><br>
      </xsd:element><br>
      <xsd:element name="skipHours" minOccurs="0"
maxOccurs="24"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="skipDays" minOccurs="0"
maxOccurs="7"><br>
       <xsd:simpleType><br>
        <xsd:restriction base="xsd:string"><br>
        </xsd:restriction><br>
       </xsd:simpleType><br>
      </xsd:element><br>
      <xsd:element name="item"><br>
       <xsd:complexType><br>
        <xsd:sequence><br>
         <xsd:element name="title"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:string"><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="link"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:string"><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="description"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:string"><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="author"
minOccurs="0" maxOccurs="1"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:string"><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="category"
minOccurs="0" maxOccurs="unbounded"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:string"><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="comments"
minOccurs="0" maxOccurs="1"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:anyURI"><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="enclosure"><br>
          <xsd:complexType><br>
           <xsd:sequence><br>
            <xsd:element
name="url" minOccurs="1" maxOccurs="1"><br>
             <xsd:simpleType><br>
              <xsd:restriction
base="xsd:anyURI"><br>
              </xsd:restriction><br>
             </xsd:simpleType><br>
            </xsd:element><br>
            <xsd:element
name="length" minOccurs="1" maxOccurs="1"><br>
             <xsd:simpleType><br>
              <xsd:restriction
base="xsd:integer"><br>
              </xsd:restriction><br>
             </xsd:simpleType><br>
            </xsd:element><br>
            <xsd:element
name="type" minOccurs="1" maxOccurs="1"><br>
             <xsd:simpleType><br>
              <xsd:restriction
base="xsd:string"><br>
              </xsd:restriction><br>
             </xsd:simpleType><br>
            </xsd:element><br>
           </xsd:sequence><br>
          </xsd:complexType><br>
         </xsd:element><br>
         <xsd:element name="guid"
minOccurs="0" maxOccurs="1"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:string"><br>
           </xsd:restriction><br>
           <!--<br>
            <xsd:attribute
name="isPermaLink" type="xs:boolean" default="true"></xsd:attribute><br>
           --><br>
          </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="pubDate"
minOccurs="0" maxOccurs="1"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:string"><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
         <xsd:element name="source"
minOccurs="0" maxOccurs="1"><br>
          <xsd:simpleType><br>
           <xsd:restriction
base="xsd:string"><br>
           </xsd:restriction><br>
          </xsd:simpleType><br>
         </xsd:element><br>
        </xsd:sequence><br>
       </xsd:complexType><br>
      </xsd:element><br>
     </xsd:sequence><br>
    <xsd:attribute name="version" default="2.0"></xsd:attribute><br>
    </xsd:complexType><br>
   </xsd:element><br>
   </xsd:choice><br>
  </xsd:complexType><br>
 </xsd:element><br>
</xsd:schema><br>
 ENDTEXT<br>
 RETURN lcXML<br>
ENDFUNC</font>
</p>
<p>
<font face="Courier New" size=2>*****************************<br>
FUNCTION RetrieveRSS(tcURL)<br>
*****************************<br>
 #DEFINE INTERNET_OPEN_TYPE_PRECONFIG 0<br>
 #DEFINE SYNCHRONOUS 0<br>
 #DEFINE INTERNET_FLAG_RELOAD 2147483648</font>
</p>
<p>
<font face="Courier New" size=2> DECLARE INTEGER InternetOpen IN WININET STRING
Agent, ;<br>
  INTEGER AccessType, STRING ProxyName, ;<br>
  STRING ProxyBypass, INTEGER Flags</font>
</p>
<p>
<font face="Courier New" size=2> DECLARE INTEGER InternetOpenUrl IN WININET ;<br>
  INTEGER hInternetSession, STRING Url, STRING Header, ;<br>
  INTEGER HeaderLength, INTEGER Flags, INTEGER Context</font>
</p>
<p>
<font face="Courier New" size=2> DECLARE INTEGER InternetReadFile IN WININET
INTEGER file, ;<br>
  STRING @Buffer, INTEGER NumberOfBytesToRead, INTEGER @BytesRead</font>
</p>
<p>
<font face="Courier New" size=2> DECLARE SHORT InternetCloseHandle IN WININET
INTEGER hInst</font>
</p>
<p>
<font face="Courier New" size=2> LOCAL lcAgent, lhInternetSession, lhFile, llOK,
lnReturn, lcReadBuffer, lnBytesRead, lcRetVal</font>
</p>
<p>
<font face="Courier New" size=2> lcAgent = "VFP RSS 2.0 Reader"<br>
 lhInternetSession = InternetOpen(lcAgent, INTERNET_OPEN_TYPE_PRECONFIG, "",
"", SYNCHRONOUS)</font>
</p>
<p>
<font face="Courier New" size=2> IF lhInternetSession = 0<br>
  ? "Problem Encountered: Internet session cannot be established"<br>
 ELSE<br>
  lhFile = InternetOpenUrl( lhInternetSession, tcURL, '', 0, INTERNET_FLAG_RELOAD,
0)<br>
  IF lhFile = 0<br>
   ? "Problem Encountered: URL cannot be opened"<br>
  ELSE<br>
   lcRetVal = ""<br>
   llOK = .T.<br>
   <br>
   DO WHILE llOK<br>
    lcReadBuffer = SPACE(1500)<br>
    lnBytesRead = 0<br>
    lnReturn = InternetReadFile(lhFile, @lcReadBuffer, LEN(lcReadBuffer),
@lnBytesRead)<br>
    IF (lnBytesRead > 0)<br>
     lcRetVal = lcRetVal + LEFT(lcReadBuffer, lnBytesRead)<br>
    ENDIF<br>
    llOK = (lnReturn = 1 AND lnBytesRead > 0)<br>
   ENDDO<br>
   <br>
   InternetCloseHandle(lhFile)<br>
   InternetCloseHandle(lhInternetSession)<br>
   lcRetVal = SUBSTR(lcRetVal, ATC("<channel", lcRetVal))<br>
   <br>
   RETURN LEFT(lcRetVal, ATC("</channel>", lcRetVal) + 9)<br>
  ENDIF<br>
 ENDIF<br>
 RETURN ""<br>
ENDFUNC</font>
</p>
</td>
</tr>
</tbody>
</table>
</p>
UPDATES: Fixed malformed html in entry<br>
<hr>
This weblog is sponsored by <a href="http://www.sweetpotatosoftware.com">SweetPotato
Software, Inc.</a><p><div class="blogdisclaim"><a href="http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,611b18e5-9e33-4082-9cd2-326005c940db.aspx">This post originally appeared on an external website</a></div>

Collapse -

Visual Basic to Visual FoxPro Conversion Utility

by craig In reply to The SPS Weblog

<p>
Visual Basic (versions 6 and below) code examples are everywhere. It's a huge
resource that many Visual FoxPro developers utilize, but converting a Visual Basic
example to Visual FoxPro is, more often than not, a pain. It's the same thing over
and over again... change dims to locals, change msgbox to messagebox, add parenthesis
around the procedure calls, etc., etc., ad nauseam.
</p>
<p>
As a programmer who develops in Visual Basic as well as Visual FoxPro, I was
intrigued when, about a year ago on Tek-Tips, William GC Steinford offered the
idea of a Visual Basic to Visual FoxPro converter. I decided it was a great idea and
created my own. It is driven from a conversion table (of course), and handles most
of the basic things that need to be changed when porting Visual Basic code to Visual
FoxPro.
</p>
<p>
I've used it internally for awhile now, and it is a real time saver. Now, bear
in mind that I'm not putting on a code clinic with this thing (like I said, I was
just using it internally for some down and dirty conversions), but it's functional
and new vb to vfp syntax conversions can be added to the program just by adding records
in the conversion.dbf. There are a couple of extra fields in that table as well
that are reserved for future use (they will be used for such things as converting
API Declare statements properly and such - basically anything that can't be done in
one pass through the conversion.dbf or needs special handling).
</p>
<p>
If you add to the conversion table or the program, I would <strong>really appreciate
it</strong> if you would email me the changes. I would like to incorporate any useful
changes with my own, and continue to offer them back to the Visual FoxPro community.
Other than that, feel free to use it however or whenever you see fit.
</p>
<p>
A sample Visual Basic .BAS file has been included in the zip. When you run the vbtovfp.exe
just click the ellipsis button [...] and select the vbsample.bas file to open it in
the conversion utility. Here's a screen shot of vbtovfp and you can <a href="/files/vbtovfp.zip">download vbtovfp
here (source included)</a>.
</p>
<p>
Note: Originally written in VFP 7, but ported to VFP 9 - so, you will need VFP 9 to
run this (or take the time to take out the VFP 9-only features and recompile it in
whatever VFP you got). Also, there is selection/right-click functionality with the
editboxes you'll want to explore.
</p>
<p>
<img height=505 src="/SPSBlog/content/binary/vbtovfp.gif" width=540 border=0>
</p>
<br>
<hr>
This weblog is sponsored by <a href="http://www.sweetpotatosoftware.com">SweetPotato
Software, Inc.</a><p><div class="blogdisclaim"><a href="http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,453c9b02-e964-4311-850b-abcdcd84ddb3.aspx">This post originally appeared on an external website</a></div>

Back to After Hours Forum
94 total posts (Page 1 of 10)   01 | 02 | 03 | 04 | 05   Next

Related Discussions

Related Forums