topic
stringlengths
1
63
text
stringlengths
1
577k
diseños con Preview en tiempo de ejecucion
Lorenzo, Y no te animas a usar EasyReport ? Es gratis y puedes meterlo entero en tu aplicación. Para eso lo hemos comprado entre todos y lo hemos hecho libre <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
display animated gif
how to display animated gif in window/dialog ? I try the gif89 class and give me windows error 'general fault'
display animated gif
Hello I'm try ActiveX Gif component. If ok, I will publish it. Regards, Richard
display de precios
Compañeros, buenos días: ¿Alguien sabe como se controla y gestiona un display de precios, tipo supermercado, donde el cliente ve en tiempo real el precio de cada artículo y el importe total? Van conectados al puerto LPT1 o incluso al puerto USB del TPV. Entiendo que se controla mediante secuencia de ESC, tipo CHR ¿Algún pequeño ejemplo orientativo, por favor? Gracias. LORENZO.
display de precios
Hola Lorenzo, lo hacia de este modo, con un visor lcd conectado el puerto com1.. [code=fw:262sm95j]<div class="fw" id="{CB}" style="font-family: monospace;"><br />..<br />VisorLCD<span style="color: #000000;">&#40;</span>cProducto, cCosto<span style="color: #000000;">&#41;</span><br />..<br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------------</span><br /><span style="color: #00C800;">Function</span> VisorLCD<span style="color: #000000;">&#40;</span>vLinea1,vLinea2,vModo<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> cDcb, nBytes, vCade<br /><span style="color: #00C800;">local</span> nComm, nError, oComx, lVisorLcd, oPrn, cNumEst, vComx, cQCom<br /><span style="color: #00C800;">DEFAULT</span> vLinea1 := <span style="color: #ff0000;">"BIENVENIDOS A"</span><br /><span style="color: #00C800;">DEFAULT</span> vLinea2 := _DELEN3<span style="color: #000000;">&#40;</span>oApp:<span style="color: #000000;">cMaster</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">DEFAULT</span> vModo := <span style="color: #000000;">0</span><br /><br /><span style="color: #00C800;">Return</span> .f.<br /><br />vComx := <span style="color: #ff0000;">"COM1"</span><br />vCade := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br /><br />vLinea1 := <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span>vLinea1,<span style="color: #000000;">1</span>,<span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br />vLinea2 := <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span>vLinea2,<span style="color: #000000;">1</span>,<span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">If</span> <span style="color: #000000;">&#40;</span> nCOMM := OpenComm<span style="color: #000000;">&#40;</span>vComx,<span style="color: #000000;">1024</span>,<span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <> <span style="color: #000000;">0</span><br />&nbsp; <span style="color: #00C800;">Return</span> .f.<br /><span style="color: #00C800;">EndIf</span> &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//MsgAlert(vLinea1+CRLF+vLinea2,vComx)</span><br /><br />BuildCommDCB<span style="color: #000000;">&#40;</span>vComx+<span style="color: #ff0000;">":9600,n,8,1"</span>, @cDCB<span style="color: #000000;">&#41;</span><br />SetCommState<span style="color: #000000;">&#40;</span> @cDCB <span style="color: #000000;">&#41;</span><br />FlushComm<span style="color: #000000;">&#40;</span>nCOMM,<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />FlushComm<span style="color: #000000;">&#40;</span>nCOMM,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />WriteComm<span style="color: #000000;">&#40;</span>nComm,Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">// inicializar</span><br /><br />SysWait<span style="color: #000000;">&#40;</span>oApp:<span style="color: #000000;">nDelay</span><span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">// oApp:nDelay = 1</span><br /><br /><span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br /><br />&nbsp; <span style="color: #00C800;">CASE</span> vModo = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; WriteComm<span style="color: #000000;">&#40;</span>nComm,Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">27</span><span style="color: #000000;">&#41;</span>+Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">17</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">CASE</span> vModo = <span style="color: #000000;">1</span><br />&nbsp; &nbsp; WriteComm<span style="color: #000000;">&#40;</span>nComm,Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">27</span><span style="color: #000000;">&#41;</span>+Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">18</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">CASE</span> vModo = <span style="color: #000000;">2</span><br />&nbsp; &nbsp; WriteComm<span style="color: #000000;">&#40;</span>nComm,Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">27</span><span style="color: #000000;">&#41;</span>+Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">19</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCASE</span><br />SysWait<span style="color: #000000;">&#40;</span>oApp:<span style="color: #000000;">nDelay</span><span style="color: #000000;">&#41;</span><br /><br />WriteComm<span style="color: #000000;">&#40;</span>nComm,Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">27</span><span style="color: #000000;">&#41;</span>+Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">81</span><span style="color: #000000;">&#41;</span>+Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">65</span><span style="color: #000000;">&#41;</span>+vLinea1+Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />SysWait<span style="color: #000000;">&#40;</span>oApp:<span style="color: #000000;">nDelay</span><span style="color: #000000;">&#41;</span><br /><br />WriteComm<span style="color: #000000;">&#40;</span>nComm,Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">27</span><span style="color: #000000;">&#41;</span>+Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">81</span><span style="color: #000000;">&#41;</span>+Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">66</span><span style="color: #000000;">&#41;</span>+vLinea2+Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />SysWait<span style="color: #000000;">&#40;</span>oApp:<span style="color: #000000;">nDelay</span><span style="color: #000000;">&#41;</span><br /><br />CloseComm<span style="color: #000000;">&#40;</span>nCOMM <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> .t.<br /><br />&nbsp;</div>[/code:262sm95j]
display di una checkbox senza possibilità di modifica
Scusate la banalità, ma non riesco a trovare il modo di fare un display di una CHECKBOX in modalità non editabile, con classico background grigio che indica che il campo non è modificabile. Ho provato con :lupdate = .F. e altri, ma non cambia nulla... bisogna per forza impostare una clausola con l'ON CHANGE o ON CLICK ...?
display di una checkbox senza possibilità di modifica
[code=fw:r7o3mo5e]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">WHEN</span> .F.</div>[/code:r7o3mo5e] EMG
display of fonts used in browses
Hello Antonio, The last day I got some complaints about the sharpness of the fonts used in browses and on buttons. If you look carefully to the sharpness of the font in a browse it is not so sharp as the font in the menu or the statusbar. Is there anything I could do about this.[img:39ve0rcp]http&#58;//www&#46;plantenkennis&#46;com/FiveMac/BrowseScreen2&#46;png[/img:39ve0rcp] I have changed the image to show the problem. On the right there is a text editor I use, on the left the program. After reading a lot on the Apple developer site I saw that my program (and all programs made with FiveMac) are not made for the Retina screen. If you rightclick on an app and click on 'show info' you see that the app is forsed to use low resolution. [img:39ve0rcp]http&#58;//www&#46;plantenkennis&#46;com/FiveMac/LowResFiveMac&#46;png[/img:39ve0rcp]
display of fonts used in browses
Dear René, We are checking it
display of fonts used in browses
René, It seems as it is a Mojave issue: [url:1qvza08d]https&#58;//eshop&#46;macsales&#46;com/blog/46527-is-macos-mojave-making-some-fonts-blurry-heres-how-to-fix-it/[/url:1qvza08d] The solution would be to use a font that is standard to Mojave using method SetFont()
display of fonts used in browses
Hello Antonio, I don't think that the SetFont is the solution. I have tried several fonts in my browse, but it makes no difference. I als played with the smoothing option as mentioned on you link, but that also makes no difference. Check the images: No smoothing: [img:3tp2vfuq]http&#58;//www&#46;plantenkennis&#46;com/FiveMac/No_smoothing&#46;png[/img:3tp2vfuq] With smoothing: [img:3tp2vfuq]http&#58;//www&#46;plantenkennis&#46;com/FiveMac/Smoothing&#46;png[/img:3tp2vfuq] I still think there should be an option to compile on high resolution because all apps made with FiveMac are standard in Low resolution and you can't change the checkbox. [img:3tp2vfuq]http&#58;//www&#46;plantenkennis&#46;com/FiveMac/LowResFiveMac&#46;png[/img:3tp2vfuq]
display of fonts used in browses
Thanks to the work of Manuel we have the solution for the blurry fonts. In the app-folder there should be a file named Info.plist. When building an app with the build.sh command this file is added automatically. But this file needs the next lines: [code=fw:m5qhafwb]<div class="fw" id="{CB}" style="font-family: monospace;"><br />echo <span style="color: #ff0000;">'   <key>NSHighResolutionCapable</key>'</span> >> $<span style="color: #000000;">1</span>.app/Contents/Info.plist<br />   echo <span style="color: #ff0000;">'<true/>'</span> >> $<span style="color: #000000;">1</span>.app/Contents/Info.plist<br />   echo <span style="color: #ff0000;">' <key>NSPrincipalClass</key>'</span> >> $<span style="color: #000000;">1</span>.app/Contents/Info.plist<br />   echo <span style="color: #ff0000;">' <string>NSApplication</string>'</span> >> $<span style="color: #000000;">1</span>.app/Contents/Info.plist<br /> </div>[/code:m5qhafwb] When these lines are in the Info.plist file the user can (un)check if the program needs to be in lower resolution, needed for non-retina screens. However, if you build the app with a makefile, so when you have more than one .prg, the Info.plist file is not created. One can copy this file from another app and place it in the app-folder [appfolder/Contents]. After placing this file you need to rebuild your app (just throw away the .o files) and the program runs on Retina-screens with much smoother fonts.
display of fonts used in browses
great work! many thanks to both of you
display of fonts used in browses
Hello group, Thanks to a lot of great work from Manuel we now can also create the Info.plist with a makefile. And it looks that there are much more options that we can set in the Info.plist. Here is a copy of my makefile that is made by Manuel: [code=fw:2c5r1m79]<div class="fw" id="{CB}" style="font-family: monospace;"><br /># makefile <span style="color: #00C800;">for</span> Plantenkennis, sample <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech Software <span style="color: #000000;">2007</span><span style="color: #000000;">-2010</span><br /># Use TABs instead <span style="color: #0000ff;">of</span> spaces<br /># just type make <span style="color: #0000ff;">to</span> build it<br /><br />HRBLIBS= -lhbdebug -lhbvm -lhbrtl -lhblang -lhbrdd -lhbrtl -lgtstd -lgttrm -lhbvm -lhbmacro -lhbpp -lrddntx -lrddcdx -lrddfpt -lhbsix -lhbcommon -lhbcplr -lhbcpage -lhbhsx -lrddnsx<br />FRAMEWORKS= -framework Cocoa -framework WebKit -framework QTkit -framework Quartz  -framework ScriptingBridge  -framework iokit<br /><br />HARBOUR_PATH= ./../../harbour<br />HARBOUR= $<span style="color: #000000;">&#40;</span>HARBOUR_PATH<span style="color: #000000;">&#41;</span>/bin/harbour<br />HARBOUR_INCLUDE= $<span style="color: #000000;">&#40;</span>HARBOUR_PATH<span style="color: #000000;">&#41;</span>/include <br /><br />#FIVEMAC_PATH= ./../../fivemac/<br /><br />FIVEMAC_PATH= ./../<br /><br />CONT_PATH= ./Plantenkennis.app/Contents<br /><br />all : $<span style="color: #000000;">&#40;</span>CONT_PATH<span style="color: #000000;">&#41;</span>/MacOS/Plantenkennis<br />    $<span style="color: #000000;">&#40;</span>CONT_PATH<span style="color: #000000;">&#41;</span>/MacOS/Plantenkennis<br />    reset<br /> <br />PRG_OBJS = ./Plantenkennis.o  \<br />    ./Functies.o \<br />    ./GetFuncties.o   \<br />    ./CollectFuncties.o   \<br />    ./<span style="color: #0000ff;">Change</span>.o   \<br />    ./Selectie.o   \<br />    ./<span style="color: #00C800;">Print</span>.o   \<br />    ./ProFuncties.o   \<br />    ./UpdateProgram.o   \<br />    ./wildsearch.o   \<br />    ./TemplateDesign.o   \<br />    ./Geslacht.o   \<br />    <br />    <br />$<span style="color: #000000;">&#40;</span>CONT_PATH<span style="color: #000000;">&#41;</span>/MacOS/Plantenkennis : $<span style="color: #000000;">&#40;</span>PRG_OBJS<span style="color: #000000;">&#41;</span><br />    $<span style="color: #000000;">&#40;</span>call create_dirs<span style="color: #000000;">&#41;</span><br />    $<span style="color: #000000;">&#40;</span>call write_plist<span style="color: #000000;">&#41;</span><br />    gcc  $<span style="color: #000000;">&#40;</span>PRG_OBJS<span style="color: #000000;">&#41;</span> -o $<span style="color: #000000;">&#40;</span>CONT_PATH<span style="color: #000000;">&#41;</span>/MacOS/Plantenkennis  -L$<span style="color: #000000;">&#40;</span>FIVEMAC_PATH<span style="color: #000000;">&#41;</span>/lib -lfive -lfivec -L$<span style="color: #000000;">&#40;</span>HARBOUR_PATH<span style="color: #000000;">&#41;</span>/lib  $<span style="color: #000000;">&#40;</span>HRBLIBS<span style="color: #000000;">&#41;</span>  $<span style="color: #000000;">&#40;</span>FRAMEWORKS<span style="color: #000000;">&#41;</span> <br /><br /><br />./%.c : ./%.prg<br />    $<span style="color: #000000;">&#40;</span>HARBOUR<span style="color: #000000;">&#41;</span> $< -o./$@ -n -I$<span style="color: #000000;">&#40;</span>HARBOUR_PATH<span style="color: #000000;">&#41;</span>/include -I$<span style="color: #000000;">&#40;</span>FIVEMAC_PATH<span style="color: #000000;">&#41;</span>/include<br /><br />./%.o : ./%.c<br />    gcc -c -o $@  -I$<span style="color: #000000;">&#40;</span>HARBOUR_PATH<span style="color: #000000;">&#41;</span>/include $<<br /><br /><br /><span style="color: #0000ff;">define</span> write_plist<br />    <span style="color: #00C800;">if</span> <span style="color: #000000;">&#91;</span> ! -d Plantenkennis.app/Contents/Info.plist <span style="color: #000000;">&#93;</span>; then  \<br />    echo <span style="color: #ff0000;">'<?xml version="1.0" encoding="UTF-8"?>'</span> > Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">'</span> >>  Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'<plist version="1.0">'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'<dict>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <key>CFBundleExecutable</key>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <string>Plantenkennis</string>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <key>CFBundleName</key>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <string>Plantenkennis</string>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <key>CFBundleIdentifier</key>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <string>com.KSD.Plantenkennis</string>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <key>CFBundlePackageType</key>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <string>APPL</string>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <key>CFBundleInfoDictionaryVersion</key>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <string>6.0</string>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <key>CFBundleIconFile</key>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <string>plantenkennis.icns</string>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <key>NSPrincipalClass</key>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <string>NSApplication</string>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <key>NSHighResolutionCapable</key>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <true/>'</span> >>  Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <key>NSHumanReadableCopyright</key>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <string>Copyright © 2020 Koot Software Design. All rights reserved.</string>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <key>CFBundleShortVersionString</key>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <string>3.71</string>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <key>CFBundleSupportedPlatforms</key>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <array>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'     <string>MacOSX</string>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   </array>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <key>CFBundleVersion</key>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'   <string>1</string>'</span> >> Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'</dict>'</span> >>  Plantenkennis.app/Contents/Info.plist; \<br />    echo <span style="color: #ff0000;">'</plist>'</span> >> Plantenkennis.app/Contents/Info.plist;\<br />    fi <br />endef<br /><br /><span style="color: #0000ff;">define</span> create_dirs<br />    <span style="color: #00C800;">if</span> <span style="color: #000000;">&#91;</span> ! -d Plantenkennis.app <span style="color: #000000;">&#93;</span>; then mkdir Plantenkennis.app; fi<br />    <span style="color: #00C800;">if</span> <span style="color: #000000;">&#91;</span> ! -d Plantenkennis.app/Contents <span style="color: #000000;">&#93;</span>; then mkdir Plantenkennis.app/Contents; fi<br />    <span style="color: #00C800;">if</span> <span style="color: #000000;">&#91;</span> ! -d Plantenkennis.app/Contents/MacOS <span style="color: #000000;">&#93;</span>; then mkdir Plantenkennis.app/Contents/MacOS; fi   <br />    <span style="color: #00C800;">if</span> <span style="color: #000000;">&#91;</span> -d Plantenkennis.app/Contents/Info.plist <span style="color: #000000;">&#93;</span>; then rm Plantenkennis.app/Contents/Info.plist; fi<br />    <span style="color: #00C800;">if</span> <span style="color: #000000;">&#91;</span> ! -d Plantenkennis.app/Contents/MacOS <span style="color: #000000;">&#93;</span>; then mkdir Plantenkennis.app/Contents/MacOS; fi<br />    <span style="color: #00C800;">if</span> <span style="color: #000000;">&#91;</span> ! -d Plantenkennis.app/Contents/Resources <span style="color: #000000;">&#93;</span>; then mkdir Plantenkennis.app/Contents/Resources; \<br />    cp Plantenkennis.icns Plantenkennis.app/Contents/Resources/ ;\<br />    fi<br />endef<br /> </div>[/code:2c5r1m79]
disposable email accounts system / Cuentas de usar y tirar
Me estoy acostumbrando cada vez más a usar <!-- w --><a class="postlink" href="http://www.pookmail.com">www.pookmail.com</a><!-- w -->. Como allí explican "PookMail.com es un sistema de cuentas de correo de usar-y-tirar, que se puede utilizar para evitar tener que dar su cuenta de correo personal." Hay multitud de sitios en Internet en donde te piden una cuenta de email. Puedes inventar el nombre que quieras, sobre la marcha, y sin registrarte, y luego ir a <!-- w --><a class="postlink" href="http://www.pookmail.com">www.pookmail.com</a><!-- w --> y ver lo que te han enviado. Realmente práctico. I am getting used more and more to <!-- w --><a class="postlink" href="http://www.pookmail.com">www.pookmail.com</a><!-- w -->. As they explain "PookMail.com is a disposable email account system. Use PookMail.com to avoid giving your personal email address to suspicious websites." There are plenty of sites on Internet where your email is requested. You can invent the name that you want on the run, and without having to register at all, go to <!-- w --><a class="postlink" href="http://www.pookmail.com">www.pookmail.com</a><!-- w --> and review what they send you. Really usefull.
disposable email accounts system / Cuentas de usar y tirar
Another excellent one: <!-- w --><a class="postlink" href="http://www.mailinator.com">www.mailinator.com</a><!-- w --> <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
divide a text to array
if I have a string sample : Local cMessage:= "12345678901234567890123456789012345678901234567890123456789012345678901234567890" I wish insert into a array records 20 cr sample aadd( atextlinea,"12345678901234567890") for a sample if there are 21 cr on cmessage the atextlinea must be 1 but I not Know the len of the cmessage and I wish create the atextlinea array some can help me
divide a text to array
Hello Silvio.Falconi, Maybe I can help you. What do you mean with cr? Pieter
divide a text to array
Characters
divide a text to array
Oké, "but I not Know the len of the cmessage..." With LEN() you can calculated the length of a string Local cMessage:= "12345678901234567890123456789012345678901234567890123456789012345678901234567890" MsgInfo(LEN( cMessage ) ) //give 80 "for a sample if there are 21 cr on cmessage the atextlinea must be 1" I am not sure if I understand this. Does it mean that if cmessage has 21 characters, the length of atexlinea array has to be 1? With the 21th character from cmessage on the first position of array atextlinea? Pieter
divide a text to array
yes I know len function But U perhaps not understood what I wish. I explain you I have a string of n character (I not Know the Len of this string) I wish create a simply array with a string of 20 character each sample : aadd( atext,"12345678901234567890") aadd( atext,"12345678901234567890") aadd( atext,"12345678901234567890") the strings must be 20 charactes for a sample : I hace a string len( cstring) := 41 I must create 3 record ( 2 of 20 cr and 1 of 1 cr) but this one must be of 1 cr + space(19) allway 20 cr
divide a text to array
for a sample : if len(cMessage)==40 aadd(atext,Left( cmessage, 20 )) aadd(atext,right(cMessage,20)) else cTxt := Left( cmessage, 20 ) cTxt := cTxt + Space( 20 - Len( cTxt) endif but not run ok because I can have a big string
divide a text to array
[quote="Silvio.Falconi":3134cd72]yes I know len function But U perhaps not understood what I wish. I explain you I have a string of n character (I not Know the Len of this string) I wish create a simply array with a string of 20 character each sample : aadd( atext,"12345678901234567890") aadd( atext,"12345678901234567890") aadd( atext,"12345678901234567890") the strings must be 20 charactes for a sample : I hace a string len( cstring) := 41 I must create 3 record ( 2 of 20 cr and 1 of 1 cr) but this one must be of 1 cr + space(19) allway 20 cr[/quote:3134cd72] Creo que si cada vez que tomes los primeros 20 usas una VAR auxiliar donde vas restando los ya usados, esa VAR te controlara el tamaño restante, cuando te queden 21 el Len(VarAux) sera igual a 21, luego Len(Var_Aux) sera 1, luego creo podrias usar la funcion PAD para el relleno de espacios, es la idea que se me viene a mente...saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
divide a text to array
[code=fw:3tzrf80m]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aText:= Array<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">FOR</span> i:= <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> Len<span style="color: #000000;">&#40;</span> cMessage <span style="color: #000000;">&#41;</span> STEP <span style="color: #000000;">20</span><br />   aAdd<span style="color: #000000;">&#40;</span> aText, PadR<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> cMessage, i, <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Edited </span><br /><span style="color: #00C800;">NEXT</span><br /> </div>[/code:3tzrf80m]
divide a text to array
Yes, I was also doing something with substr(), the code Carlos Mora has send works almost, but if I run this code, I see that there still is a problem at the end. I will think about it further. Pieter
divide a text to array
[code=fw:14zd463o]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #00C800;">local</span> cMessage:= <span style="color: #ff0000;">"12345678901234567890123456789012345678901234567890123456789012345678901234567890"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> i,n<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aTextLinea &nbsp;:= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;cMessage &nbsp;:= PadR<span style="color: #000000;">&#40;</span> cMessage, <span style="color: #000000;">&#40;</span> n := Ceiling<span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> cMessage <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> n step <span style="color: #000000;">20</span><br />&nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span> aTextLinea, <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> cMessage, i, <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br />&nbsp;</div>[/code:14zd463o]
divide a text to array
[quote="pieter":26xjobei]Yes, I was also doing something with substr(), the code Carlos Mora has send works almost, but if I run this code, I see that there still is a problem at the end. I will think about it further. Pieter[/quote:26xjobei] IF last element with less than 20 chars, Justadd sth like [code=fw:26xjobei]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">If</span> Len<span style="color: #000000;">&#40;</span> aTail<span style="color: #000000;">&#40;</span> aText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">20</span><br />  aText<span style="color: #000000;">&#91;</span> Len<span style="color: #000000;">&#40;</span>aText<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span> := PadR<span style="color: #000000;">&#40;</span>   aText<span style="color: #000000;">&#91;</span> Len<span style="color: #000000;">&#40;</span>aText<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDIF</span></div>[/code:26xjobei] Or look at the EDITED source
divide a text to array
thanks to all ...I'm trying your samples
divide a text to array
Sorry, the code of Carlos seems to work now. (I don't know what happend before exactly). Pieter
divide a text to array
Code from Carlos (I only changed aText:= Array() to atext := { }) Local atext := { } Local cMessage:= "abcdefghijklmnopqrstuvwxyz1234567890abcdefg" MsgInfo(LEN( cMessage ) )// gives 43 FOR i:= 1 TO Len( cMessage ) STEP 20 aadd( aText, SubStr( cMessage, i, 20 ) ) NEXT MsgInfo(aText[1]) MsgInfo(aText[2]) MsgInfo(aText[3])
divide a text to array
OK IT RUN OK THANKS
dll
Necesito la siguiente biblioteca.ctrl3d.dll
dll
Aqui la tienes:<!-- m --><a class="postlink" href="http://www.mediafire.com/?sharekey=9755e60f704eab49ab1eab3e9fa335ca67dccf9515eb02b3">http://www.mediafire.com/?sharekey=9755 ... 9515eb02b3</a><!-- m -->
dll 16 bits a 32 bits.
Estoy pasando un programa inicialmente desarrollado en Clipper, con los recursos en una DLL. Para exportar los recursos a 32 bits, abro la dll con WorkShop, y le doy a 'Grabar como...' y elijo el tipo 'rc' Luego importo ese 'rc' a una dll de 32 bits, peeeeero... los dialogos se distorsionan, como si les hubiese cambiado la fuente, todos los controles quedan desplazados y, como uso un bitmap de fondo, todo se vé fatalmente horrible. Alguna sugerencia? Saludos, Carlos.
dll 16 bits a 32 bits.
Para más detalles, la distorsión es solo horizontal, reduciendo en 7/6 tanto las coordenadas como los anchos. Con un programita corregiré los RCs, pero me gustaría saber el porqué de la cuestión.
dll 16 bits a 32 bits.
Carlos, Windows no mantiene una total compatibilidad en las dimensiones de los diálogos al mostrarlos en 16 ó en 32 bits, como has comprobado. Puedes usar la claúsula RESIZE16 de FWH para que se vean un poco más parecidos: ACTIVATE DIALOG oDlg RESIZE16
dll 16 bits a 32 bits.
Antonio, sabía que lo había visto en algún lado y no recordaba donde. Gracias por la ayuda, de todas maneras prefiero rectificar el rc y la dll ya que el programa de 16 bits pasará a retiro en breve. Además en el editor de recursos se ve fatal! Cuando termine el programita lo paso para cuando alguien más tenga que corregir el mismo problema. Saludos, Carlos
dll 16 bits a 32 bits.
Carlos: Y si mejor le pegas el .RC directo al EXE ?, digo, por ahorrarte un archivo .DLL de mas, ¿ necesitas ese DLL para algo mas que recursos ?.
dll 16 bits a 32 bits.
Hola René, Gracias por la recomendación. El incluir los recursos en el exe no mejora la situación, las coordenadas horizontales siguen deformadas. La dll es un paquete de recursos bastante pesado, ya que incluye bitmaps de fondo de numerosos diálogos que en la dll ya estarían compilados y no tengo que esperar al linker que incluya los recursos en el exe cada vez que recompilo. Además es decisión ya adoptada hace bastante en el departamento que los recursos van en dlls, no ha dado mayores problemas y eventualmente tenemos aplicaciónes con sets de gráficas para diferentes resoluciones. Según la resolución el programa selecciona una u otra dll para mejorar la imagen. Un saludo, Carlos.
dll curl..
Hola Puede alguien pasarme las lib y dll y .ch que estan "funcionales" de curl? no para modulo web. no me esta funcionando siquiera la funcion: curl_global_init me tira errores [url=https&#58;//imageshack&#46;com/i/pnyGImghp:1fmugspr][img:1fmugspr]https&#58;//imagizer&#46;imageshack&#46;com/v2/xq90/923/yGImgh&#46;png[/img:1fmugspr][/url:1fmugspr]
dll curl..
Gustavo, Prueba con: [url:13c8si2v]https&#58;//aka&#46;ms/vs/16/release/vc_redist&#46;x86&#46;exe[/url:13c8si2v] Normalmente ese error se da por estar usando una versión "antigua" (no actualizada) de Microsoft, bien sea de Windows, Office, etc [url:13c8si2v]https&#58;//support&#46;microsoft&#46;com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0[/url:13c8si2v]
dll curl..
continua dando el mismo error
dll curl..
[url:2hawkuyf]https&#58;//github&#46;com/FiveTechSoft/FWH_tools/blob/master/msvcr120&#46;dll[/url:2hawkuyf]
dll hecha en .net
Hola necesito para un cliente realizar facturacion electronica, me ofrecieron una dll hecha en .net y yo queria saber si puedo trabajar con esa dll. Uso Harbour y fivewin. Gracias y slds!!
dll hecha en .net
Tienes el prototipo de las funciones que exporta la DLL ? (nombres de funciones, parametros que reciben y valores que devuelven) Se puede acceder a DLLs hechas en .NET usando un módulo intermedio que use InteropServices
dll hecha en .net
[quote="Antonio Linares":10vttqoz]Se puede acceder a DLLs hechas en .NET usando un módulo intermedio que use InteropServices[/quote:10vttqoz] ¿ Como se hace ? <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P -->
dmtwain 32 bit
Hi, all I was using dmtwain.dll 16bit for a long time, where can I find the 32 bit replacement, or similar solution? TIA Roberto Chiaiese
dmtwain 32 bit
Did you try Eztwain by Dosadi ? <!-- w --><a class="postlink" href="http://www.dosadi.com">www.dosadi.com</a><!-- w -->
dmtwain 32 bit
Thank you Marco, I'll try it tomorrow best regards Roberto
dmtwain 32 bit
Tomorrow is already here, yes, it works! Simple as changing the name of the dll in the source code... many thanks Roberto
dmtwain 32 bit
Dear Chiaiese, Do you try with Windows7? I've got problem, it cannot find any device but Windows XP is fine.
dmtwain 32 bit
Dutch, no, I tried only with WinXp. As soon as I can, I will test Win7 too best regards
doble buttonbar
Holas,se puede tener dos buttonbar en un window? saben como?saludosMarcelo
doble buttonbar
Marcelo,Revisa los ejemplos de las toolbars en especial el "fwh\samples\toolbar4.prg"Espero sea de ayuda Saludos desde Honduras <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
doble buttonbar
Gracias por responder, pero lo que yo deseo son 2 buttonbar no 2 toolbar,gracias de todos modossaludosMarcelo[quote="Blessed":36ptov82]Marcelo, Revisa los ejemplos de las toolbars en especial el "fwh\samples\toolbar4.prg" Espero sea de ayuda Saludos desde Honduras <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->[/quote:36ptov82]
doble buttonbar
Marcelo,La forma de hacerlo es crear un TPanel y luego crear las barras de botones como controles del panel (oTop y oBottom).Tienes un ejemplo en FWH\visual\source\visual.prg. Asi es como lo hacemos en el IDE:<!-- m --><a class="postlink" href="http://forums.fivetechsoft.com/viewtopic.php?p=68983#68983">http://forums.fivetechsoft.com/viewtopi ... 8983#68983</a><!-- m -->
doble buttonbar
Gracias Antonio[quote="Antonio Linares":2yyr2nsq]Marcelo, La forma de hacerlo es crear un TPanel y luego crear las barras de botones como controles del panel (oTop y oBottom). Tienes un ejemplo en FWH\visual\source\visual.prg. Asi es como lo hacemos en el IDE: <!-- m --><a class="postlink" href="http://forums.fivetechsoft.com/viewtopic.php?p=68983#68983">http://forums.fivetechsoft.com/viewtopi ... 8983#68983</a><!-- m -->[/quote:2yyr2nsq]
doble click en set message
Hola:Cuando se hace doble clic en la barra aparece en el título de la ventana una información sobre los recursos y el tiempo de ejecución. ¿Cómo se desactiva esto?.Muchas gracias
doble click en set message
[code:28x4hjn7] oDlg&#58;bRClicked = &#123; || MsgInfo&#40; OemToAnsi&#40; "BotÆo Direito " + CRLF+ ; "NÆo Est  Ativo" &#41;, ; &#40; OemToAnsi&#40; "Informa‡Æo " &#41; &#41; &#41; &#125; [/code:28x4hjn7]
doble click en set message
Hola:Me refiero a la siguiente barra: SET MESSAGE OF oWndMain ; TO OemToAnsi( cMainMsg ) ; CLOCK ; DATE ; KEYBOARD 2007¿Cómo puedo anular el doble click?.
doble click en set message
[quote="MOISES":32zmy2ht]Hola: Cuando se hace doble clic en la barra aparece en el título de la ventana una información sobre los recursos y el tiempo de ejecución. ¿Cómo se desactiva esto?. Muchas gracias[/quote:32zmy2ht]En la Classe TmsgBar haz este cambio, u omite totalment el METHODMETHOD LDblClick( nRow, nCol, nKeyFlags ) CLASS TMsgBar* if ::lInfoRes .or. ( ! ::lInfoRes .and. ::lCheckRes )* if ! ::lCheckRes* ::Cargo := ::oWnd:GetText()* endif* ::lCheckRes := ! ::lCheckRes* endifreturn Super:LDblClick( nRow, nCol, nKeyFlags )SaludosFrancisco J. Alegria P.
documentacion de funciones gdi+
Revisando en la wiki las funciones gdi+ veo que no estan documentadas pero ademas sus nombres no corresponden con las funciones que aparecen en la clase tgdiplus. Por otro lado las funciones que estan en tgdiplus ¿ en que archivo se encuentran de la api ? . He revisado los libs y tampoco aparecen ¿? . Sería bueno completar un poco mas la clase tgdiplus ... Saludos.
documentacion de funciones gdi+
Manuel, gdiplus.cpp (ojo que es C++) [code=fw:1gkwjqws]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// GdiPlus support (c) FiveTech Software</span><br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <gdiplus.h><br /><br />using namespace Gdiplus;<br /><br />GdiplusStartupInput gdiplusStartupInput;<br />ULONG_PTR&nbsp; &nbsp;gdiplusToken;<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNEWGRAPHICS <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> Graphics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HDC <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDELETEGRAPHICS <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;delete <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSHIGHQUALITY <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;graphics->SetSmoothingMode<span style="color: #000000;">&#40;</span> SmoothingModeHighQuality <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNORMALQUALITY <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;graphics->SetSmoothingMode<span style="color: #000000;">&#40;</span> SmoothingModeDefault <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNEWPEN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Color</span> clr = <span style="color: #0000ff;">Color</span><span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> Pen<span style="color: #000000;">&#40;</span> clr <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPENSIZE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;pen->SetWidth<span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPENSTYLE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;pen->SetLineCap<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> LineCap <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> LineCap <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> DashCap <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSALIGN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;pen->SetAlignment<span style="color: #000000;">&#40;</span>PenAlignmentInset<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNOALIGN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;pen->SetAlignment<span style="color: #000000;">&#40;</span>PenAlignmentCenter<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDELETEPEN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;delete <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNEWSOLIDBRUSH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Color</span> clr = <span style="color: #0000ff;">Color</span><span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> SolidBrush<span style="color: #000000;">&#40;</span> clr <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDELETEBRUSH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;delete <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Brush</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWLINE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>&nbsp; &nbsp;<span style="color: #B900B9;">// if pen-object</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;graphics->DrawLine<span style="color: #000000;">&#40;</span> pen, <span style="color: #000000;">&#40;</span> float <span style="color: #000000;">&#41;</span> hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, <br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> float <span style="color: #000000;">&#41;</span> hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> float <span style="color: #000000;">&#41;</span> hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>, <br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> float <span style="color: #000000;">&#41;</span> hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWRECT <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nWidth = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nHeight = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>&nbsp; &nbsp; <span style="color: #B900B9;">// if brush-object</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Brush</span> * <span style="color: #0000ff;">brush</span> = <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Brush</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp;graphics->FillRectangle<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">brush</span>, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>&nbsp; &nbsp; <span style="color: #B900B9;">//if pen-object</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp;graphics->DrawRectangle<span style="color: #000000;">&#40;</span> pen, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWELLIPSE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nWidth = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nHeight = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>&nbsp; &nbsp;<span style="color: #B900B9;">//if brush-object</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Brush</span> * <span style="color: #0000ff;">brush</span> = <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Brush</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; graphics->FillEllipse<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">brush</span>, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>&nbsp; &nbsp;<span style="color: #B900B9;">//if pen-object</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;&nbsp; &nbsp; graphics->DrawEllipse<span style="color: #000000;">&#40;</span> pen, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSSTARTUP <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;hb_retl<span style="color: #000000;">&#40;</span> GdiplusStartup<span style="color: #000000;">&#40;</span> &gdiplusToken, &gdiplusStartupInput, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSSHUTDOWN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;GdiplusShutdown<span style="color: #000000;">&#40;</span> gdiplusToken <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> SETPAGEUNIT2PIXEL <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;graphics->SetPageUnit<span style="color: #000000;">&#40;</span> UnitPixel <span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// Unit to Pixel</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span></div>[/code:1gkwjqws]
documentacion de funciones gdi+
Antonio . Mira en esta página las cosas que hacen en vb con gdi+ <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> . [url:1r2tf2bf]http&#58;//leandroascierto&#46;com/blog/category/graficos/[/url:1r2tf2bf] La cosa viene del borderlight para los gets , lo he realizado en gdi+ ,con el sistema que proponias de rectangulos cambiando de color y queda fino . Faltaria crear los rectangulos "roundrec" y guardar el fondo en un hbmp para recuperarlo cunado pierde el foco . Para los rectangulos con bordes redondeados necesitamos pintar curvas ( no lo tenemos aún ) y pintar el paths ( tampoco ) ....
documentacion de funciones gdi+
con : c:\bcc582\bin\bcc32 -P -c -O2 -Ic:\harbour\include -Ic:\bcc582\include gdipluss.cpp me da estos errores.... Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland gdipluss.cpp: Error E2209 c:\bcc582\include\gdiplus.h 21: Unable to open include file 'algorit hm' Error E2316 c:\bcc582\include\gdiplus.h 22: 'min' is not a member of 'std' Error E2272 c:\bcc582\include\gdiplus.h 22: Identifier expected Error E2316 c:\bcc582\include\gdiplus.h 23: 'max' is not a member of 'std' Error E2272 c:\bcc582\include\gdiplus.h 23: Identifier expected Error E2268 c:\bcc582\include\GdiplusTypes.h 459: Call to undefined function 'mi n' in function RectF::Intersect(RectF &,const RectF &,const RectF &) Error E2268 c:\bcc582\include\GdiplusTypes.h 461: Call to undefined function 'ma x' in function RectF::Intersect(RectF &,const RectF &,const RectF &) Error E2268 c:\bcc582\include\GdiplusTypes.h 483: Call to undefined function 'ma x' in function RectF::Union(RectF &,const RectF &,const RectF &) Error E2268 c:\bcc582\include\GdiplusTypes.h 484: Call to undefined function 'ma x' in function RectF::Union(RectF &,const RectF &,const RectF &) Error E2268 c:\bcc582\include\GdiplusTypes.h 485: Call to undefined function 'mi n' in function RectF::Union(RectF &,const RectF &,const RectF &) Error E2268 c:\bcc582\include\GdiplusTypes.h 486: Call to undefined function 'mi n' in function RectF::Union(RectF &,const RectF &,const RectF &) Error E2268 c:\bcc582\include\GdiplusTypes.h 647: Call to undefined function 'mi n' in function Rect::Intersect(Rect &,const Rect &,const Rect &) Error E2268 c:\bcc582\include\GdiplusTypes.h 648: Call to undefined function 'mi n' in function Rect::Intersect(Rect &,const Rect &,const Rect &) Error E2268 c:\bcc582\include\GdiplusTypes.h 649: Call to undefined function 'ma x' in function Rect::Intersect(Rect &,const Rect &,const Rect &) Error E2268 c:\bcc582\include\GdiplusTypes.h 650: Call to undefined function 'ma x' in function Rect::Intersect(Rect &,const Rect &,const Rect &) Error E2268 c:\bcc582\include\GdiplusTypes.h 671: Call to undefined function 'ma x' in function Rect::Union(Rect &,const Rect &,const Rect &) Error E2268 c:\bcc582\include\GdiplusTypes.h 672: Call to undefined function 'ma x' in function Rect::Union(Rect &,const Rect &,const Rect &) Error E2268 c:\bcc582\include\GdiplusTypes.h 673: Call to undefined function 'mi n' in function Rect::Union(Rect &,const Rect &,const Rect &) Error E2268 c:\bcc582\include\GdiplusTypes.h 674: Call to undefined function 'mi n' in function Rect::Union(Rect &,const Rect &,const Rect &) Warning W8004 gdipluss.cpp 150: 'pen' is assigned a value that is never used in function HB_FUN_GDIPLUSDRAWRECT() Warning W8004 gdipluss.cpp 174: 'pen' is assigned a value that is never used in function HB_FUN_GDIPLUSDRAWELLIPSE() *** 19 errors in Compile ***
documentacion de funciones gdi+
Manuel, Parece que no te localiza este fichero: c:\bcc582\include\dinkumware\algorithm Comprueba que lo tengas
documentacion de funciones gdi+
le he forzado el path al include que faltaba ... Compila con dos warnings... Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland gdipluss.cpp: Warning W8004 gdipluss.cpp 150: 'pen' is assigned a value that is never used in function HB_FUN_GDIPLUSDRAWRECT() Warning W8004 gdipluss.cpp 174: 'pen' is assigned a value that is never used in function HB_FUN_GDIPLUSDRAWELLIPSE() Antonio , ¿ has mirado el enlace <!-- m --><a class="postlink" href="http://leandroascierto.com/blog/category/graficos/">http://leandroascierto.com/blog/category/graficos/</a><!-- m --> ? . Tiene un codigo para cargar una imagen en un formato ( “BMP, DIB, JPG, JPEG, JPE, JFIF, GIF, PNG, TIF, TIFF, EMF, WMF, ICO, CUR”. ) y pasarla a otro usando gdi+ que es buenisima .. <!-- m --><a class="postlink" href="http://leandroascierto.com/blog/modulo-para-convertir-imagenes-de-un-formato-a-otro-gdi/">http://leandroascierto.com/blog/modulo- ... -otro-gdi/</a><!-- m -->
documentacion de funciones gdi+
He añadido algo de código al archivo gdiplus.cpp .... [code=fw:1ztlh3ao]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWARC <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />    Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />    Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />   <br />   float nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />   float nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />   float nWidth =  hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />   float nHeight = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />   float startAngle =  hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>;<br />   float sweepAngle = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">8</span> <span style="color: #000000;">&#41;</span>;<br />  <br />    graphics->DrawArc<span style="color: #000000;">&#40;</span> pen, nLeft, nTop, nWidth, nHeight, startAngle, sweepAngle<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span> <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSCREATEPATH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />      hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> GraphicsPath<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDELETEPATH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   delete <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPATHADDLINE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />     GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />     float nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />   float nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />   float nRight =  hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />   float nBottom = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />     <br />     graphicPath->AddLine<span style="color: #000000;">&#40;</span>  nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span> ;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWPATH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br /> Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /> Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br /> GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br /> <br /> graphics->DrawPath<span style="color: #000000;">&#40;</span> pen, graphicPath <span style="color: #000000;">&#41;</span>;<br /> <br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPENSETCLR <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />     Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />    <br />    <span style="color: #0000ff;">Color</span> clr = <span style="color: #0000ff;">Color</span><span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />     hb_retni<span style="color: #000000;">&#40;</span> pen->SetColor<span style="color: #000000;">&#40;</span> clr <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><br /> </div>[/code:1ztlh3ao] Para el archivo tgdiplus.prg .... [code=fw:1ztlh3ao]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">CLASS</span> Graphics<br />....<br /><br />&nbsp; <span style="color: #00C800;">METHOD</span> DrawArc<span style="color: #000000;">&#40;</span> oPen, nLeft, nTop, nWidth, nHight,startAngle, sweepAngle <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusDrawArc<span style="color: #000000;">&#40;</span> oPen:<span style="color: #000000;">hPen</span>, nLeft, nTop, nWidth, nHeight, startAngle, sweepAngle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawPath<span style="color: #000000;">&#40;</span> oPen, oPath <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusDrawPath<span style="color: #000000;">&#40;</span> oPen:<span style="color: #000000;">hPen</span>, oPath:<span style="color: #000000;">hPath</span> <span style="color: #000000;">&#41;</span><br /><br />.....<br /><br /><span style="color: #00C800;">CLASS</span> Pen<br />...<br />&nbsp;<span style="color: #00C800;">METHOD</span> SetColor<span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusPenSetClr<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPen</span>, nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// nuevo methodo clase pen</span><br /><br />.....<br /><br /><span style="color: #00C800;">CLASS</span> Path &nbsp; / nueva clase Path <br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; hPath<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddLINE <span style="color: #000000;">&#40;</span> nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusPathAddLine<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPath</span>, nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;DESTRUCTOR Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Path<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hPath</span> = GdiPlusCreatePath<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Path<br /><br />&nbsp; &nbsp;GdiPlusDeletePath<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPath</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hBrush</span> = <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br />&nbsp;</div>[/code:1ztlh3ao]
documentacion de funciones gdi+
Manuel, gracias por tu código <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Acabo de ver esa página. Mas que nada lo que nos interesaria seria poder prescindir de la DLL FreeLibrary.dll Eso sería fantástico para las aplicaciones FWH <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Por eso me interesa GDI+ en primer lugar. Lo intentamos ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
documentacion de funciones gdi+
Está en tu enlace (ese no lo habia visto aún). Solo tenemos que pasar ese código de Visual Basic a FWH !!! <!-- s:-D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":-D" title="Very Happy" /><!-- s:-D -->
documentacion de funciones gdi+
Tengo mas código gdi+ ... con esto ya coloco las imagenes en la ventana , incluyendo png transparentes . <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> También tiene código para grabar la imagen leída en cualquiera de los formatos soportados , por ahora tenemos TIF,GIF ,JPG,PNG ,BMP ...................... editado .................................... He cambiado la clase Image a gdiImage y cambiado el codigo para facilitar el añadir mas formatos de imagen facilmente . Tambien he añadido una función para convertir imagenes entre formatos ( entre los soportados). para gdiplus.cpp [code=fw:2t73bhby]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSCREATEIMAGEFROMFILE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />    <span style="color: #0000ff;">Image</span> * newImage =  <span style="color: #00C800;">new</span> <span style="color: #0000ff;">Image</span><span style="color: #000000;">&#40;</span>  <span style="color: #000000;">&#40;</span>LPCWSTR<span style="color: #000000;">&#41;</span> hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#41;</span>;  <br />  hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> newImage <span style="color: #000000;">&#41;</span>;<br /> <br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWIMAGE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />    int iParams = hb_pcount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />    <br />    Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />    <span style="color: #0000ff;">Image</span> * newImage = <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Image</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />  int nLeft ;<br />  int nTop ;<br />  int nWidth ;<br />  int nHeight;<br />      <br />   <span style="color: #00C800;">switch</span> <span style="color: #000000;">&#40;</span>iParams<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />    <br />    <span style="color: #00C800;">case</span> <span style="color: #000000;">4</span>:<br />      nLeft = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />      nTop = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />    <br />    graphics->DrawImage<span style="color: #000000;">&#40;</span> newImage, nLeft, nTop <span style="color: #000000;">&#41;</span>;<br />    <br />   <span style="color: #00C800;">case</span> <span style="color: #000000;">6</span>:<br />     nLeft = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />     nTop = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />     nWidth =  hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />     nHeight = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />     <br />    graphics->DrawImage<span style="color: #000000;">&#40;</span> newImage, nLeft, nTop,nWidth,nHeight<span style="color: #000000;">&#41;</span>;<br />   <br />  <span style="color: #000000;">&#125;</span><br />    <br />   <br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSIMAGESAVE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />  <span style="color: #0000ff;">Image</span> * newImage = <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Image</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />  CLSID cClsid ;<br />  LPWSTR file = <span style="color: #000000;">&#40;</span>LPWSTR<span style="color: #000000;">&#41;</span> hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>;<br />  LPWSTR identificador =  <span style="color: #000000;">&#40;</span>LPWSTR<span style="color: #000000;">&#41;</span> hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span>;<br />  CLSIDFromString<span style="color: #000000;">&#40;</span> identificador, &cClsid <span style="color: #000000;">&#41;</span> ;<br />   newImage->Save<span style="color: #000000;">&#40;</span> file , &cClsid, <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><br /> </div>[/code:2t73bhby] para tgdiplus (este codigo aún sin revisar ) : [code=fw:2t73bhby]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawImage<span style="color: #000000;">&#40;</span> oImage,nTop,nleft, nWidth, nHeight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Graphics<br /><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span>nWidth <span style="color: #000000;">&#41;</span> .or. Empty<span style="color: #000000;">&#40;</span> nHeight <span style="color: #000000;">&#41;</span> <br />    GdiPlusDrawImage<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span>, oImage:<span style="color: #000000;">hImage</span>, nTop, nLeft <span style="color: #000000;">&#41;</span><br /> <span style="color: #00C800;">else</span><br />    GdiPlusDrawImage<span style="color: #000000;">&#40;</span>  ::<span style="color: #000000;">hGraphics</span>, oImage:<span style="color: #000000;">hImage</span>,nTop,nLeft, nWidth, nHeight <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSIMAGEFINALIZE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> &nbsp;<br />&nbsp;<span style="color: #0000ff;">Image</span> * newImage = <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Image</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;newImage.Finalize<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br />...........<br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> GDIImage<br /><br />   <span style="color: #00C800;">DATA</span> hImage<br />   <span style="color: #00C800;">DATA</span> aCLSID <br />   <span style="color: #00C800;">DATa</span> aExtensions<br />   <br />   <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>cFile<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> Save<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br />   DESTRUCTOR Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GDImage<br /><br />   ::<span style="color: #000000;">hImage</span> = GdiPlusCreateImageFromFile<span style="color: #000000;">&#40;</span> AnsiToWide<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">aExtIni</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"BMP"</span>, <span style="color: #ff0000;">"JPG"</span>, <span style="color: #ff0000;">"GIF"</span>, <span style="color: #ff0000;">"TIF"</span>, <span style="color: #ff0000;">"PNG"</span> <span style="color: #000000;">&#125;</span><br />   ::<span style="color: #000000;">aExtEnd</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"BMP"</span>, <span style="color: #ff0000;">"JPG"</span>, <span style="color: #ff0000;">"GIF"</span>, <span style="color: #ff0000;">"TIF"</span>, <span style="color: #ff0000;">"PNG"</span> <span style="color: #000000;">&#125;</span><br />   ::<span style="color: #000000;">aCLSID</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"{557CF400-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />                               <span style="color: #ff0000;">"{557CF401-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />                               <span style="color: #ff0000;">"{557CF402-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />                               <span style="color: #ff0000;">"{557CF405-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />                               <span style="color: #ff0000;">"{557CF406-1A04-11D3-9A73-0000F81EF32E}"</span>  ;<br />               <span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Save<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GDIImage<br /><span style="color: #00C800;">local</span> cExtension := Upper<span style="color: #000000;">&#40;</span>cFileExt<span style="color: #000000;">&#40;</span>cFile<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> cCLSID <br /><br /><span style="color: #00C800;">local</span> nScan:= aScan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aExtEnd</span>, cFile <span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #00C800;">if</span> nScan == <span style="color: #000000;">0</span><br />    <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Formato no soportado"</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">Return</span> .f. <br /><span style="color: #00C800;">endif</span> <br /><br /> cCLSID := aCLSID<span style="color: #000000;">&#91;</span> nScan <span style="color: #000000;">&#93;</span><br /> <br /> cCLSID = AnsiToWide<span style="color: #000000;">&#40;</span> cCLSID <span style="color: #000000;">&#41;</span> <br /> cFile  = AnsiToWide<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <br /><br /> GdiPlusImageSave<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hImage</span>, cFile, cCLSID <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GDIImage<br /><br />&nbsp; &nbsp; GdiPlusImageFinalize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hImage</span> <span style="color: #000000;">&#41;</span><br />     ::<span style="color: #000000;">hImage</span> = <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> GDIPlusConvertImage<span style="color: #000000;">&#40;</span> cImageIni, cImageEnd <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> cExtIni := Upper<span style="color: #000000;">&#40;</span>cFileExt<span style="color: #000000;">&#40;</span> cImageIni <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> cExtEnd := Upper<span style="color: #000000;">&#40;</span>cFileExt<span style="color: #000000;">&#40;</span> cImageEnd <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oImage<br /><span style="color: #00C800;">local</span> nScan <br /><br /><span style="color: #00C800;">if</span> cImageIni == cImageEnd<br />   <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Error. La imagen inicial y final son la misma"</span> <span style="color: #000000;">&#41;</span> <br />   <span style="color: #00C800;">Return</span> .f.<br /><span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nScan:= aScan<span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">aExtIni</span>, cExtIni <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span> <br />    <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">" el archivo "</span>+ cImageIni + <span style="color: #ff0000;">" tiene un formato no soportado"</span><span style="color: #000000;">&#41;</span> <br />    <span style="color: #00C800;">return</span> .f.<br /> <span style="color: #00C800;">endif</span> <br />  <br /> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nScan:= aScan<span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">aExtEnd</span>, cExtEnd <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span> <br />    <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">" el archivo "</span>+ cImageEnd + <span style="color: #ff0000;">" tiene un formato no soportado"</span><span style="color: #000000;">&#41;</span> <br />    <span style="color: #00C800;">return</span> .f.<br /> <span style="color: #00C800;">endif</span> <br /> <br />oImage:= GDIImage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cImageIni <span style="color: #000000;">&#41;</span><br />oImage:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span> cImageEnd <span style="color: #000000;">&#41;</span><br />oImage:<span style="color: #000000;">Destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><br /> </div>[/code:2t73bhby]
documentacion de funciones gdi+
Manuel, He empezado a revisar el código de conversión de ficheros, y este es el primer ejemplo que he construido: [code=fw:2lbe2wut]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hBmp<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> GdiPLoadImageFromFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\f</span>ive.bmp"</span>, @hBmp <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />DLL <span style="color: #00C800;">FUNCTION</span> GdipLoadImageFromFile<span style="color: #000000;">&#40;</span> cFileName AS LPSTR, hImage AS LONG <span style="color: #000000;">&#41;</span> AS LONG PASCAL ;<br />&nbsp; &nbsp;LIB <span style="color: #ff0000;">"GdiPlus.dll"</span></div>[/code:2lbe2wut] Me aparece un 18. Ni idea aún de que es... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
documentacion de funciones gdi+
el nombre del fichero tiene que estar en "wide" luego seguiriamos con: [code=fw:2d40qwgi]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hBmp := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> GdiPLoadImageFromFile<span style="color: #000000;">&#40;</span> AnsiToWide<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\f</span>ive.bmp"</span> <span style="color: #000000;">&#41;</span>, @hBmp <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />DLL <span style="color: #00C800;">FUNCTION</span> GdipLoadImageFromFile<span style="color: #000000;">&#40;</span> cFileName AS LPSTR, hImage AS LONG <span style="color: #000000;">&#41;</span> AS LONG PASCAL ;<br />&nbsp; &nbsp;LIB <span style="color: #ff0000;">"GdiPlus.dll"</span></div>[/code:2d40qwgi] sigue apareciendo el 18...
documentacion de funciones gdi+
Asi paso a obtener un 2: [code=fw:p8z4gfhj]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oGraphics := Graphics<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hBmp := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> GdiPLoadImageFromFile<span style="color: #000000;">&#40;</span> AnsiToWide<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\f</span>ive.bmp"</span> <span style="color: #000000;">&#41;</span>, @hBmp <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />DLL <span style="color: #00C800;">FUNCTION</span> GdipLoadImageFromFile<span style="color: #000000;">&#40;</span> cFileName AS LPSTR, hImage AS LONG <span style="color: #000000;">&#41;</span> AS LONG PASCAL ;<br />&nbsp; &nbsp;LIB <span style="color: #ff0000;">"GdiPlus.dll"</span></div>[/code:p8z4gfhj]
documentacion de funciones gdi+
Parece que estos son los códigos de error de GdiPlus: "Ok", "GenericError", "InvalidParameter", "OutOfMemory", "ObjectBusy", "InsufficientBuffer", "NotImplemented", "Win32Error", "WrongState", "Aborted", "FileNotFound", "ValueOverflow", "AccessDenied", "UnknownImageFormat", "FontFamilyNotFound", "FontStyleNotFound", "NotTrueTypeFont", "UnsupportedGdiplusVersion", "GdiplusNotInitialized", "PropertyNotFound", "PropertyNotSupported" Por lo que el 18 era: "GdiplusNotInitialized" y el 2 es: "InvalidParameter"
documentacion de funciones gdi+
Antonio , Tienes ya una Funcion completa para convertir archivos .... [code=fw:1clgu6sy]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> GDIPlusConvertImage<span style="color: #000000;">&#40;</span> cImageIni, cImageEnd <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> cExtIni := Upper<span style="color: #000000;">&#40;</span>cFileExt<span style="color: #000000;">&#40;</span> cImageIni <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> cExtEnd := Upper<span style="color: #000000;">&#40;</span>cFileExt<span style="color: #000000;">&#40;</span> cImageEnd <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oImage<br /><span style="color: #00C800;">local</span> nScan <br /><br /><span style="color: #00C800;">if</span> cImageIni == cImageEnd<br />   <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Error. La imagen inicial y final son la misma"</span> <span style="color: #000000;">&#41;</span> <br />   <span style="color: #00C800;">Return</span> .f.<br /><span style="color: #00C800;">endif</span><br />oImage = GDIImage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>-<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cImageIni <span style="color: #000000;">&#41;</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nScan:= aScan<span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">aExtIni</span>, cExtIni <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span> <br />    <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">" el archivo "</span>+ cImageIni + <span style="color: #ff0000;">" tiene un formato no soportado"</span><span style="color: #000000;">&#41;</span> <br />    <span style="color: #00C800;">return</span> .f.<br /> <span style="color: #00C800;">endif</span> <br />  <br /> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nScan:= aScan<span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">aExtEnd</span>, cExtEnd <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span> <br />    <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">" el archivo "</span>+ cImageEnd + <span style="color: #ff0000;">" tiene un formato no soportado"</span><span style="color: #000000;">&#41;</span> <br />    <span style="color: #00C800;">return</span> .f.<br /> <span style="color: #00C800;">endif</span> <br /> <br />oImage:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span> cImageEnd <span style="color: #000000;">&#41;</span><br />oImage:<span style="color: #000000;">Destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:1clgu6sy]
documentacion de funciones gdi+
Manuel, Eres increible <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> La has probado ? Funciona bien ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Muchisimas gracias!!!
documentacion de funciones gdi+
Si. de momento me funciona bien todo el código que tengo salvo los paths de dibujo que no sé exactamente que les pasa .... <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> Subo aqui todo el código que tengo ahora mismo .... ..................... edito .................. resuelto . subo de nuevo el codigo con correccion dee bugs. el fichero tgdiplus.prg [code=fw:1c3v93mo]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">// GdiPlus support classes. (c) FiveTech Software 2011-2013</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00D7D7;">#DEFINE</span> GDI_PEN_ROUND&nbsp; &nbsp;<span style="color: #000000;">1</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> Graphics<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; hGraphics<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> hDC, lNoHighQuality <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetHighQuality<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusHighQuality<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetNormalQuality<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusNormalQuality<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawLine<span style="color: #000000;">&#40;</span> oPen, nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusDrawLine<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Empty<span style="color: #000000;">&#40;</span> oPen <span style="color: #000000;">&#41;</span>, oPen:<span style="color: #000000;">hPen</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawRect<span style="color: #000000;">&#40;</span> oPen, oBrush, nLeft, nTop, nWidth, nHight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusDrawRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Empty<span style="color: #000000;">&#40;</span> oPen <span style="color: #000000;">&#41;</span>, oPen:<span style="color: #000000;">hPen</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Empty<span style="color: #000000;">&#40;</span> oBrush <span style="color: #000000;">&#41;</span>, oBrush:<span style="color: #000000;">hBrush</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span>, nLeft, nTop, nWidth, nHight <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawEllipse<span style="color: #000000;">&#40;</span> oPen, oBrush, nLeft, nTop, nWidth, nHight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusDrawEllipse<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Empty<span style="color: #000000;">&#40;</span> oPen <span style="color: #000000;">&#41;</span>, oPen:<span style="color: #000000;">hPen</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Empty<span style="color: #000000;">&#40;</span> oBrush <span style="color: #000000;">&#41;</span>, oBrush:<span style="color: #000000;">hBrush</span>, <span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span>, nLeft, nTop, nWidth, nHight <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawArc<span style="color: #000000;">&#40;</span> oPen, nLeft, nTop, nWidth, nHeight,startAngle, sweepAngle <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusDrawArc<span style="color: #000000;">&#40;</span> oPen:<span style="color: #000000;">hPen</span>, nLeft, nTop, nWidth, nHeight, startAngle, sweepAngle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawPath<span style="color: #000000;">&#40;</span> oPen, oPath <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusDrawPath<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span>, oPen:<span style="color: #000000;">hPen</span>, oPath:<span style="color: #000000;">hPath</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawImage<span style="color: #000000;">&#40;</span> oBmp,nTop,nleft, nWidth, nHeight <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;DESTRUCTOR Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> hDC , lNoHighQuality <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Graphics<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hGraphics</span> = GdiPlusNewGraphics<span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;SetPageUnit2Pixel<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> lNoHighQuality := .F.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lNoHighQuality<br />&nbsp; &nbsp;&nbsp;::<span style="color: #000000;">SetNormalQuality</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp;&nbsp;::<span style="color: #000000;">SetHighQuality</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Graphics<br /><br />&nbsp; &nbsp;GdiPlusDeleteGraphics<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hGraphics</span> = <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawImage<span style="color: #000000;">&#40;</span> oImage, nTop, nleft, nWidth, nHeight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Graphics<br /><br />&nbsp;<span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span>nWidth <span style="color: #000000;">&#41;</span> .or. Empty<span style="color: #000000;">&#40;</span> nHeight <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; GdiPlusDrawImage<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span>, oImage:<span style="color: #000000;">hImage</span>, nTop, nLeft <span style="color: #000000;">&#41;</span><br />&nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; GdiPlusDrawImage<span style="color: #000000;">&#40;</span> &nbsp;::<span style="color: #000000;">hGraphics</span>, oImage:<span style="color: #000000;">hImage</span>,nTop,nLeft, nWidth, nHeight <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> Pen<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; hPen<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue, nSize, lRound, lAlign <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetSize<span style="color: #000000;">&#40;</span> nSize <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusPenSize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPen</span> , nSize <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetStyle<span style="color: #000000;">&#40;</span> nStyle <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetInset<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusAlign<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPen</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetNoInset<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusNoAlign<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPen</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetColor<span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusPenSetClr<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPen</span>, nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;DESTRUCTOR Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue, nSize, lRound, lAlign <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Pen<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hPen</span> = GdiPlusNewPen<span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nSize := <span style="color: #000000;">1</span> , lRound := .F. , lAlign := .F.<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> nSize <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lRound<br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SetStyle</span> <span style="color: #000000;">&#40;</span> GDI_PEN_ROUND <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> lAlign<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SetAlign</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> SetStyle<span style="color: #000000;">&#40;</span> nStyle <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Pen<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nStyle == GDI_PEN_ROUND<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GdiPlusPenStyle<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPen</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">endcase</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Pen<br /><br />&nbsp; &nbsp;GdiPlusDeletePen<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPen</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hPen</span> = <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> <span style="color: #0000ff;">Brush</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; hBrush<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> NewSolidBrush<span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;DESTRUCTOR Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> NewSolidBrush<span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> <span style="color: #0000ff;">Brush</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hBrush</span> = GdiPlusNewSolidBrush<span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> <span style="color: #0000ff;">Brush</span><br /><br />&nbsp; &nbsp;GdiPlusDeleteBrush<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBrush</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hBrush</span> = <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #0000ff;">init</span> procedure GdiPlusStart<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;GdiPlusStartup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />exit procedure GdiPlusEnd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;GdiPlusShutdown<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> Path<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; hPath<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddLINE <span style="color: #000000;">&#40;</span> nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusPathAddLine<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPath</span>, nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddRectangle <span style="color: #000000;">&#40;</span> nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusPathAddRectangle <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPath</span>, nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddRoundRect<span style="color: #000000;">&#40;</span> x, y, width, height, nRadius <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddArc<span style="color: #000000;">&#40;</span> nLeft, nTop, nWidth, nHeight, nStartAngle, nSweepAngle <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusPathAddArc<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPath</span>, nLeft, nTop, nWidth, nHeight, nStartAngle, nSweepAngle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> CloseFigure<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusPathCloseFigure<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPath</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;DESTRUCTOR Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Path<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hPath</span> = GdiPlusCreatePath<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> AddRoundRect<span style="color: #000000;">&#40;</span> x, y, width, height, nRadius <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Path<br />&nbsp; <br />&nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nRadius == <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddRectangle</span><span style="color: #000000;">&#40;</span> x, y, width, height <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddLine</span><span style="color: #000000;">&#40;</span> x + nRadius, y, x + width - nRadius, y <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddArc</span><span style="color: #000000;">&#40;</span> x + width - nRadius, y, nRadius, nRadius, <span style="color: #000000;">270</span>, <span style="color: #000000;">90</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddLine</span><span style="color: #000000;">&#40;</span> x + width, y + nRadius, x + width, y + height - nRadius <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddArc</span><span style="color: #000000;">&#40;</span> x + width - nRadius, y + height - nRadius, nRadius, nRadius, <span style="color: #000000;">0</span>, <span style="color: #000000;">90</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddLine</span><span style="color: #000000;">&#40;</span> x + width - nRadius, y + height, x + nRadius, y + height <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddArc</span><span style="color: #000000;">&#40;</span> x, y + height - nRadius, nRadius, nRadius, <span style="color: #000000;">90</span>, <span style="color: #000000;">90</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddLine</span><span style="color: #000000;">&#40;</span> x, y + height - nRadius, x, y + nRadius <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddArc</span><span style="color: #000000;">&#40;</span> x, y, nRadius, nRadius, <span style="color: #000000;">180</span>, <span style="color: #000000;">90</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">CloseFigure</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Path<br /><br />&nbsp; &nbsp;GdiPlusDeletePath<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPath</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hPath</span> = <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> GDIImage<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> hImage<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> aCLSID <br />&nbsp; &nbsp;<span style="color: #00C800;">DATa</span> aExtIni, aExtEnd<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>cFile<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Save<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;DESTRUCTOR Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GDIImage<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hImage</span> = GdiPlusCreateImageFromFile<span style="color: #000000;">&#40;</span> AnsiToWide<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">aExtIni</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"BMP"</span>, <span style="color: #ff0000;">"JPG"</span>, <span style="color: #ff0000;">"GIF"</span>, <span style="color: #ff0000;">"TIF"</span>, <span style="color: #ff0000;">"PNG"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">aExtEnd</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"BMP"</span>, <span style="color: #ff0000;">"JPG"</span>, <span style="color: #ff0000;">"GIF"</span>, <span style="color: #ff0000;">"TIF"</span>, <span style="color: #ff0000;">"PNG"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">aCLSID</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"{557CF400-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"{557CF401-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"{557CF402-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"{557CF405-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"{557CF406-1A04-11D3-9A73-0000F81EF32E}"</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Save<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GDIImage<br /><span style="color: #00C800;">local</span> cExtension := Upper<span style="color: #000000;">&#40;</span>cFileExt<span style="color: #000000;">&#40;</span>cFile<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> cCLSID <br /><br /><span style="color: #00C800;">local</span> nScan:= aScan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aExtEnd</span>, cExtension <span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #00C800;">if</span> nScan == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Formato no soportado"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> .f. <br /><span style="color: #00C800;">endif</span> <br /><br />&nbsp;cCLSID := ::<span style="color: #000000;">aCLSID</span><span style="color: #000000;">&#91;</span> nScan <span style="color: #000000;">&#93;</span><br />&nbsp;<br />&nbsp;cCLSID = AnsiToWide<span style="color: #000000;">&#40;</span> cCLSID <span style="color: #000000;">&#41;</span> <br />&nbsp;cFile &nbsp;= AnsiToWide<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <br /><br />&nbsp;GdiPlusImageSave<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hImage</span>, cFile, cCLSID <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GDIImage<br /><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hImage</span> = <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> GDIPlusConvertImage<span style="color: #000000;">&#40;</span> cImageIni, cImageEnd <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> cExtIni := Upper<span style="color: #000000;">&#40;</span>cFileExt<span style="color: #000000;">&#40;</span> cImageIni <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> cExtEnd := Upper<span style="color: #000000;">&#40;</span>cFileExt<span style="color: #000000;">&#40;</span> cImageEnd <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oImage<br /><span style="color: #00C800;">local</span> nScan <br /><br /><span style="color: #00C800;">if</span> cImageIni == cImageEnd<br />&nbsp; &nbsp;<span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Error. La imagen inicial y final son la misma"</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">Return</span> .f.<br /><span style="color: #00C800;">endif</span><br /><br />oImage:= GDIImage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cImageIni <span style="color: #000000;">&#41;</span><br /><br />&nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nScan:= aScan<span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">aExtIni</span>, cExtIni <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span> <br />&nbsp; &nbsp; <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">" el archivo "</span>+ cImageIni + <span style="color: #ff0000;">" tiene un formato no soportado"</span><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> .f.<br />&nbsp;<span style="color: #00C800;">endif</span> <br />&nbsp; <br />&nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nScan:= aScan<span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">aExtEnd</span>, cExtEnd <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span> <br />&nbsp; &nbsp; <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">" el archivo "</span>+ cImageEnd + <span style="color: #ff0000;">" tiene un formato no soportado"</span><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> .f.<br />&nbsp;<span style="color: #00C800;">endif</span> <br />&nbsp;<br />oImage:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span> cImageEnd <span style="color: #000000;">&#41;</span><br />oImage:<span style="color: #000000;">Destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><br />&nbsp;</div>[/code:1c3v93mo] el fichero gdiplus.cpp [code=fw:1c3v93mo]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">// GdiPlus support (c) FiveTech Software</span><br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <gdiplus.h><br /><br /><br /><br />using namespace Gdiplus;<br /><br />GdiplusStartupInput gdiplusStartupInput;<br />ULONG_PTR &nbsp; gdiplusToken;<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNEWGRAPHICS <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> Graphics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HDC <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDELETEGRAPHICS <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;delete <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSHIGHQUALITY <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;graphics->SetSmoothingMode<span style="color: #000000;">&#40;</span> SmoothingModeHighQuality <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNORMALQUALITY <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;graphics->SetSmoothingMode<span style="color: #000000;">&#40;</span> SmoothingModeDefault <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNEWPEN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Color</span> clr = <span style="color: #0000ff;">Color</span><span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> Pen<span style="color: #000000;">&#40;</span> clr <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPENSIZE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;pen->SetWidth<span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPENSETCLR <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">Color</span> clr = <span style="color: #0000ff;">Color</span><span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;hb_retni<span style="color: #000000;">&#40;</span> pen->SetColor<span style="color: #000000;">&#40;</span> clr <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPENSTYLE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;pen->SetLineCap<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> LineCap <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> LineCap <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> DashCap <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSALIGN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;pen->SetAlignment<span style="color: #000000;">&#40;</span>PenAlignmentInset<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNOALIGN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;pen->SetAlignment<span style="color: #000000;">&#40;</span>PenAlignmentCenter<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDELETEPEN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;delete <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNEWSOLIDBRUSH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Color</span> clr = <span style="color: #0000ff;">Color</span><span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> SolidBrush<span style="color: #000000;">&#40;</span> clr <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDELETEBRUSH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;delete <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Brush</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWLINE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">// if pen-object</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; graphics->DrawLine<span style="color: #000000;">&#40;</span> pen, <span style="color: #000000;">&#40;</span> float <span style="color: #000000;">&#41;</span> hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> float <span style="color: #000000;">&#41;</span> hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> float <span style="color: #000000;">&#41;</span> hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> float <span style="color: #000000;">&#41;</span> hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWRECT <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;<span style="color: #B900B9;">// &nbsp;Pen * pen = ( Pen * ) hb_parnl( 2 );</span><br />&nbsp; &nbsp;float nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nWidth = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nHeight = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">// if brush-object</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Brush</span> * <span style="color: #0000ff;">brush</span> = <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Brush</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp;graphics->FillRectangle<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">brush</span>, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">//if pen-object</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp;graphics->DrawRectangle<span style="color: #000000;">&#40;</span> pen, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWELLIPSE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;<span style="color: #B900B9;">// &nbsp;Pen * pen = ( Pen * ) hb_parnl( 2 );</span><br />&nbsp; &nbsp;float nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nWidth = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nHeight = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">//if brush-object</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Brush</span> * <span style="color: #0000ff;">brush</span> = <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Brush</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; graphics->FillEllipse<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">brush</span>, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">//if pen-object</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp;graphics->DrawEllipse<span style="color: #000000;">&#40;</span> pen, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">/*<br />HB_FUNC( GDIPLUSDRAWTEXT )<br />{<br />&nbsp; &nbsp; Graphics * graphics = ( Graphics * ) hb_parnl( 1 );<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <br />//&nbsp; if HB_ISNUM( 3 ) &nbsp; //if brush-object<br />&nbsp;// &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; Brush * brush = ( Brush * ) hb_parnl( 3 );<br />&nbsp; // &nbsp;}<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;graphics->DrawString(hb_parc(2) , -1,NUL,NUL,NUL, brush );<br />&nbsp; &nbsp; &nbsp;<br />}<br />*/</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSCREATEPATH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> GraphicsPath<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPATHSTARTFIGURE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;graphicPath->StartFigure<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDELETEPATH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;delete <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPATHADDLINE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;int nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nRight = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nBottom = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;graphicPath->AddLine<span style="color: #000000;">&#40;</span> &nbsp;nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span> ;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPATHADDRECTANGLE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;int nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nRight = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nBottom = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; <br />&nbsp; &nbsp;Rect pathRect = Rect<span style="color: #000000;">&#40;</span> &nbsp;nLeft, nTop, nRight, nBottom &nbsp;<span style="color: #000000;">&#41;</span>;<br />&nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;graphicPath->AddRectangle<span style="color: #000000;">&#40;</span> pathRect <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPATHADDARC <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;int nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nRight = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nBottom = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float startAngle = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float sweepAngle = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;Rect pathRect = Rect<span style="color: #000000;">&#40;</span> &nbsp;nLeft, nTop, nRight, nBottom &nbsp;<span style="color: #000000;">&#41;</span>;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;graphicPath->AddArc<span style="color: #000000;">&#40;</span> pathRect, startAngle, sweepAngle <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPATHCLOSEFIGURE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;graphicPath->CloseFigure<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWPATH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;<br />&nbsp;graphics->DrawPath<span style="color: #000000;">&#40;</span> pen, graphicPath <span style="color: #000000;">&#41;</span>;<br />&nbsp;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSCREATEPOINTF <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;float nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span><span style="color: #00C800;">new</span> PointF<span style="color: #000000;">&#40;</span> nLeft , nTop <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp;<br />&nbsp;<br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWARC <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />&nbsp; &nbsp; Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;float nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nWidth = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nHeight = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float startAngle = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float sweepAngle = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">8</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; <br />&nbsp; &nbsp;<span style="color: #B900B9;">// Draw the arc.</span><br />&nbsp; &nbsp;graphics->DrawArc<span style="color: #000000;">&#40;</span> pen, nLeft, nTop, nWidth, nHeight, startAngle, sweepAngle<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span> <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSSTARTUP <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;hb_retl<span style="color: #000000;">&#40;</span> GdiplusStartup<span style="color: #000000;">&#40;</span> &gdiplusToken, &gdiplusStartupInput, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSSHUTDOWN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;GdiplusShutdown<span style="color: #000000;">&#40;</span> gdiplusToken <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> SETPAGEUNIT2PIXEL <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;graphics->SetPageUnit<span style="color: #000000;">&#40;</span> UnitPixel <span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// Unit to Pixel</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSCREATEIMAGEFROMFILE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />&nbsp; &nbsp; <span style="color: #0000ff;">Image</span> * newImage = &nbsp;<span style="color: #00C800;">new</span> <span style="color: #0000ff;">Image</span><span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #000000;">&#40;</span>LPCWSTR<span style="color: #000000;">&#41;</span> hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span>; &nbsp;<br />&nbsp; hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> newImage <span style="color: #000000;">&#41;</span>;<br />&nbsp;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWIMAGE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />&nbsp; &nbsp; int iParams = hb_pcount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #0000ff;">Image</span> * newImage = <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Image</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; int nLeft ;<br />&nbsp; int nTop ;<br />&nbsp; int nWidth ;<br />&nbsp; int nHeight;<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">switch</span> <span style="color: #000000;">&#40;</span>iParams<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> <span style="color: #000000;">4</span>:<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">nLeft</span> = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; nTop = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; graphics->DrawImage<span style="color: #000000;">&#40;</span> newImage, nLeft, nTop <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">case</span> <span style="color: #000000;">6</span>:<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">nLeft</span> = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;nTop = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;nWidth = &nbsp;hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;nHeight = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; graphics->DrawImage<span style="color: #000000;">&#40;</span> newImage, nLeft, nTop,nWidth,nHeight<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSIMAGESAVE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />&nbsp; <span style="color: #0000ff;">Image</span> * newImage = <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Image</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; CLSID cClsid ;<br />&nbsp; LPWSTR file = <span style="color: #000000;">&#40;</span>LPWSTR<span style="color: #000000;">&#41;</span> hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; LPWSTR identificador = &nbsp;<span style="color: #000000;">&#40;</span>LPWSTR<span style="color: #000000;">&#41;</span> hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; CLSIDFromString<span style="color: #000000;">&#40;</span> identificador, &cClsid <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp;newImage->Save<span style="color: #000000;">&#40;</span> file , &cClsid, <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />&nbsp;</div>[/code:1c3v93mo]
documentacion de funciones gdi+
Manuel, Muchísimas gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Tienes algún ejemplo actualizado que demuestre todo lo nuevo que le has añadido ? Incluida para la próxima versión de FWH <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
documentacion de funciones gdi+
Manuel, Puestos a pedir podrias proporcionarme el texto descriptivo en Español de las mejoras realizadas en ese ficheros respecto a la versión anterior ? Para incluirlo en el whatsnew.txt Gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
documentacion de funciones gdi+
Antonio, tengo algún cambio mas en los ficheros . Este fin de semana intento subir los ficheros mas actuales , un ejemplo de las nuevas funciones y un texto con los cambios .
documentacion de funciones gdi+
Muchas gracias, cuando puedas <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
documentacion de funciones gdi+
Subo ahora los archivos y dejo para mañana o pasado el ejemplo .... el archivo nuevoenGdiplus.txt [code=fw:2jvqr3au]<div class="fw" id="{CB}" style="font-family: monospace;"><br />* nuevos metodos para la clase Graphics : <br /><br />&nbsp; &nbsp; <span style="color: #000000;">DrawArc</span> : <span style="color: #000000;">Permite</span> dibujar un arco .<br />&nbsp; &nbsp; DrawPath: <span style="color: #000000;">Dibuja</span> los trazos de un path previamente creado<br />&nbsp; &nbsp; DrawImage: <span style="color: #000000;">pinta</span> una Imagen dentro de los formatos soportados por gdi+ . <br />&nbsp; &nbsp; DrawRoundRect : <span style="color: #000000;">Utilizamos</span> internamente el objeto path para dibujar un Roundrect.<br />&nbsp; &nbsp; <br />&nbsp; <br />* nuevo metodo para la calse Pen:<br /><br />&nbsp; &nbsp; <span style="color: #000000;">SetColor</span> : <span style="color: #000000;">permite</span> definir un nuevo <span style="color: #0000ff;">color</span> para el pen &nbsp;<span style="color: #0000ff;">sin</span> tener que construir uno nuevo :<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">sus</span> parametros son Transparencia, nRed, nGreen, nBlue por ese orden.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /><br />* Nueva clase path : <span style="color: #000000;">permite</span> dibujar varios y distintos trazos y luego pintarlos en pantalla.<br />&nbsp; &nbsp;Sus metodos son :<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #00C800;">New</span> : <span style="color: #000000;">crea</span> un nuevo path<br />&nbsp; &nbsp; Destroy : <span style="color: #000000;">lo</span> destruye.<br />&nbsp; &nbsp; AddLine : <span style="color: #000000;">A</span>ñade una linea.<br />&nbsp; &nbsp; AddRectangle : <span style="color: #000000;">A</span>ñade un rectangulo &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; AddRoundRect : <span style="color: #000000;">A</span>ñade un roundRect.<br />&nbsp; &nbsp; &nbsp; AddArc : <span style="color: #000000;">A</span>ñade un Arco.<br />&nbsp; &nbsp; &nbsp; CloseFigure : <span style="color: #000000;">Cierra</span> una figura dibujada con los anteriores metodos .<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> para ejemplo de uso &nbsp;se puede mirar el codigo usado para el methodo addroundrect<span style="color: #000000;">&#41;</span> .<br />&nbsp; &nbsp; <br /><br />* Nueva clase GDIBmp : <span style="color: #000000;">Permite</span> el uso de imagenes.<br />&nbsp; &nbsp;Sus metodos son :<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cFile, cResname <span style="color: #000000;">&#41;</span> : <span style="color: #000000;">Crea</span> el objeto GdiBmp , este puede ser creado desde un archivo o desde recursos si se trata de un bmp <span style="color: #000000;">&#40;</span> por el momento <span style="color: #000000;">&#41;</span> &nbsp;<br />&nbsp; &nbsp; Destroy : <span style="color: #000000;">destruye</span> el objeto &nbsp; <br />&nbsp; &nbsp; Save<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> Graba el objeto en un nuevo archivo que puede ser cualquiera de los formatos soportados.<br />&nbsp; &nbsp; <br />* Nueva Funcion GDIPlusConvertImage<span style="color: #000000;">&#40;</span> cImageIni, cImageEnd <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br />&nbsp; &nbsp;Permite pasar una imagen de un formato a otro ,solo expecificando un archivo origen y un archivo destino .<br /><br />&nbsp;</div>[/code:2jvqr3au] el archivo tgdiplus.prg [code=fw:2jvqr3au]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">// GdiPlus support classes. (c) FiveTech Software 2011-2013</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00D7D7;">#DEFINE</span> GDI_PEN_ROUND&nbsp; &nbsp;<span style="color: #000000;">1</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> Graphics<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; hGraphics<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> hDC, lNoHighQuality <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetHighQuality<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusHighQuality<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetNormalQuality<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusNormalQuality<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawLine<span style="color: #000000;">&#40;</span> oPen, nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusDrawLine<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Empty<span style="color: #000000;">&#40;</span> oPen <span style="color: #000000;">&#41;</span>, oPen:<span style="color: #000000;">hPen</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawRect<span style="color: #000000;">&#40;</span> oPen, oBrush, nLeft, nTop, nWidth, nHight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusDrawRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Empty<span style="color: #000000;">&#40;</span> oPen <span style="color: #000000;">&#41;</span>, oPen:<span style="color: #000000;">hPen</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Empty<span style="color: #000000;">&#40;</span> oBrush <span style="color: #000000;">&#41;</span>, oBrush:<span style="color: #000000;">hBrush</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span>, nLeft, nTop, nWidth, nHight <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawEllipse<span style="color: #000000;">&#40;</span> oPen, oBrush, nLeft, nTop, nWidth, nHight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusDrawEllipse<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Empty<span style="color: #000000;">&#40;</span> oPen <span style="color: #000000;">&#41;</span>, oPen:<span style="color: #000000;">hPen</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Empty<span style="color: #000000;">&#40;</span> oBrush <span style="color: #000000;">&#41;</span>, oBrush:<span style="color: #000000;">hBrush</span>, <span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span>, nLeft, nTop, nWidth, nHight <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawArc<span style="color: #000000;">&#40;</span> oPen, nLeft, nTop, nWidth, nHeight,startAngle, sweepAngle <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusDrawArc<span style="color: #000000;">&#40;</span> oPen:<span style="color: #000000;">hPen</span>, nLeft, nTop, nWidth, nHeight, startAngle, sweepAngle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawPath<span style="color: #000000;">&#40;</span> oPen, oPath <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusDrawPath<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span>, oPen:<span style="color: #000000;">hPen</span>, oPath:<span style="color: #000000;">hPath</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawImage<span style="color: #000000;">&#40;</span> oBmp,nTop,nleft, nWidth, nHeight <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawRoundRect<span style="color: #000000;">&#40;</span>oPen, oBrush, nLeft, nTop, nWidth, nHight <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;DESTRUCTOR Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> hDC , lNoHighQuality <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Graphics<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hGraphics</span> = GdiPlusNewGraphics<span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;SetPageUnit2Pixel<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> lNoHighQuality := .F.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lNoHighQuality<br />&nbsp; &nbsp;&nbsp;::<span style="color: #000000;">SetNormalQuality</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp;&nbsp;::<span style="color: #000000;">SetHighQuality</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Graphics<br /><br />&nbsp; &nbsp;GdiPlusDeleteGraphics<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hGraphics</span> = <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawImage<span style="color: #000000;">&#40;</span> oImage, nTop, nleft, nWidth, nHeight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Graphics<br /><br />&nbsp;<span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span>nWidth <span style="color: #000000;">&#41;</span> .or. Empty<span style="color: #000000;">&#40;</span> nHeight <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; GdiPlusDrawImage<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hGraphics</span>, oImage:<span style="color: #000000;">hBmp</span>, nTop, nLeft <span style="color: #000000;">&#41;</span><br />&nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; GdiPlusDrawImage<span style="color: #000000;">&#40;</span> &nbsp;::<span style="color: #000000;">hGraphics</span>, oImage:<span style="color: #000000;">hBmp</span>,nTop,nLeft, nWidth, nHeight <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawRoundRect<span style="color: #000000;">&#40;</span>oPen, oBrush, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Graphics<br />&nbsp;<span style="color: #00C800;">local</span> oPath:= Path<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp;oPath:<span style="color: #000000;">AddRoundRect</span><span style="color: #000000;">&#40;</span> nLeft, nTop, nWidth, nHeight,<span style="color: #000000;">8</span> &nbsp;<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">DrawPath</span><span style="color: #000000;">&#40;</span> oPen, oPath <span style="color: #000000;">&#41;</span> &nbsp;<br />&nbsp; &nbsp; &nbsp;<br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> Pen<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; hPen<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue, nSize, lRound, lAlign <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetSize<span style="color: #000000;">&#40;</span> nSize <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusPenSize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPen</span> , nSize <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetStyle<span style="color: #000000;">&#40;</span> nStyle <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetInset<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusAlign<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPen</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetNoInset<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusNoAlign<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPen</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetColor<span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusPenSetClr<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPen</span>, nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;DESTRUCTOR Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue, nSize, lRound, lAlign <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Pen<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hPen</span> = GdiPlusNewPen<span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nSize := <span style="color: #000000;">1</span> , lRound := .F. , lAlign := .F.<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> nSize <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lRound<br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SetStyle</span> <span style="color: #000000;">&#40;</span> GDI_PEN_ROUND <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> lAlign<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SetAlign</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> SetStyle<span style="color: #000000;">&#40;</span> nStyle <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Pen<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nStyle == GDI_PEN_ROUND<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GdiPlusPenStyle<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPen</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">endcase</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Pen<br /><br />&nbsp; &nbsp;GdiPlusDeletePen<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPen</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hPen</span> = <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> <span style="color: #0000ff;">Brush</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; hBrush<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> NewSolidBrush<span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;DESTRUCTOR Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> NewSolidBrush<span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> <span style="color: #0000ff;">Brush</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hBrush</span> = GdiPlusNewSolidBrush<span style="color: #000000;">&#40;</span> nTrans, nRed, nGreen, nBlue <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> <span style="color: #0000ff;">Brush</span><br /><br />&nbsp; &nbsp;GdiPlusDeleteBrush<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBrush</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hBrush</span> = <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #0000ff;">init</span> procedure GdiPlusStart<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;GdiPlusStartup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />exit procedure GdiPlusEnd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;GdiPlusShutdown<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> Path<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; hPath<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddLINE <span style="color: #000000;">&#40;</span> nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusPathAddLine<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPath</span>, nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddRectangle <span style="color: #000000;">&#40;</span> nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusPathAddRectangle <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPath</span>, nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddRoundRect<span style="color: #000000;">&#40;</span> x, y, width, height, nRadius <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddArc<span style="color: #000000;">&#40;</span> nLeft, nTop, nWidth, nHeight, nStartAngle, nSweepAngle <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GdiPlusPathAddArc<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPath</span>, nLeft, nTop, nWidth, nHeight, nStartAngle, nSweepAngle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> CloseFigure<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> GdiPlusPathCloseFigure<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPath</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;DESTRUCTOR Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Path<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hPath</span> = GdiPlusCreatePath<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> AddRoundRect<span style="color: #000000;">&#40;</span> x, y, width, height, nRadius <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Path<br />&nbsp; <br />&nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nRadius == <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddRectangle</span><span style="color: #000000;">&#40;</span> x, y, width, height <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddLine</span><span style="color: #000000;">&#40;</span> x + nRadius, y, x + width - nRadius, y <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddArc</span><span style="color: #000000;">&#40;</span> x + width - nRadius, y, nRadius, nRadius, <span style="color: #000000;">270</span>, <span style="color: #000000;">90</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddLine</span><span style="color: #000000;">&#40;</span> x + width, y + nRadius, x + width, y + height - nRadius <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddArc</span><span style="color: #000000;">&#40;</span> x + width - nRadius, y + height - nRadius, nRadius, nRadius, <span style="color: #000000;">0</span>, <span style="color: #000000;">90</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddLine</span><span style="color: #000000;">&#40;</span> x + width - nRadius, y + height, x + nRadius, y + height <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddArc</span><span style="color: #000000;">&#40;</span> x, y + height - nRadius, nRadius, nRadius, <span style="color: #000000;">90</span>, <span style="color: #000000;">90</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddLine</span><span style="color: #000000;">&#40;</span> x, y + height - nRadius, x, y + nRadius <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">AddArc</span><span style="color: #000000;">&#40;</span> x, y, nRadius, nRadius, <span style="color: #000000;">180</span>, <span style="color: #000000;">90</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">CloseFigure</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Path<br /><br />&nbsp; &nbsp;GdiPlusDeletePath<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPath</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hPath</span> = <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> GDIBmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> hBmp<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> aCLSID <br />&nbsp; &nbsp;<span style="color: #00C800;">DATa</span> aExtIni, aExtEnd<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cFile, cResname <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Save<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;DESTRUCTOR Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cFile , cResname <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GDIBmp<br /><span style="color: #00C800;">local</span> aBmpPal<br /><br />&nbsp; <br />&nbsp; &nbsp;::<span style="color: #000000;">aExtIni</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"BMP"</span>, <span style="color: #ff0000;">"JPG"</span>, <span style="color: #ff0000;">"GIF"</span>, <span style="color: #ff0000;">"TIF"</span>, <span style="color: #ff0000;">"PNG"</span>,<span style="color: #ff0000;">"EMF"</span>,<span style="color: #ff0000;">"WMF"</span>,<span style="color: #ff0000;">"ICO"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">aExtEnd</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"BMP"</span>, <span style="color: #ff0000;">"JPG"</span>, <span style="color: #ff0000;">"GIF"</span>, <span style="color: #ff0000;">"TIF"</span>, <span style="color: #ff0000;">"PNG"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">aCLSID</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"{557CF400-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"{557CF401-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"{557CF402-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"{557CF405-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"{557CF406-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"{557CF403-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"{557CF404-1A04-11D3-9A73-0000F81EF32E}"</span> ,;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"{557CF407-1A04-11D3-9A73-0000F81EF32E}"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cResName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;aBmpPal &nbsp; &nbsp;= PalBmpLoad<span style="color: #000000;">&#40;</span> cResName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hBmp</span> = GdiPlusCreateImageFromRes<span style="color: #000000;">&#40;</span> aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;elseif File<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hBmp</span> = GdiPlusCreateImageFromFile<span style="color: #000000;">&#40;</span> AnsiToWide<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ficheros no encontrados"</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Save<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GDIBmp<br /><span style="color: #00C800;">local</span> cExtension := Upper<span style="color: #000000;">&#40;</span>cFileExt<span style="color: #000000;">&#40;</span>cFile<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> cCLSID <br /><br /><span style="color: #00C800;">local</span> nScan:= aScan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aExtEnd</span>, cExtension <span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #00C800;">if</span> nScan == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Formato no soportado"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> .f. <br /><span style="color: #00C800;">endif</span> <br /><br />&nbsp;cCLSID := ::<span style="color: #000000;">aCLSID</span><span style="color: #000000;">&#91;</span> nScan <span style="color: #000000;">&#93;</span><br />&nbsp;<br />&nbsp;cCLSID = AnsiToWide<span style="color: #000000;">&#40;</span> cCLSID <span style="color: #000000;">&#41;</span> <br />&nbsp;cFile &nbsp;= AnsiToWide<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <br /><br />&nbsp;GdiPlusImageSave<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBmp</span>, cFile, cCLSID <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GDIBmp<br /><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBmp</span> = <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> GDIPlusConvertImage<span style="color: #000000;">&#40;</span> cImageIni, cImageEnd <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> cExtIni := Upper<span style="color: #000000;">&#40;</span>cFileExt<span style="color: #000000;">&#40;</span> cImageIni <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> cExtEnd := Upper<span style="color: #000000;">&#40;</span>cFileExt<span style="color: #000000;">&#40;</span> cImageEnd <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oImage<br /><span style="color: #00C800;">local</span> nScan <br /><br /><span style="color: #00C800;">if</span> cImageIni == cImageEnd<br />&nbsp; &nbsp;<span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Error. La imagen inicial y final son la misma"</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">Return</span> .f.<br /><span style="color: #00C800;">endif</span><br /><br />oImage:= GDIBmp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cImageIni <span style="color: #000000;">&#41;</span><br /><br />&nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nScan:= aScan<span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">aExtIni</span>, cExtIni <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span> <br />&nbsp; &nbsp; <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">" el archivo "</span>+ cImageIni + <span style="color: #ff0000;">" tiene un formato no soportado"</span><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> .f.<br />&nbsp;<span style="color: #00C800;">endif</span> <br />&nbsp; <br />&nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nScan:= aScan<span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">aExtEnd</span>, cExtEnd <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span> <br />&nbsp; &nbsp; <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">" el archivo "</span>+ cImageEnd + <span style="color: #ff0000;">" tiene un formato no soportado"</span><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> .f.<br />&nbsp;<span style="color: #00C800;">endif</span> <br />&nbsp;<br />oImage:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span> cImageEnd <span style="color: #000000;">&#41;</span><br />oImage:<span style="color: #000000;">Destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />&nbsp;</div>[/code:2jvqr3au] el archivo gdiplus.cpp [code=fw:2jvqr3au]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">// GdiPlus support (c) FiveTech Software</span><br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <gdiplus.h><br /><br /><br /><br />using namespace Gdiplus;<br /><br />GdiplusStartupInput gdiplusStartupInput;<br />ULONG_PTR &nbsp; gdiplusToken;<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNEWGRAPHICS <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> Graphics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HDC <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDELETEGRAPHICS <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;delete <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSHIGHQUALITY <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;graphics->SetSmoothingMode<span style="color: #000000;">&#40;</span> SmoothingModeHighQuality <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNORMALQUALITY <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;graphics->SetSmoothingMode<span style="color: #000000;">&#40;</span> SmoothingModeDefault <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNEWPEN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Color</span> clr = <span style="color: #0000ff;">Color</span><span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> Pen<span style="color: #000000;">&#40;</span> clr <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPENSIZE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;pen->SetWidth<span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPENSETCLR <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">Color</span> clr = <span style="color: #0000ff;">Color</span><span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;hb_retni<span style="color: #000000;">&#40;</span> pen->SetColor<span style="color: #000000;">&#40;</span> clr <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPENSTYLE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;pen->SetLineCap<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> LineCap <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> LineCap <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> DashCap <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSALIGN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;pen->SetAlignment<span style="color: #000000;">&#40;</span>PenAlignmentInset<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNOALIGN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;pen->SetAlignment<span style="color: #000000;">&#40;</span>PenAlignmentCenter<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDELETEPEN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;delete <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSNEWSOLIDBRUSH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Color</span> clr = <span style="color: #0000ff;">Color</span><span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> SolidBrush<span style="color: #000000;">&#40;</span> clr <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDELETEBRUSH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;delete <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Brush</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWLINE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">// if pen-object</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; graphics->DrawLine<span style="color: #000000;">&#40;</span> pen, <span style="color: #000000;">&#40;</span> float <span style="color: #000000;">&#41;</span> hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> float <span style="color: #000000;">&#41;</span> hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> float <span style="color: #000000;">&#41;</span> hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> float <span style="color: #000000;">&#41;</span> hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWRECT <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;<span style="color: #B900B9;">// &nbsp;Pen * pen = ( Pen * ) hb_parnl( 2 );</span><br />&nbsp; &nbsp;float nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nWidth = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nHeight = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">// if brush-object</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Brush</span> * <span style="color: #0000ff;">brush</span> = <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Brush</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp;graphics->FillRectangle<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">brush</span>, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">//if pen-object</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp;graphics->DrawRectangle<span style="color: #000000;">&#40;</span> pen, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWELLIPSE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;<span style="color: #B900B9;">// &nbsp;Pen * pen = ( Pen * ) hb_parnl( 2 );</span><br />&nbsp; &nbsp;float nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nWidth = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nHeight = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">//if brush-object</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Brush</span> * <span style="color: #0000ff;">brush</span> = <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Brush</span> * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; graphics->FillEllipse<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">brush</span>, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">//if pen-object</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp;graphics->DrawEllipse<span style="color: #000000;">&#40;</span> pen, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">/*<br />HB_FUNC( GDIPLUSDRAWTEXT )<br />{<br />&nbsp; &nbsp; Graphics * graphics = ( Graphics * ) hb_parnl( 1 );<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <br />//&nbsp; if HB_ISNUM( 3 ) &nbsp; //if brush-object<br />&nbsp;// &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; Brush * brush = ( Brush * ) hb_parnl( 3 );<br />&nbsp; // &nbsp;}<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;graphics->DrawString(hb_parc(2) , -1,NUL,NUL,NUL, brush );<br />&nbsp; &nbsp; &nbsp;<br />}<br />*/</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSCREATEPATH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">new</span> GraphicsPath<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPATHSTARTFIGURE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;graphicPath->StartFigure<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDELETEPATH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;delete <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPATHADDLINE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;int nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nRight = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nBottom = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;graphicPath->AddLine<span style="color: #000000;">&#40;</span> &nbsp;nLeft, nTop, nRight, nBottom <span style="color: #000000;">&#41;</span> ;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPATHADDRECTANGLE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;int nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nRight = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nBottom = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; <br />&nbsp; &nbsp;Rect pathRect = Rect<span style="color: #000000;">&#40;</span> &nbsp;nLeft, nTop, nRight, nBottom &nbsp;<span style="color: #000000;">&#41;</span>;<br />&nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;graphicPath->AddRectangle<span style="color: #000000;">&#40;</span> pathRect <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPATHADDARC <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;int nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nRight = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;int nBottom = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float startAngle = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float sweepAngle = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;Rect pathRect = Rect<span style="color: #000000;">&#40;</span> &nbsp;nLeft, nTop, nRight, nBottom &nbsp;<span style="color: #000000;">&#41;</span>;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;graphicPath->AddArc<span style="color: #000000;">&#40;</span> pathRect, startAngle, sweepAngle <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSPATHCLOSEFIGURE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;graphicPath->CloseFigure<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWPATH <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;GraphicsPath * graphicPath = <span style="color: #000000;">&#40;</span> GraphicsPath * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;<br />&nbsp;graphics->DrawPath<span style="color: #000000;">&#40;</span> pen, graphicPath <span style="color: #000000;">&#41;</span>;<br />&nbsp;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSCREATEPOINTF <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;float nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span><span style="color: #00C800;">new</span> PointF<span style="color: #000000;">&#40;</span> nLeft , nTop <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp;<br />&nbsp;<br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWARC <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />&nbsp; &nbsp; Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; Pen * pen = <span style="color: #000000;">&#40;</span> Pen * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;float nLeft = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nTop = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nWidth = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float nHeight = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float startAngle = &nbsp;hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;float sweepAngle = hb_parnd<span style="color: #000000;">&#40;</span> <span style="color: #000000;">8</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; <br />&nbsp; &nbsp;<span style="color: #B900B9;">// Draw the arc.</span><br />&nbsp; &nbsp;graphics->DrawArc<span style="color: #000000;">&#40;</span> pen, nLeft, nTop, nWidth, nHeight, startAngle, sweepAngle<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span> <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSSTARTUP <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;hb_retl<span style="color: #000000;">&#40;</span> GdiplusStartup<span style="color: #000000;">&#40;</span> &gdiplusToken, &gdiplusStartupInput, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSSHUTDOWN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;GdiplusShutdown<span style="color: #000000;">&#40;</span> gdiplusToken <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> SETPAGEUNIT2PIXEL <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;graphics->SetPageUnit<span style="color: #000000;">&#40;</span> UnitPixel <span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// Unit to Pixel</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSCREATEIMAGEFROMFILE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />&nbsp; &nbsp; Bitmap * newImage = &nbsp;<span style="color: #00C800;">new</span> Bitmap<span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #000000;">&#40;</span>LPCWSTR<span style="color: #000000;">&#41;</span> hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span>; &nbsp;<br />&nbsp; hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> newImage <span style="color: #000000;">&#41;</span>;<br />&nbsp;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSCREATEIMAGEFROMRES <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />&nbsp; &nbsp; Bitmap * newImage = &nbsp;<span style="color: #00C800;">new</span> Bitmap<span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #000000;">&#40;</span>HBITMAP<span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span>HPALETTE<span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span>; &nbsp;<br />&nbsp; hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> newImage <span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSDRAWIMAGE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />&nbsp; &nbsp; int iParams = hb_pcount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; Graphics * graphics = <span style="color: #000000;">&#40;</span> Graphics * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; Bitmap * newImage = <span style="color: #000000;">&#40;</span> Bitmap * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; int nLeft ;<br />&nbsp; int nTop ;<br />&nbsp; int nWidth ;<br />&nbsp; int nHeight;<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">switch</span> <span style="color: #000000;">&#40;</span>iParams<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> <span style="color: #000000;">4</span>:<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">nLeft</span> = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; nTop = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; graphics->DrawImage<span style="color: #000000;">&#40;</span> newImage, nLeft, nTop <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">case</span> <span style="color: #000000;">6</span>:<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">nLeft</span> = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;nTop = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;nWidth = &nbsp;hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;nHeight = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; graphics->DrawImage<span style="color: #000000;">&#40;</span> newImage, nLeft, nTop,nWidth,nHeight<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSIMAGESAVE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />&nbsp; Bitmap * newImage = <span style="color: #000000;">&#40;</span> Bitmap * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; CLSID cClsid ;<br />&nbsp; LPWSTR file = <span style="color: #000000;">&#40;</span>LPWSTR<span style="color: #000000;">&#41;</span> hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; LPWSTR identificador = &nbsp;<span style="color: #000000;">&#40;</span>LPWSTR<span style="color: #000000;">&#41;</span> hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; CLSIDFromString<span style="color: #000000;">&#40;</span> identificador, &cClsid <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp;newImage->Save<span style="color: #000000;">&#40;</span> file , &cClsid, <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />&nbsp;</div>[/code:2jvqr3au]
documentacion de funciones gdi+
el ejemplo gdiplus3.prg [code=fw:fccv4yqd]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// GdiPlus example following Microsoft tutorial:</span><br /><span style="color: #B900B9;">// <!-- m --><a class="postlink" href="http://msdn.microsoft.com/en-us/library/ms533895(v=VS.85">http://msdn.microsoft.com/en-us/library ... 95(v=VS.85</a><!-- m -->).aspx</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /> <br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oWnd<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Testing GDI+ Class"</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">5</span>,<span style="color: #000000;">5</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">800</span> <span style="color: #0000ff;">PIXEL</span><br /> <span style="color: #B900B9;">//  ownd:setcolor(nrgb(120,120,120),nrgb(120,120,120))</span><br /><br />   <br />   @<span style="color: #000000;">28</span>,<span style="color: #000000;">4</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"rectangle"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">Action</span> Drawrectangle<span style="color: #000000;">&#40;</span>ownd<span style="color: #000000;">&#41;</span><br />   @<span style="color: #000000;">28</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"roundrect"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">Action</span> Drawroundrect<span style="color: #000000;">&#40;</span>ownd<span style="color: #000000;">&#41;</span><br />   @<span style="color: #000000;">28</span>,<span style="color: #000000;">44</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"drawImage"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">Action</span> DrawImage<span style="color: #000000;">&#40;</span>ownd<span style="color: #000000;">&#41;</span><br />   @<span style="color: #000000;">28</span>,<span style="color: #000000;">64</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"drawEllipse"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">Action</span> DrawEllipse<span style="color: #000000;">&#40;</span>ownd<span style="color: #000000;">&#41;</span> <br />   @<span style="color: #000000;">28</span>,<span style="color: #000000;">84</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"drawlight"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">Action</span> Drawlight<span style="color: #000000;">&#40;</span>ownd<span style="color: #000000;">&#41;</span>  <br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Drawrectangle<span style="color: #000000;">&#40;</span>ownd<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> hdc:= oWnd:<span style="color: #000000;">getdc</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oGraphics := Graphics<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> ownd:<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">local</span> oPen := Pen<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span> , <span style="color: #000000;">10</span> , .T.<span style="color: #000000;">&#41;</span><br />      oGraphics:<span style="color: #000000;">DrawRect</span><span style="color: #000000;">&#40;</span> oPen,  , <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span>, <span style="color: #000000;">70</span>, <span style="color: #000000;">60</span> <span style="color: #000000;">&#41;</span><br />      <br />      oGraphics:<span style="color: #000000;">destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <br />      oWnd:<span style="color: #000000;">releasedc</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> Drawroundrect<span style="color: #000000;">&#40;</span>ownd<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> hdc:= oWnd:<span style="color: #000000;">getdc</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oGraphics := Graphics<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> ownd:<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span> <br /> <span style="color: #00C800;">local</span> oPen2 := Pen<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> , <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br /> <span style="color: #00C800;">local</span> oPath:= Path<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /> <br />      oPath:<span style="color: #000000;">AddRoundRect</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">30</span> , <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span> , <span style="color: #000000;">9</span>  <span style="color: #000000;">&#41;</span><br />      <br />      oGraphics:<span style="color: #000000;">DrawPath</span><span style="color: #000000;">&#40;</span> oPen2, oPath <span style="color: #000000;">&#41;</span>  <br />       <br />       oGraphics:<span style="color: #000000;">destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />               <br />      oWnd:<span style="color: #000000;">releasedc</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> DrawImage<span style="color: #000000;">&#40;</span>ownd<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> hdc:= oWnd:<span style="color: #000000;">getdc</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oGraphics := Graphics<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> ownd:<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">local</span> oImage:= GDIBmp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"C:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\p</span>ngs<span style="color: #000000;">\i</span>mage2.png"</span> <span style="color: #000000;">&#41;</span> <br /><br />      oGraphics:<span style="color: #000000;">DrawImage</span><span style="color: #000000;">&#40;</span> oImage , <span style="color: #000000;">60</span> ,<span style="color: #000000;">60</span> <span style="color: #000000;">&#41;</span><br />      <br />      oGraphics:<span style="color: #000000;">destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />                <br />      oWnd:<span style="color: #000000;">releasedc</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> DrawEllipse<span style="color: #000000;">&#40;</span>ownd<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> hdc:= oWnd:<span style="color: #000000;">getdc</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oGraphics := Graphics<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> ownd:<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">local</span> oBrush2 := <span style="color: #0000ff;">Brush</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">NewSolidBrush</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">167</span> <span style="color: #000000;">&#41;</span><br /> <span style="color: #00C800;">local</span> oPen2 := Pen<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> , <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br /> <br />       oGraphics:<span style="color: #000000;">DrawEllipse</span><span style="color: #000000;">&#40;</span> oPen2, oBrush2  , <span style="color: #000000;">500</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">60</span>, <span style="color: #000000;">60</span> <span style="color: #000000;">&#41;</span><br />      <br />      oGraphics:<span style="color: #000000;">destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />                <br />      oWnd:<span style="color: #000000;">releasedc</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> Drawlight<span style="color: #000000;">&#40;</span>ownd<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> hdc:= oWnd:<span style="color: #000000;">getdc</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oGraphics := Graphics<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> ownd:<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">local</span> oPen<br /><span style="color: #00C800;">local</span> n<br /><br />  oPen := Pen<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>  <span style="color: #000000;">255</span> , <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> , <span style="color: #000000;">0</span> , .T.<span style="color: #000000;">&#41;</span><br />  oGraphics:<span style="color: #000000;">DrawRoundRect</span><span style="color: #000000;">&#40;</span> oPen, , <span style="color: #000000;">400</span> , <span style="color: #000000;">200</span>,  <span style="color: #000000;">100</span> , <span style="color: #000000;">150</span>  <span style="color: #000000;">&#41;</span><br />    <br />  oPen:<span style="color: #000000;">setColor</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span> , <span style="color: #000000;">214</span>, <span style="color: #000000;">234</span>, <span style="color: #000000;">249</span> <span style="color: #000000;">&#41;</span><br />  <br />  oPen:<span style="color: #000000;">setsize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <br /><br />  <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">10</span> <br />      oPen:<span style="color: #000000;">setcolor</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>-n*<span style="color: #000000;">25</span> , <span style="color: #000000;">214</span>, <span style="color: #000000;">234</span>, <span style="color: #000000;">249</span> <span style="color: #000000;">&#41;</span> <br />                    <br />      oGraphics:<span style="color: #000000;">DrawRoundRect</span><span style="color: #000000;">&#40;</span> oPen, , <span style="color: #000000;">400</span>-n , <span style="color: #000000;">200</span>-n,  <span style="color: #000000;">100</span>+n*<span style="color: #000000;">2</span> , <span style="color: #000000;">150</span>+ n*<span style="color: #000000;">2</span>  <span style="color: #000000;">&#41;</span><br />              <br />    <span style="color: #00C800;">next</span><br />     open:<span style="color: #000000;">destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <br /> <br /> oGraphics:<span style="color: #000000;">destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />               <br /> oWnd:<span style="color: #000000;">releasedc</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:fccv4yqd]
documentacion de funciones gdi+
Manuel, Añadido a FWH y probado, todo ok <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Muchisimas gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
documentacion de funciones gdi+
Manuel, ¿Cómo se compila gdiplus.cpp con bcc582? Como un prg con #pragma o necesita algunos parámetros ?
documentacion de funciones gdi+
[quote="jmartial":3tptnpo5]Manuel, ¿Cómo se compila gdiplus.cpp con bcc582? Como un prg con #pragma o necesita algunos parámetros ?[/quote:3tptnpo5] gdiplus.cpp ya viene includo en las librerías de fwh por defecto, y no necesitas hacer nada para usarlo . Si le haces alguna modificación al fichero gdiplus.cpp solo tienes que incluirlo al compilar como si fuera un archivo c mas . Yo para las pruebas tengo un buildh.bat modificado que he llamado buildhgdi.bat con una linea modificada ... echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include -I%bcdir%\include\dinkumware %1.c gdiplus.cpp > b32.bc y luego al linkar ... echo %1.obj gdiplus.obj tgdiplus.obj , + >> b32.bc
documentacion de funciones gdi+
Ok! Gracias Manuel, lo pruebo.
documentacion de funciones gdi+
[quote="jmartial":1zhj8zwr]Ok! Gracias Manuel, lo pruebo.[/quote:1zhj8zwr] Coloca esta función dentro del gdiplus.cpp ... [code=fw:1zhj8zwr]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSHBMPFROMFILE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br /><br />&nbsp; FILE * fil = fopen <span style="color: #000000;">&#40;</span> &nbsp;hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> , <span style="color: #ff0000;">"rb"</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; fseek <span style="color: #000000;">&#40;</span> fil , <span style="color: #000000;">0</span> , SEEK_END <span style="color: #000000;">&#41;</span> ;<br />&nbsp; int filesize = ftell <span style="color: #000000;">&#40;</span> fil <span style="color: #000000;">&#41;</span> ;<br /><br />&nbsp; fseek <span style="color: #000000;">&#40;</span> fil , <span style="color: #000000;">0</span> , SEEK_SET <span style="color: #000000;">&#41;</span> ;<br />&nbsp; HGLOBAL hglobal = GlobalAlloc <span style="color: #000000;">&#40;</span> GMEM_MOVEABLE , filesize <span style="color: #000000;">&#41;</span> ;<br /><br />&nbsp; char * adr = <span style="color: #000000;">&#40;</span>char *<span style="color: #000000;">&#41;</span>GlobalLock <span style="color: #000000;">&#40;</span> hglobal <span style="color: #000000;">&#41;</span> ;<br />&nbsp; int nbytes = fread <span style="color: #000000;">&#40;</span> adr , <span style="color: #000000;">1</span> , filesize , fil <span style="color: #000000;">&#41;</span> ;<br />&nbsp; fclose <span style="color: #000000;">&#40;</span> fil <span style="color: #000000;">&#41;</span> ;<br /><br />&nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nbytes != filesize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;MessageBox<span style="color: #000000;">&#40;</span> GetActiveWindow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"fallo"</span>, <span style="color: #ff0000;">"No carga la imagen"</span>, 0x30 <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span> ;<br /><br />&nbsp; LPSTREAM pstm = <span style="color: #00C800;">NULL</span> ;<br />&nbsp; GlobalUnlock <span style="color: #000000;">&#40;</span> hglobal <span style="color: #000000;">&#41;</span> ;<br /><br />&nbsp;CreateStreamOnHGlobal <span style="color: #000000;">&#40;</span> hglobal, <span style="color: #00C800;">TRUE</span>, &pstm <span style="color: #000000;">&#41;</span> ;<br /><br />&nbsp;Bitmap &nbsp;*original = <span style="color: #00C800;">new</span> &nbsp;Bitmap<span style="color: #000000;">&#40;</span> pstm,<span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp;HBITMAP &nbsp; handle;<br />&nbsp;original->GetHBITMAP<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Color</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, &handle <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp;delete original ;<br />&nbsp;pstm->Release<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp;GlobalFree<span style="color: #000000;">&#40;</span> hglobal <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> handle <span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><br /><br /><br />&nbsp;</div>[/code:1zhj8zwr]
documentacion de funciones gdi+
el dialogo esta construido desde código o desde recursos ? . Lo pregunto para ver que es lo que tienes que cambiar en tu archivo bitmap.prg . Coloca también en alguno de tus prgs ( por ejemplo en el bitmap.prg que tendremos que modificar un poco ) la siguiente función : [code=fw:33ds7k5q]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> cGetBmpName<span style="color: #000000;">&#40;</span> cBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aName:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aToken<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nLen<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ValType<span style="color: #000000;">&#40;</span> cBmp <span style="color: #000000;">&#41;</span> != <span style="color: #ff0000;">"N"</span><br /><br />&nbsp; &nbsp; &nbsp; aToken:= hb_atokens<span style="color: #000000;">&#40;</span>cBmp,<span style="color: #ff0000;">"|"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nLen := Len<span style="color: #000000;">&#40;</span>aToken <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> nLen == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aName:= <span style="color: #000000;">&#123;</span> cBmp , <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; ELSEIF nLen == <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aName:= <span style="color: #000000;">&#123;</span> AllTrim<span style="color: #000000;">&#40;</span>aToken<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> , Val<span style="color: #000000;">&#40;</span>aToken<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>, &nbsp;<span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; ELSEIF nLen == <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aName:= <span style="color: #000000;">&#123;</span> AllTrim<span style="color: #000000;">&#40;</span>aToken<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> , Val<span style="color: #000000;">&#40;</span>aToken<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>, &nbsp; Val<span style="color: #000000;">&#40;</span>aToken<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aName:= &nbsp;<span style="color: #000000;">&#123;</span> AllTrim<span style="color: #000000;">&#40;</span>aToken<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> , <span style="color: #00C800;">nil</span> , &nbsp;<span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; aName:= <span style="color: #000000;">&#123;</span> cBmp , <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp;<span style="color: #00C800;">RETURN</span> aName<br /><br />&nbsp;</div>[/code:33ds7k5q]
documentacion de funciones gdi+
Nueva version de la función anterior mas completa .... [code=fw:uvb3rh6h]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GDIPLUSHBMPFROMFILE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br /><br />FILE * fil = fopen <span style="color: #000000;">&#40;</span> &nbsp;hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> , <span style="color: #ff0000;">"rb"</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; fseek <span style="color: #000000;">&#40;</span> fil , <span style="color: #000000;">0</span> , SEEK_END <span style="color: #000000;">&#41;</span> ;<br />&nbsp; int filesize = ftell <span style="color: #000000;">&#40;</span> fil <span style="color: #000000;">&#41;</span> ;<br /><br />&nbsp; fseek <span style="color: #000000;">&#40;</span> fil , <span style="color: #000000;">0</span> , SEEK_SET <span style="color: #000000;">&#41;</span> ;<br />&nbsp; HGLOBAL hglobal = GlobalAlloc <span style="color: #000000;">&#40;</span> GMEM_MOVEABLE , filesize <span style="color: #000000;">&#41;</span> ;<br /><br />&nbsp; char * adr = <span style="color: #000000;">&#40;</span>char *<span style="color: #000000;">&#41;</span>GlobalLock <span style="color: #000000;">&#40;</span> hglobal <span style="color: #000000;">&#41;</span> ;<br />&nbsp; int nbytes = fread <span style="color: #000000;">&#40;</span> adr , <span style="color: #000000;">1</span> , filesize , fil <span style="color: #000000;">&#41;</span> ;<br />&nbsp; fclose <span style="color: #000000;">&#40;</span> fil <span style="color: #000000;">&#41;</span> ;<br /><br />&nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nbytes != filesize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;MessageBox<span style="color: #000000;">&#40;</span> GetActiveWindow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"fallo"</span>, <span style="color: #ff0000;">"No carga la imagen"</span>, 0x30 <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span> ;<br /><br />&nbsp;LPSTREAM pstm = <span style="color: #00C800;">NULL</span> ;<br />&nbsp;GlobalUnlock <span style="color: #000000;">&#40;</span> hglobal <span style="color: #000000;">&#41;</span> ;<br /><br />&nbsp;CreateStreamOnHGlobal <span style="color: #000000;">&#40;</span> hglobal, <span style="color: #00C800;">TRUE</span>, &pstm <span style="color: #000000;">&#41;</span> ;<br /><br />&nbsp;Bitmap &nbsp;*original = <span style="color: #00C800;">new</span> &nbsp;Bitmap<span style="color: #000000;">&#40;</span> pstm,<span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp;int nWidth &nbsp;= hb_parni<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp;int nHeight = hb_parni<span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span> ;<br /><br />&nbsp;Bitmap* newImage &nbsp;= <span style="color: #00C800;">new</span> Bitmap<span style="color: #000000;">&#40;</span> nWidth, nHeight, original->GetPixelFormat<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp;Graphics * graphics = <span style="color: #00C800;">new</span> Graphics<span style="color: #000000;">&#40;</span> newImage <span style="color: #000000;">&#41;</span>;<br />&nbsp;graphics->DrawImage<span style="color: #000000;">&#40;</span> original ,<span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, nWidth, nHeight<span style="color: #000000;">&#41;</span>;<br /><br />HBITMAP &nbsp; handle;<br />&nbsp;newImage->GetHBITMAP<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Color</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, &handle <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp;delete graphics ;<br />&nbsp;delete original ;<br />delete newImage ;<br />&nbsp;pstm->Release<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp;GlobalFree<span style="color: #000000;">&#40;</span> hglobal <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> handle <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp;</div>[/code:uvb3rh6h]
documentation for hb_zip*
Here it is: [code=fw:357ejo9z]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br />&nbsp;* $DOC$<br />&nbsp;* $FUNCNAME$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_ZIPFILE()<br />&nbsp;* $CATEGORY$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Zip Functions<br />&nbsp;* $ONELINER$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Create a zip file<br />&nbsp;* $SYNTAX$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_ZIPFILE( <cFile>, <cFileToCompress> | <aFiles>, <nLevel>,<br />&nbsp;* &nbsp; &nbsp; &nbsp;<bBlock>, <lOverWrite>, <cPassword>, <lWithPath>, <lWithDrive>,<br />&nbsp;* &nbsp; &nbsp; &nbsp;<pFileProgress> ) ---> lCompress<br />&nbsp;* $ARGUMENTS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cFile> &nbsp; Name of the zip file to create<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cFileToCompress> &nbsp;Name of a file to Compress, Drive and/or path<br />&nbsp;* &nbsp; &nbsp; &nbsp;can be used<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; _or_<br />&nbsp;* &nbsp; &nbsp; &nbsp;<aFiles> &nbsp;An array containing files to compress, Drive and/or path<br />&nbsp;* &nbsp; &nbsp; &nbsp;can be used<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<nLevel> &nbsp;Compression level ranging from 0 to 9<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<bBlock> &nbsp;Code block to execute while compressing<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lOverWrite> &nbsp;Toggle to overwrite the file if exists<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cPassword> Password to encrypt the files<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lWithPath> Toggle to store the path or not<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lWithDrive> Toggle to store the Drive letter and path or not<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<pFileProgress> Code block for File Progress<br />&nbsp;* $RETURNS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lCompress> &nbsp;.t. if file was create, otherwise .f.<br />&nbsp;* $DESCRIPTION$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function creates a zip file named <cFile>. If the extension<br />&nbsp;* &nbsp; &nbsp; &nbsp;is omitted, .ZIP will be assumed. If the second parameter is a<br />&nbsp;* &nbsp; &nbsp; &nbsp;character string, this file will be added to the zip file. If the<br />&nbsp;* &nbsp; &nbsp; &nbsp;second parameter is an array, all file names contained in <aFiles><br />&nbsp;* &nbsp; &nbsp; &nbsp;will be compressed.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <nLevel> is used, it determines the compression type where 0 means<br />&nbsp;* &nbsp; &nbsp; &nbsp;no compression and 9 means best compression.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <bBlock> is used, every time the file is opened to compress it<br />&nbsp;* &nbsp; &nbsp; &nbsp;will evaluate bBlock. Parameters of bBlock are cFile and nPos.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <lOverWrite> is used, it toggles to overwrite or not the existing<br />&nbsp;* &nbsp; &nbsp; &nbsp;file. Default is to overwrite the file,otherwise if <lOverWrite> is false<br />&nbsp;* &nbsp; &nbsp; &nbsp;the new files are added to the <cFile>.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <cPassword> is used, all files that are added to the archive are encrypted<br />&nbsp;* &nbsp; &nbsp; &nbsp;with the password.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <lWithPath> is used, it tells &nbsp;the path should also be stored with<br />&nbsp;* &nbsp; &nbsp; &nbsp;the file name. Default is false.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <lWithDrive> is used, it tells thats the Drive and path should also be stored<br />&nbsp;* &nbsp; &nbsp; &nbsp;with the file name. Default is false.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <pFileProgress> is used, an Code block is evaluated, showing the total<br />&nbsp;* &nbsp; &nbsp; &nbsp;of that file has being processed.<br />&nbsp;* &nbsp; &nbsp; &nbsp;The codeblock must be defined as follow {|nPos,nTotal| GaugeUpdate(aGauge1,(nPos/nTotal))}<br />&nbsp;*<br />&nbsp;* $EXAMPLES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;FUNCTION MAIN()<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;IF HB_ZIPFILE( "TEST.ZIP", "TEST.PRG" )<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; qout( "File was successfully created" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;IF HB_ZIPFILE( "TEST1.ZIP", { "TEST.PRG", "c:\windows\win.ini" } )<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; qout( "File was successfully created" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;IF HB_ZIPFILE( "TEST2.ZIP", { "TEST.PRG", "c:\windows\win.ini" }, 9, {|cFile,nPos,| qout(cFile) } )<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; qout( "File was successfully created" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;aFiles := { "TEST.PRG", "c:\windows\win.ini" }<br />&nbsp;* &nbsp; &nbsp; &nbsp;nLen &nbsp; := Len( aFiles )<br />&nbsp;* &nbsp; &nbsp; &nbsp;aGauge := GaugeNew( 5, 5, 7, 40, "W/B", "W+/B" , "²" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;GaugeDisplay( aGauge )<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_ZIPFILE( "test33.zip", aFiles, 9, {|cFile,nPos| GaugeUpdate( aGauge, nPos/nLen ) },, "hello" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;Return Nil<br />&nbsp;* $STATUS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;R<br />&nbsp;* $COMPLIANCE$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function is a Harbour extension<br />&nbsp;* $PLATFORMS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;All<br />&nbsp;* $FILES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Library is hbzip.lib<br />&nbsp;* $END$<br />&nbsp;*/</span><br /><br /><span style="color: #B900B9;">/*<br />&nbsp;* $DOC$<br />&nbsp;* $FUNCNAME$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_UNZIPFILE()<br />&nbsp;* $CATEGORY$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Zip Functions<br />&nbsp;* $ONELINER$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Unzip a compressed file<br />&nbsp;* $SYNTAX$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_UNZIPFILE( <cFile>, <bBlock>, <lWithPath>, <cPassWord>, <cPath>,<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cFile> | <aFile>, <pFileProgress> ) ---> lCompress<br />&nbsp;* $ARGUMENTS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cFile> &nbsp; Name of the zip file to extract<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<bBlock> &nbsp;Code block to execute while extracting<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lWithPath> Toggle to create directory if needed<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cPassWord> Password to use to extract files<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cPath> &nbsp; &nbsp;Path to extract the files to - mandatory<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cFile> | <aFiles> A File or Array of files to extract - mandatory<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<pFileProgress> Code block for File Progress<br />&nbsp;* $RETURNS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lCompress> &nbsp;.t. if all file was successfully restored, otherwise .f.<br />&nbsp;* $DESCRIPTION$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function restores all files contained inside the <cFile>.<br />&nbsp;* &nbsp; &nbsp; &nbsp;If the extension is omitted, .ZIP will be assumed. If a file already<br />&nbsp;* &nbsp; &nbsp; &nbsp;exists, it will be overwritten.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <bBlock> is used, every time the file is opened to compress it<br />&nbsp;* &nbsp; &nbsp; &nbsp;will evaluate bBlock. Parameters of bBlock are cFile and nPos.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;The <cPath> is a mandatory parameter. Set to ".\" to extract to the<br />&nbsp;* &nbsp; &nbsp; &nbsp;current directory<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <cFile> or <aFiles> are not provided, no files will be extracted!<br />&nbsp;* &nbsp; &nbsp; &nbsp;Make sure you provide the file or files you want extracted<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <pFileProgress> is used, an Code block is evaluated, showing the total<br />&nbsp;* &nbsp; &nbsp; &nbsp;of that file has being processed.<br />&nbsp;* &nbsp; &nbsp; &nbsp;The codeblock must be defined as follow {|nPos,nTotal| GaugeUpdate(aGauge1,(nPos/nTotal))}<br />&nbsp;* $EXAMPLES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;FUNCTION MAIN()<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;aExtract := hb_GetFilesInZip( "TEST.ZIP" ) &nbsp;// extract all files in zip<br />&nbsp;* &nbsp; &nbsp; &nbsp;IF HB_UNZIPFILE( "TEST.ZIP",,,, ".\", aExtract )<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; qout("File was successfully extracted")<br />&nbsp;* &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;aExtract := hb_GetFilesInZip( "TEST2.ZIP" ) &nbsp;// extract all files in zip<br />&nbsp;* &nbsp; &nbsp; &nbsp;IF HB_UNZIPFILE( "TEST2.ZIP", {|cFile| qout( cFile ) },,, ".\", aExtract )<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; qout("File was successfully extracted")<br />&nbsp;* &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp;* &nbsp; &nbsp; &nbsp;Return Nil<br />&nbsp;* $STATUS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;R<br />&nbsp;* $COMPLIANCE$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function is a Harbour extension<br />&nbsp;* $PLATFORMS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;All<br />&nbsp;* $FILES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Library is hbzip.lib<br />&nbsp;* $END$<br />&nbsp;*/</span><br /><br /><span style="color: #B900B9;">/*<br />&nbsp;* $DOC$<br />&nbsp;* $FUNCNAME$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_GETUNZIPFILE()<br />&nbsp;* $CATEGORY$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Zip Functions<br />&nbsp;* $ONELINER$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Gets the number of files that are in the zipfile<br />&nbsp;* $SYNTAX$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_GETUNZIPFILE( <cFile> ) ---> nNumber<br />&nbsp;* $ARGUMENTS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cFile> &nbsp; Name of the zip file<br />&nbsp;* $RETURNS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<nNumber> &nbsp;The number of files contained inside the zipfile<br />&nbsp;* $DESCRIPTION$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function returns the number of files that is stored in the zipfile.<br />&nbsp;* &nbsp; &nbsp; &nbsp;The purpose for this function is to use in conjunction with the<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_UNZIPFILE() function, so you can use returned result in the code<br />&nbsp;* &nbsp; &nbsp; &nbsp;block. See example below.<br />&nbsp;* $EXAMPLES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;FUNCTION MAIN()<br />&nbsp;* &nbsp; &nbsp; &nbsp;Local nFiles := HB_GETUNZIPFILE( "test.zip" )<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;if nFiles > 0<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; ? "This files Contains ", nfiles<br />&nbsp;* &nbsp; &nbsp; &nbsp;endif<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;Return Nil<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;Here is an example of How to use HB_GETUNZIPFILE() in conjunction<br />&nbsp;* &nbsp; &nbsp; &nbsp;with HB_UNZIPFILE()<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;Function Main()<br />&nbsp;* &nbsp; &nbsp; &nbsp;Local aGauge, nLen<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;aGauge := GaugeNew( 5, 5, 7, 40, "W/B", "W+/B" ,"²" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;GaugeDisplay( aGauge )<br />&nbsp;* &nbsp; &nbsp; &nbsp;nLen := HB_GETUNZIPFILE( "test22" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_UNZIPFILE( "test22", {|cFile,nPos| GaugeUpdate( aGauge, nPos/nLen ), qout(cFile) }, .t. )<br />&nbsp;* &nbsp; &nbsp; &nbsp;Return Nil<br />&nbsp;* $STATUS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;R<br />&nbsp;* $COMPLIANCE$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function is a Harbour extension<br />&nbsp;* $PLATFORMS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;All<br />&nbsp;* $FILES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Library is hbzip.lib<br />&nbsp;* $END$<br />&nbsp;*/</span><br /><br /><span style="color: #B900B9;">/*<br />&nbsp;* $DOC$<br />&nbsp;* $FUNCNAME$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_ZIPFILEBYTDSPAN()<br />&nbsp;* $CATEGORY$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Zip Functions<br />&nbsp;* $ONELINER$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Create a zip file<br />&nbsp;* $SYNTAX$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_ZIPFILEBYTDSPAN( <cFile> ,<cFileToCompress> | <aFiles>, <nLevel>,<br />&nbsp;* &nbsp; &nbsp; &nbsp;<bBlock>, <lOverWrite>, <cPassword>, <iSize>, <lWithPath>, <lWithDrive>,<br />&nbsp;* &nbsp; &nbsp; &nbsp;<pFileProgress>) ---> lCompress<br />&nbsp;* $ARGUMENTS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cFile> &nbsp; Name of the zip file<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cFileToCompress> &nbsp;Name of a file to Compress, Drive and/or path<br />&nbsp;* &nbsp; &nbsp; &nbsp;can be used<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_or_<br />&nbsp;* &nbsp; &nbsp; &nbsp;<aFiles> &nbsp;An array containing files to compress, Drive and/or path<br />&nbsp;* &nbsp; &nbsp; &nbsp;can be used<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<nLevel> &nbsp;Compression level ranging from 0 to 9<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<bBlock> &nbsp;Code block to execute while compressing<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lOverWrite> &nbsp;Toggle to overwrite the file if exists<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cPassword> Password to encrypt the files<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<iSize> Size of the archive, in bytes. Default is 1457664 bytes<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lWithPath> Toggle to store the path or not<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lWithDrive> Toggle to store the Drive letter and path or not<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<pFileProgress> Code block for File Progress<br />&nbsp;* $RETURNS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lCompress> &nbsp;.t. if file was create, otherwise .f.<br />&nbsp;* $DESCRIPTION$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function creates a zip file named <cFile>. If the extension<br />&nbsp;* &nbsp; &nbsp; &nbsp;is omitted, .ZIP will be assumed. If the second parameter is a<br />&nbsp;* &nbsp; &nbsp; &nbsp;character string, this file will be added to the zip file. If the<br />&nbsp;* &nbsp; &nbsp; &nbsp;second parameter is an array, all file names contained in <aFiles><br />&nbsp;* &nbsp; &nbsp; &nbsp;will be compressed.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <nLevel> is used, it determines the compression type where 0 means<br />&nbsp;* &nbsp; &nbsp; &nbsp;no compression and 9 means best compression.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <bBlock> is used, every time the file is opened to compress it<br />&nbsp;* &nbsp; &nbsp; &nbsp;will evaluate bBlock. Parameters of bBlock are cFile and nPos.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <lOverWrite> is used, it toggles to overwrite or not the existing<br />&nbsp;* &nbsp; &nbsp; &nbsp;file. Default is to overwrite the file, otherwise if <lOverWrite> is<br />&nbsp;* &nbsp; &nbsp; &nbsp;false the new files are added to the <cFile>.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <lWithPath> is used, it tells thats the path should also be stored '<br />&nbsp;* &nbsp; &nbsp; &nbsp;with the file name. Default is false.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <lWithDrive> is used, it tells thats the Drive and path should also<br />&nbsp;* &nbsp; &nbsp; &nbsp;be stored with the file name. Default is false.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <pFileProgress> is used, an Code block is evaluated, showing the total<br />&nbsp;* &nbsp; &nbsp; &nbsp;of that file has being processed.<br />&nbsp;* &nbsp; &nbsp; &nbsp;The codeblock must be defined as follow {|nPos,nTotal| GaugeUpdate(aGauge1,(nPos/nTotal))}<br />&nbsp;* $EXAMPLES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;FUNCTION MAIN()<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;IF HB_ZIPFILEBYTDSPAN( "TEST.ZIP", "TEST.PRG" )<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; qout( "File was successfully created" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;IF HB_ZIPFILEBYTDSPAN( "TEST1.ZIP", { "TEST.PRG", "c:\windows\win.ini" } )<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; qout( "File was successfully created" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;IF HB_ZIPFILEBYTDSPAN( "TEST2.ZIP", { "TEST.PRG", "c:\windows\win.ini" }, 9, {|nPos,cFile| qout(cFile) }, "hello",, 521421 )<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; qout("File was successfully created" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;aFiles := { "TEST.PRG", "c:\windows\win.ini" }<br />&nbsp;* &nbsp; &nbsp; &nbsp;nLen &nbsp; := Len( aFiles )<br />&nbsp;* &nbsp; &nbsp; &nbsp;aGauge := GaugeNew( 5, 5, 7, 40, "W/B", "W+/B", "²" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;GaugeDisplay( aGauge )<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_ZIPFILEBYTDSPAN( "test33.zip", aFiles, 9, {|cFile,nPos| GaugeUpdate( aGauge, nPos/nLen) },, "hello",, 6585452 )<br />&nbsp;* &nbsp; &nbsp; &nbsp;Return Nil<br />&nbsp;* $STATUS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;R<br />&nbsp;* $COMPLIANCE$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function is a Harbour extension<br />&nbsp;* $PLATFORMS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;All<br />&nbsp;* $FILES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Library is hbzip.lib<br />&nbsp;* $END$<br />&nbsp;*/</span><br /><br /><br /><span style="color: #B900B9;">/*<br />&nbsp;* $DOC$<br />&nbsp;* $FUNCNAME$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_ZIPFILEBYPKSPAN()<br />&nbsp;* $CATEGORY$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Zip Functions<br />&nbsp;* $ONELINER$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Create a zip file on removable media<br />&nbsp;* $SYNTAX$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_ZIPFILEBYPKSPAN( <cFile>, <cFileToCompress> | <aFiles>, <nLevel>,<br />&nbsp;* &nbsp; &nbsp; &nbsp;<bBlock>, <lOverWrite>, <cPassword>, <lWithPath>, <lWithDrive>,<br />&nbsp;* &nbsp; &nbsp; &nbsp;<pFileProgress>) ---> lCompress<br />&nbsp;* $ARGUMENTS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cFile> &nbsp; Name of the zip file<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cFileToCompress> &nbsp;Name of a file to Compress, Drive and/or path<br />&nbsp;* &nbsp; &nbsp; &nbsp;can be used<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_or_<br />&nbsp;* &nbsp; &nbsp; &nbsp;<aFiles> &nbsp;An array containing files to compress, Drive and/or path<br />&nbsp;* &nbsp; &nbsp; &nbsp;can be used<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<nLevel> &nbsp;Compression level ranging from 0 to 9<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<bBlock> &nbsp;Code block to execute while compressing<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lOverWrite> &nbsp;Toggle to overwrite the file if exists<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cPassword> Password to encrypt the files<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lWithPath> Toggle to store the path or not<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lWithDrive> Toggle to store the Drive letter and path or not<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<pFileProgress> Code block for File Progress<br />&nbsp;* $RETURNS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lCompress> &nbsp;.t. if file was create, otherwise .f.<br />&nbsp;* $DESCRIPTION$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function creates a zip file named <cFile>. If the extension<br />&nbsp;* &nbsp; &nbsp; &nbsp;is omitted, .ZIP will be assumed. If the second parameter is a<br />&nbsp;* &nbsp; &nbsp; &nbsp;character string, this file will be added to the zip file. If the<br />&nbsp;* &nbsp; &nbsp; &nbsp;second parameter is an array, all file names contained in <aFiles><br />&nbsp;* &nbsp; &nbsp; &nbsp;will be compressed. &nbsp;Also, the use of this function is for creating<br />&nbsp;* &nbsp; &nbsp; &nbsp;backup in removable media like an floppy drive/zip drive.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <nLevel> is used, it determines the compression type where 0 means<br />&nbsp;* &nbsp; &nbsp; &nbsp;no compression and 9 means best compression.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <bBlock> is used, every time the file is opened to compress it<br />&nbsp;* &nbsp; &nbsp; &nbsp;will evaluate bBlock. Parameters of bBlock are cFile and nPos.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <lOverWrite> is used , it toggles to overwrite or not the existing<br />&nbsp;* &nbsp; &nbsp; &nbsp;file. Default is to overwrite the file, otherwise if <lOverWrite> is false<br />&nbsp;* &nbsp; &nbsp; &nbsp;the new files are added to the <cFile>.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <cPassword> is used, all files that are added to the archive are encrypted<br />&nbsp;* &nbsp; &nbsp; &nbsp;with the password.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <lWithPath> is used, it tells thats the path should also be stored with<br />&nbsp;* &nbsp; &nbsp; &nbsp;the file name. Default is false.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <lWithDrive> is used, it tells thats the Drive and path should also be stored<br />&nbsp;* &nbsp; &nbsp; &nbsp;with the file name. Default is false.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <pFileProgress> is used, an Code block is evaluated, showing the total<br />&nbsp;* &nbsp; &nbsp; &nbsp;of that file has being processed.<br />&nbsp;* &nbsp; &nbsp; &nbsp;The codeblock must be defined as follow {|nPos,nTotal| GaugeUpdate(aGauge1,(nPos/nTotal))}<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;Before calling this function, Set an Changedisk codeblock by calling<br />&nbsp;* &nbsp; &nbsp; &nbsp;the HB_SETDISKZIP().<br />&nbsp;* $EXAMPLES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;FUNCTION MAIN()<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;hb_setdiskzip( {|nDisk| Alert( "Please insert disk no " + Str( nDisk, 3 ) ) } )<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;IF HB_ZIPFILEBYPKSPAN( "a:\TEST.ZIP", "TEST.PRG" )<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; qout( "File was successfully created" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;IF HB_ZIPFILEBYPKSPAN( "a:\TEST1.ZIP", { "TEST.PRG", "c:\windows\win.ini" } )<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; qout( "File was successfully created" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;IF HB_ZIPFILEBYPKSPAN( "TEST2.ZIP", { "TEST.PRG", "c:\windows\win.ini"}, 9, {|nPos,cFile| qout(cFile) } )<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; qout( "File was successfully created" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;aFiles := { "TEST.PRG", "c:\windows\win.ini" }<br />&nbsp;* &nbsp; &nbsp; &nbsp;nLen &nbsp; := Len( aFiles )<br />&nbsp;* &nbsp; &nbsp; &nbsp;aGauge := GaugeNew( 5, 5, 7, 40, "W/B", "W+/B", "²" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;GaugeDisplay( aGauge )<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_ZIPFILEBYPKSPAN( "f:\test33.zip", aFiles, 9, {|cFile,nPos| GaugeUpdate( aGauge, nPos/nLen ) },, "hello" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;// assuming f:\ is a Zip Drive<br />&nbsp;* &nbsp; &nbsp; &nbsp;Return Nil<br />&nbsp;* $STATUS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;R<br />&nbsp;* $COMPLIANCE$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function is a Harbour extension<br />&nbsp;* $PLATFORMS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;All<br />&nbsp;* $FILES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Library is hbzip.lib<br />&nbsp;* $END$<br />&nbsp;*/</span><br /><br /><span style="color: #B900B9;">/* $DOC$<br />&nbsp;* $FUNCNAME$<br />&nbsp;* &nbsp; &nbsp; HB_SETDISKZIP()<br />&nbsp;* $CATEGORY$<br />&nbsp;* &nbsp; &nbsp; Zip Functions<br />&nbsp;* $ONELINER$<br />&nbsp;* &nbsp; &nbsp; Set an codeblock for disk changes<br />&nbsp;* $SYNTAX$<br />&nbsp;* &nbsp; &nbsp; HB_SETDISKZIP( <bBlock> ) ---> TRUE<br />&nbsp;* $ARGUMENTS$<br />&nbsp;* &nbsp; &nbsp; <bBlock> an Code block that contains an function that will be performed<br />&nbsp;* &nbsp; &nbsp; when the need of changing disk are need.<br />&nbsp;* $RETURNS$<br />&nbsp;* &nbsp; &nbsp; It always returns True<br />&nbsp;* $DESCRIPTION$<br />&nbsp;* &nbsp; &nbsp; This function will set an codeblock that will be evaluated every time<br />&nbsp;* &nbsp; &nbsp; that an changedisk event is necessary. <bBlock> receives nDisk as a<br />&nbsp;* &nbsp; &nbsp; code block param that corresponds to the diskette number to be processed.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; Set this function before opening archives that are in removable media.<br />&nbsp;* &nbsp; &nbsp; This block will be released, when the caller finish it job.<br />&nbsp;* $EXAMPLES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_SETDISKZIP( {|nDisk| Alert( "Please insert disk no " + Str( nDisk, 3 ) ) } )<br />&nbsp;* $COMPLIANCE$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function is a Harbour extension<br />&nbsp;* $PLATFORMS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;All<br />&nbsp;* $FILES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Library is hbzip.lib<br />&nbsp;* $END$<br />&nbsp;*/</span><br /><br /><span style="color: #B900B9;">/* $DOC$<br />&nbsp;* $FUNCNAME$<br />&nbsp;* &nbsp; &nbsp; HB_ZIPDELETEFILES()<br />&nbsp;* $CATEGORY$<br />&nbsp;* &nbsp; &nbsp; Zip Functions<br />&nbsp;* $ONELINER$<br />&nbsp;* &nbsp; &nbsp; Delete files from an zip archive<br />&nbsp;* $SYNTAX$<br />&nbsp;* &nbsp; &nbsp; HB_ZIPDELETEFILES( <cFile>, <cFiletoDelete> | <aFiles> | <nFilePos> ) --> <lDeleted><br />&nbsp;* $ARGUMENTS$<br />&nbsp;* &nbsp; &nbsp; <cFile> &nbsp;The name of the zip files from where the files will be deleted<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; <cFiletoDelete> An File to be removed<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp;_or_<br />&nbsp;* &nbsp; &nbsp; <aFiles> &nbsp; &nbsp;An Array of Files to be removed<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp;_or_<br />&nbsp;* &nbsp; &nbsp; <nFilePos> The Position of the file to be removed<br />&nbsp;* $RETURNS$<br />&nbsp;* &nbsp; &nbsp; <lDeleted> If the files are deleted, it will return .T.; otherwise<br />&nbsp;* &nbsp; &nbsp; it will return .f. in the following cases: Spanned Archives; the file(s)<br />&nbsp;* &nbsp; &nbsp; could not be found in the zip file.<br />&nbsp;* $DESCRIPTION$<br />&nbsp;* &nbsp; &nbsp; This &nbsp;function removes files from an Zip archive.<br />&nbsp;* $EXAMPLES$<br />&nbsp;* &nbsp; &nbsp; ? "has the file zipnew.i been deleted ", if( HB_ZIPDELETEFILES( "\test23.zip", "zipnew.i" ), "Yes", "No" )<br />&nbsp;* $STATUS$<br />&nbsp;* &nbsp; &nbsp; R<br />&nbsp;* $COMPLIANCE$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function is a Harbour extension<br />&nbsp;* $PLATFORMS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;All<br />&nbsp;* $FILES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Library is hbzip.lib<br />&nbsp;* $END$<br />&nbsp;*/</span><br /><br /><span style="color: #B900B9;">/* $DOC$<br />&nbsp;* $FUNCNAME$<br />&nbsp;* &nbsp; &nbsp; HB_ZIPTESTPK()<br />&nbsp;* $CATEGORY$<br />&nbsp;* &nbsp; &nbsp; Zip Functions<br />&nbsp;* $ONELINER$<br />&nbsp;* &nbsp; &nbsp; Test pkSpanned zip files<br />&nbsp;* $SYNTAX$<br />&nbsp;* &nbsp; &nbsp; HB_ZIPTESTPK( <cFile> ) --> <nReturnCode><br />&nbsp;* $ARGUMENTS$<br />&nbsp;* &nbsp; &nbsp; <cFile> &nbsp;File to be tested.<br />&nbsp;* $RETURNS$<br />&nbsp;* &nbsp; &nbsp; <nReturn> A code that tells if the current disk is the last of a<br />&nbsp;* &nbsp; &nbsp; pkSpanned disk set.<br />&nbsp;* $DESCRIPTION$<br />&nbsp;* &nbsp; &nbsp; This function tests if the disk inserted is the last disk of an backup<br />&nbsp;* &nbsp; &nbsp; set or not.<br />&nbsp;* &nbsp; &nbsp; It will return the follow return code when an error is found<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; <table><br />&nbsp;* &nbsp; &nbsp; Error code &nbsp; &nbsp; Meaning<br />&nbsp;* &nbsp; &nbsp; 114 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Incorrect Disk<br />&nbsp;* &nbsp; &nbsp; 103 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;No Call back was set with HB_SETDISKZIP()<br />&nbsp;* &nbsp; &nbsp; </table><br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; Call this function to determine if the disk inserted is the correct<br />&nbsp;* &nbsp; &nbsp; one before any other function.<br />&nbsp;* $EXAMPLES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;if HB_ZIPTESTPK( "a:\test22.zip" ) == 114<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;? "Invalid Diskette"<br />&nbsp;* &nbsp; &nbsp; &nbsp;endif<br />&nbsp;* $STATUS$<br />&nbsp;* &nbsp; &nbsp; R<br />&nbsp;* $COMPLIANCE$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function is a Harbour extension<br />&nbsp;* $PLATFORMS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;All<br />&nbsp;* $FILES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Library is hbzip.lib<br />&nbsp;* $END$<br />&nbsp;*/</span><br /><br /><span style="color: #B900B9;">/* $DOC$<br />&nbsp;* $FUNCNAME$<br />&nbsp;* &nbsp; &nbsp; HB_GETZIPCOMMENT()<br />&nbsp;* $CATEGORY$<br />&nbsp;* &nbsp; &nbsp; Zip Functions<br />&nbsp;* $ONELINER$<br />&nbsp;* &nbsp; &nbsp; Return the comment of an zip file<br />&nbsp;* $SYNTAX$<br />&nbsp;* &nbsp; &nbsp; HB_GETZIPCOMMENT( <szFile> ) --> <szComment><br />&nbsp;* $ARGUMENTS$<br />&nbsp;* &nbsp; &nbsp; <szFile> &nbsp;File to get the comment from<br />&nbsp;* $RETURNS$<br />&nbsp;* &nbsp; &nbsp; <szComment> &nbsp;The comment that was stored in <szFile><br />&nbsp;* $DESCRIPTION$<br />&nbsp;* &nbsp; &nbsp; This function receives a valid zip file name as parameter,<br />&nbsp;* &nbsp; &nbsp; and returns the global comment stored within.<br />&nbsp;* $EXAMPLES$<br />&nbsp;* &nbsp; &nbsp; ? "The comment in test.zip is ", HB_GETZIPCOMMENT( "test.zip" )<br />&nbsp;* $STATUS$<br />&nbsp;* &nbsp; &nbsp; R<br />&nbsp;* $COMPLIANCE$<br />&nbsp;* &nbsp; &nbsp; This function is a Harbour extension<br />&nbsp;* $PLATFORMS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;All<br />&nbsp;* $FILES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Library is hbzip.lib<br />&nbsp;* $END$<br />&nbsp;*/</span><br /><br /><span style="color: #B900B9;">/* $DOC$<br />&nbsp;* $FUNCNAME$<br />&nbsp;* &nbsp; &nbsp; HB_SETZIPCOMMENT()<br />&nbsp;* $CATEGORY$<br />&nbsp;* &nbsp; &nbsp; Zip Functions<br />&nbsp;* $ONELINER$<br />&nbsp;* &nbsp; &nbsp; Set an Zip archive Comment<br />&nbsp;* $SYNTAX$<br />&nbsp;* &nbsp; &nbsp; HB_SETZIPCOMMENT( <cComment> ) --> Nil<br />&nbsp;* $ARGUMENTS$<br />&nbsp;* &nbsp; &nbsp; <cComment> &nbsp; Comment to add to the zip archive<br />&nbsp;* $RETURNS$<br />&nbsp;* &nbsp; &nbsp; <NIL> this function always return NIL<br />&nbsp;* $DESCRIPTION$<br />&nbsp;* &nbsp; &nbsp; This function stored an global comment to an zip archive.<br />&nbsp;* &nbsp; &nbsp; It should be called before any of the compression functions.<br />&nbsp;* $EXAMPLES$<br />&nbsp;* &nbsp; &nbsp; HB_SETZIPCOMMENT( "This is an Test" )<br />&nbsp;* &nbsp; &nbsp; hb_zipfile( "test.zip", { "\windows\ios.ini", "\windows\win.ini" } )<br />&nbsp;* $STATUS$<br />&nbsp;* &nbsp; &nbsp; R<br />&nbsp;* $COMPLIANCE$<br />&nbsp;* &nbsp; &nbsp; This function is a Harbour extension<br />&nbsp;* $PLATFORMS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;All<br />&nbsp;* $FILES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Library is hbzip.lib<br />&nbsp;* $END$<br />&nbsp;*/</span><br /><br /><span style="color: #B900B9;">/* $DOC$<br />&nbsp;* $FUNCNAME$<br />&nbsp;* &nbsp; &nbsp; HB_SETBUFFER()<br />&nbsp;* $CATEGORY$<br />&nbsp;* &nbsp; &nbsp; Zip Functions<br />&nbsp;* $ONELINER$<br />&nbsp;*<br />&nbsp;* $SYNTAX$<br />&nbsp;* &nbsp; &nbsp; HB_SETBUFFER( [<nWriteBuffer>], [<nExtractBuffer>], [<nReadBuffer>] ) --> Nil<br />&nbsp;* $ARGUMENTS$<br />&nbsp;* &nbsp; &nbsp; <nWriteBuffer> &nbsp; The size of the write buffer.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; <nExtractBuffer> The size of the extract buffer.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; <nReadBuffer> &nbsp; &nbsp;The size of the read buffer.<br />&nbsp;* $RETURNS$<br />&nbsp;* &nbsp; &nbsp; <NIL> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;This function always returns NIL.<br />&nbsp;* $DESCRIPTION$<br />&nbsp;* &nbsp; &nbsp; This function set the size of the internal buffers for write/extract/read<br />&nbsp;* &nbsp; &nbsp; operation<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; If the size of the buffer is smaller then the default, the function<br />&nbsp;* &nbsp; &nbsp; will automatically use the default values, which are 65535/16384/32768<br />&nbsp;* &nbsp; &nbsp; respectively.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; This function be called before any of the compression/decompression<br />&nbsp;* &nbsp; &nbsp; functions.<br />&nbsp;* $EXAMPLES$<br />&nbsp;* &nbsp; &nbsp; HB_SETBUFFER( 100000, 115214, 65242 )<br />&nbsp;* $STATUS$<br />&nbsp;* &nbsp; &nbsp; R<br />&nbsp;* $COMPLIANCE$<br />&nbsp;* &nbsp; &nbsp; This function is a Harbour extension<br />&nbsp;* $PLATFORMS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;All<br />&nbsp;* $FILES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Library is hbzip.lib<br />&nbsp;* $END$<br />&nbsp;*/</span><br /><br /><span style="color: #B900B9;">/*<br />&nbsp;* $DOC$<br />&nbsp;* $FUNCNAME$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_GETUNRARFILE()<br />&nbsp;* $CATEGORY$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Zip Functions<br />&nbsp;* $ONELINER$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Gets the number of files that are in the RAR file<br />&nbsp;* $SYNTAX$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_GETUNRARFILE( <cFile> ) ---> nNumber<br />&nbsp;* $ARGUMENTS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cFile> &nbsp; Name of the rar file<br />&nbsp;* $RETURNS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<nNumber> &nbsp;The number of files contained inside the RAR file<br />&nbsp;* $DESCRIPTION$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function returns the number of files that is stored in the RAR file.<br />&nbsp;* $EXAMPLES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;FUNCTION MAIN()<br />&nbsp;* &nbsp; &nbsp; &nbsp;Local nFiles := HB_GETUNRARFILE( "test.rar" )<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;if nFiles > 0<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; ? "This files contains ", nFiles<br />&nbsp;* &nbsp; &nbsp; &nbsp;endif<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;Return Nil<br />&nbsp;* $STATUS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;R<br />&nbsp;* $COMPLIANCE$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function is a Harbour extension<br />&nbsp;* $PLATFORMS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;All<br />&nbsp;* $FILES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Library is hbzip.lib<br />&nbsp;* $END$<br />&nbsp;*/</span><br /><span style="color: #B900B9;">/*<br />&nbsp;* $DOC$<br />&nbsp;* $FUNCNAME$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_UNZIPFILEINDEX()<br />&nbsp;* $CATEGORY$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Zip Functions<br />&nbsp;* $ONELINER$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Unzip a compressed file referenced by it number in the zipfile<br />&nbsp;* $SYNTAX$<br />&nbsp;* &nbsp; &nbsp; &nbsp;HB_UNZIPFILE( <cFile>, <bBlock>, <lWithPath>, <cPassWord>, <cPath>,<br />&nbsp;* &nbsp; &nbsp; &nbsp;<nFile> | <anFiles>, <pFileProgress> ) ---> lCompress<br />&nbsp;* $ARGUMENTS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cFile> &nbsp; Name of the zip file<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<bBlock> &nbsp;Code block to execute while compressing<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lWithPath> Toggle to create directory if needed<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cPassWord> Password to use to extract files<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cPath> &nbsp; &nbsp;Path to extract the files to - mandatory.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<cFile> | <anFiles> A File or Array of files position to extract - mandatory<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;<pFileProgress> Code block for File Progress<br />&nbsp;* $RETURNS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;<lCompress> &nbsp;.t. if all file was successfully restored, otherwise .f.<br />&nbsp;* $DESCRIPTION$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function restores all files contained inside the <cFile>.<br />&nbsp;* &nbsp; &nbsp; &nbsp;If the extension is omitted, .ZIP will be assumed. If a file already<br />&nbsp;* &nbsp; &nbsp; &nbsp;exists, it will be overwritten.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <bBlock> is used, every time the file is opened to compress it<br />&nbsp;* &nbsp; &nbsp; &nbsp;will evaluate bBlock. Parameters of bBlock are cFile and nPos.<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;The <cPath> is a mandatory parameter. Set to ".\" to extract to the<br />&nbsp;* &nbsp; &nbsp; &nbsp;current dir<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <cFile> or <anFiles> are not provided, no files will be extracted!<br />&nbsp;* &nbsp; &nbsp; &nbsp;Make sure you provide the file or files you want extracted<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;If <pFileProgress> is used, an Code block is evaluated, showing the total<br />&nbsp;* &nbsp; &nbsp; &nbsp;of that file has being processed.<br />&nbsp;* &nbsp; &nbsp; &nbsp;The codeblock must be defined as follow {|nPos,nTotal| GaugeUpdate(aGauge1,(nPos/nTotal))}<br />&nbsp;* $EXAMPLES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;FUNCTION MAIN()<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;IF HB_UNZIPFILEINDEX( "TEST.ZIP",,,, ".\", 1 )<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; qout( "File was successfully created" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;IF HB_UNZIPFILEINDEX( "TEST2.ZIP", {|cFile|, qout(cFile) },,, ".\", { 1, 2 } )<br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; qout( "File was successfully created" )<br />&nbsp;* &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp;*<br />&nbsp;* &nbsp; &nbsp; &nbsp;Return Nil<br />&nbsp;* $STATUS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;R<br />&nbsp;* $COMPLIANCE$<br />&nbsp;* &nbsp; &nbsp; &nbsp;This function is a Harbour extension<br />&nbsp;* $PLATFORMS$<br />&nbsp;* &nbsp; &nbsp; &nbsp;All<br />&nbsp;* $FILES$<br />&nbsp;* &nbsp; &nbsp; &nbsp;Library is hbzip.lib<br />&nbsp;* $END$<br />&nbsp;*/</span></div>[/code:357ejo9z] EMG
documentation for hb_zip*
Hello FiveWinners. Anyone know where I can find the documentation of all management zip functions for xHarbour.org zip? Greetings
documentation for hb_zip*
Enrico, Thanks. Question. Zip files can be generated in memory? That is, the result of the zip or unzip is stored in a variable in memory? Greetings
documentation for hb_zip*
I don't know, sorry. EMG
documentation for hb_zip*
If we are using only one string to compress (zip) we can us HB_Compress( <cSourceString> ) --> cZipBuf and HB_UnCompress( <cZipBuf> ) --> cOriginalString.
documentation for hb_zip*
Hello nageswaragunupudi Thanks. if you compare the results against hb_zipfile and hb_compress function, the result is different. if a file is compressed with hb_zipfile, pass it to Memory and try to unpack it with hb_uncompress, the result is nil. Any idea how? Greetings
does FiveWin have a Constant like __XPP__
hi, under Xbase++ i can use [code=fw:1imwj9zj]<div class="fw" id="{CB}" style="font-family: monospace;">#IFDEF __XPP__</div>[/code:1imwj9zj] with MiniGUI Extended [code=fw:1imwj9zj]<div class="fw" id="{CB}" style="font-family: monospace;">#IFDEF __HMG__</div>[/code:1imwj9zj] so what can i use for FiveWin to identify Code to use <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
does FiveWin have a Constant like __XPP__
Dear Jimmy, If you review FiveWin.ch you will see that we declare some constants that you can use: _FIVEWIN_CH FWCOPYRIGHT FWVERSION FW_VersionNo FWDESCRIPTION
does FiveWin have a Constant like __XPP__
hi Antonio, [quote="Antonio Linares":1c6fnahf]If you review FiveWin.ch you will see that we declare some constants that you can use: _FIVEWIN_CH FWCOPYRIGHT FWVERSION FW_VersionNo FWDESCRIPTION[/quote:1c6fnahf] Ok, i will use "_FIVEWIN_CH" to use FiveWin Code, Thx btw. i saw a lot of __XPP__ does it mean i can use FiveWin with Xbase++ Source Code <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> "That" is what i want to learn to switch from Xbase++ to harbour FiveWin