topic
stringlengths
1
63
text
stringlengths
1
577k
Clases UI
Enlace con los ejemplos <!-- m --><a class="postlink" href="https://www.dropbox.com/s/zu0rd92r1lrsiqy/WndUI00.zip">https://www.dropbox.com/s/zu0rd92r1lrsiqy/WndUI00.zip</a><!-- m -->
Clases UI
Carpeta con recursos e iconos Creo que estan todos <!-- m --><a class="postlink" href="https://www.dropbox.com/s/tub3cyllac3sl52/Res.zip">https://www.dropbox.com/s/tub3cyllac3sl52/Res.zip</a><!-- m -->
Clases UI
Cristobal, Muchísimas gracias por tu generosidad y por compartir con todos nosotros tu trabajo y tu esfuerzo!!! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Clases UI
Enlace con el fichero .Bat para construir los ejemplos Link to the file. Bat to construct examples <!-- m --><a class="postlink" href="https://www.dropbox.com/s/pf1yhr7zl9k7k8l/makeui.bat">https://www.dropbox.com/s/pf1yhr7zl9k7k8l/makeui.bat</a><!-- m --> Tienes que modificar los path de Fivewin y de Harbour Forma de usarlo You have to change the path of Fivewin and Harbour Method of use [quote:15xzo2i1] C:\FiveUI>makeui wndui01 (para crear el ejemplo wndui01, y asi sucesivamente) (to create the example wndui01, and so on) [/quote:15xzo2i1] Voy a adjuntar tambien los Objs construidos I'll also attach the built Objs <!-- m --><a class="postlink" href="https://www.dropbox.com/s/os6dl01w8w6gr9s/obj.zip">https://www.dropbox.com/s/os6dl01w8w6gr9s/obj.zip</a><!-- m --> Y las clases <!-- m --><a class="postlink" href="https://www.dropbox.com/s/a4ux90125mwxv4v/Source.zip">https://www.dropbox.com/s/a4ux90125mwxv4v/Source.zip</a><!-- m --> Ojo, el fichero .ZIP de ejemplos WNDUI00.ZIP que publiqué antes ha de colocarse en la carpeta SOURCE Eye, the ZIP file. WNDUI00.ZIP examples I posted before has placed in the SOURCE folder Instrucciones: - Crear una carpeta en el subidrectorio raiz C:\FiveUI (Si deseas crearla en otra carpeta tendrás que modificar el fichero .BAT que adjunto - La estructura de la carpeta ha de ser C:\FiveUI -- Include -- Obj -- Res -- Source y colocar las carpetas comprimidas que he publicado en sus respectivas ubicaciones instructions: - Create a folder on the root subidrectorio C: \ FiveUI     (If you want to create another folder you will have to modify the file. Attached BAT - The folder structure must be    C: \ FiveUI                   - Include                   - Obj                   - Res                   - Source                   and place the compressed folders that I posted at their respective locations
Clases UI
Antonio Lo hago muy orgulloso y también agradecido de tu persona y de los compañeros del foro Espero que a alguien les sirva Por otra parte para poder publicar el codigo del editor que me solicitaste, del visual make y de mis rutinas en el Fivedbu con ADO son necesarias estas clases Eso serán los ejemplos: WNDUI18 - WNDUI19 - WNDUI20, etc que tengo preparados y que estoy "puliendo" Espero que alguien lo pruebe y me indique si se construyen correctamente Si alquien puede/quiere traducir estos mensajes, estaría bien. Cualquier cosa, ya sabes, por aqui estaré Anthony I'm very proud and grateful person and your fellow forum I hope someone serve them In addition to publishing the code editor to please me, and make visual routines in my Fivedbu with ADO these classes are necessary That will be the examples: WNDUI18 - WNDUI19 - WNDUI20, etc. I have prepared and I'm "polishing" I hope someone proves me and indicate whether constructed correctly If anyone can / wants to translate these messages would be nice. Anything, you know, I'll be here
Clases UI
Cristobal, muchas gracias. Saludos,
Clases UI
Como anticipo de lo que hablo y para que no se me olvide y me sirva de indice <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> [url=http&#58;//postimage&#46;org/:254qbyj5][img:254qbyj5]http&#58;//s26&#46;postimg&#46;org/ckiu775w9/Wnd_UI20&#46;png[/img:254qbyj5][/url:254qbyj5] [url=http&#58;//postimage&#46;org/:254qbyj5][img:254qbyj5]http&#58;//s26&#46;postimg&#46;org/9cecu5jmh/Wnd_UI201&#46;png[/img:254qbyj5][/url:254qbyj5] [url=http&#58;//postimage&#46;org/:254qbyj5][img:254qbyj5]http&#58;//s26&#46;postimg&#46;org/uczt1bxqx/Wnd_UI202&#46;png[/img:254qbyj5][/url:254qbyj5] [url=http&#58;//postimage&#46;org/:254qbyj5][img:254qbyj5]http&#58;//s26&#46;postimg&#46;org/8gda0ykk9/Wnd_UI203&#46;png[/img:254qbyj5][/url:254qbyj5] [url=http&#58;//postimage&#46;org/:254qbyj5][img:254qbyj5]http&#58;//s26&#46;postimg&#46;org/6nadcmzdl/Wnd_UI204&#46;png[/img:254qbyj5][/url:254qbyj5] [url=http&#58;//postimage&#46;org/:254qbyj5][img:254qbyj5]http&#58;//s26&#46;postimg&#46;org/fxmhg6a3d/Wnd_UI205&#46;png[/img:254qbyj5][/url:254qbyj5] [url=http&#58;//postimage&#46;org/:254qbyj5][img:254qbyj5]http&#58;//s26&#46;postimg&#46;org/cs6h3pgux/Wnd_UI206&#46;png[/img:254qbyj5][/url:254qbyj5] [url=http&#58;//postimage&#46;org/:254qbyj5][img:254qbyj5]http&#58;//s26&#46;postimg&#46;org/rqovy4vx5/Wnd_UI207&#46;png[/img:254qbyj5][/url:254qbyj5] [url=http&#58;//postimage&#46;org/:254qbyj5][img:254qbyj5]http&#58;//s26&#46;postimg&#46;org/4nycyyuft/Wnd_UI208&#46;png[/img:254qbyj5][/url:254qbyj5] Como pueden comprobar la ultima pantalla no está terminada, aunque ya es bastante funcional El Visual Make permite importar proyectos de Verce 4.3 y generar el archivo .bat y el .mak
Clases UI
Cristobal, me quito la txapela. Impresionante ! Muchas gracias. Saludos
Clases UI
[quote="Baxajaun":1zgf0i2n]Cristobal, me quito la txapela. Impresionante ! Muchas gracias. Saludos[/quote:1zgf0i2n] Que tal tiempo hace por alli? A tu disposicion, espero que funcione y lo terminemos al 100 por 100 Bueno mejor dicho al 200 por 100, creo que aun hay muchas cosas que se pueden añadir/mejorar
Clases UI
Como comentario adicional: - Estoy intentando crear #define para que se parezca lo más posible a la filosofia de Fivewin, pero me estoy encontrando con muchas dificultades - Yo he preferido siempre programar como véis en los ejemplos (tipo [b:3q0btxwx]plantilla[/b:3q0btxwx], así, modificando los datos, ya tengo la aplicación lista, aunque yo siempre lo he definido como "pistola", o sea, "cargar y disparar" <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> ) - Además, así es más fácil poder establecer parámetros en ficheros externos de configuracion Es mi opinión, claro, pero cualquier idea será bienvenida As an additional comment: - I'm trying to create # define as closely as possible to the philosophy Fivewin, but I'm finding many difficulties - I've always preferred schedule as you see in the examples (type template and modifying data, and have the application list, although I've always defined as "gun" or "load and fire": D: D ) - In addition, it is easier to set parameters in external configuration files It's my opinion, of course, but any idea will be welcome
Clases UI
Otras imagenes [url=http&#58;//postimage&#46;org/:1p8qewxg][img:1p8qewxg]http&#58;//s26&#46;postimg&#46;org/eevooxswp/Wnd_UI209&#46;png[/img:1p8qewxg][/url:1p8qewxg] [url=http&#58;//postimage&#46;org/:1p8qewxg][img:1p8qewxg]http&#58;//s26&#46;postimg&#46;org/5ikwl02ah/Wnd_UI210&#46;png[/img:1p8qewxg][/url:1p8qewxg] [url=http&#58;//postimage&#46;org/:1p8qewxg][img:1p8qewxg]http&#58;//s26&#46;postimg&#46;org/e3e8c6cgp/Wnd_UI211&#46;png[/img:1p8qewxg][/url:1p8qewxg] [url=http&#58;//postimage&#46;org/:1p8qewxg][img:1p8qewxg]http&#58;//s26&#46;postimg&#46;org/e4o65leah/Wnd_UI212&#46;png[/img:1p8qewxg][/url:1p8qewxg]
Clases UI
Cristobal, Impresionante!!!! Este es un sueño que tengo, en portar todas las pantallas y dialogos de mi sistema para Metro UI. Voy a intentar usar el tuyo... Muchisimas gracias por todo y creo que llegaras al 200 por 100 rapidamente. Gracias una vez mas!!! Saludos desde Brasil,
Clases UI
Cristobal, Un trabajo realmente extraordinario, enhorabuena!!! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Y muchísimas gracias por compartirlo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Clases UI
[quote="Kleyber":e10h9pzh]Cristobal, Impresionante!!!! Este es un sueño que tengo, en portar todas las pantallas y dialogos de mi sistema para Metro UI. Voy a intentar usar el tuyo... Muchisimas gracias por todo y creo que llegaras al 200 por 100 rapidamente. Gracias una vez mas!!! Saludos desde Brasil,[/quote:e10h9pzh] Cualquier cosa en la que te pueda ayudar, ya sabes Por aqui estaré Gracias Antonio
Clases UI
Antonio, con la version 14.07, aparecen los botones pequeños con la imagen "descolocados" pero lo que me sorprende es que sean solo algunos: mismo codigo, misma imagen Estoy perdido [url=http&#58;//postimage&#46;org/:y478q9u4][img:y478q9u4]http&#58;//s26&#46;postimg&#46;org/4pw6rud21/Wnd_UI202_1&#46;png[/img:y478q9u4][/url:y478q9u4] Fijate con la version 14.02 [url=http&#58;//postimage&#46;org/:y478q9u4][img:y478q9u4]http&#58;//s26&#46;postimg&#46;org/uczt1bxqx/Wnd_UI202&#46;png[/img:y478q9u4][/url:y478q9u4]
Clases UI
Adjunto enlace de la clase XCBrowse actualizada para ser usada con la version 14.07 (están todas, pero solo he modificado esa), por el tema de los Fonts <!-- m --><a class="postlink" href="https://www.dropbox.com/s/0gmhkadg8kszhoq/Source_14.07.zip">https://www.dropbox.com/s/0gmhkadg8kszh ... _14.07.zip</a><!-- m -->
Clases UI
Para que sea más fácil, he creado un repositorio Espero que funcione <!-- m --><a class="postlink" href="https://bitbucket.org/navarro_cristobal/testui">https://bitbucket.org/navarro_cristobal/testui</a><!-- m -->
Clases UI
Hola Cristóbal, Acaba de publicar Antonio una nueva build, igual se arregla.
Clases UI
Acabo de probarlo con el nuevo build Sigue igual, y no veo por qué <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: -->
Clases UI
Cristobal, La clase TBtnBmp se ha reorganizado, ahora esta mucho mejor estructurada, pero es posible que se hayan colado algunos errores. No te preocupes por eso, iran apareciendo los errores y los iremos arreglando <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Clases UI
Gracias Antonio, Lo que pasa es que como en informática nunca he creído en fantasmas <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->, me pica la curiosidad, así que mientras seguiré investigando
Clases UI
El problema debe venir del metodo paint() que para estructurarlo tuvo que ser dividido en varias partes y puede ser que a alguna le falte algo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Clases UI
Antonio Por si te sirve de referencia para encontrar el [u:6ciu0nt1][b:6ciu0nt1]posible[/b:6ciu0nt1][/u:6ciu0nt1] problema Solo ocurre con las imagenes [b:6ciu0nt1][u:6ciu0nt1]True Color + Alpha (32 bits)[/u:6ciu0nt1][/b:6ciu0nt1] [url=http&#58;//postimage&#46;org/:6ciu0nt1][img:6ciu0nt1]http&#58;//s26&#46;postimg&#46;org/iwxkl74ih/Title61&#46;png[/img:6ciu0nt1][/url:6ciu0nt1] Si les pongo: [b:6ciu0nt1][u:6ciu0nt1]True Color (24 bits)[/u:6ciu0nt1][/b:6ciu0nt1] se muestran correctamente Como te he comentado alguna vez, en el tema de imágenes y sus propiedades ando un poco perdido <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Clases UI
[quote="cnavarro":2e4tvl3z]Para que sea más fácil, he creado un repositorio Espero que funcione <!-- m --><a class="postlink" href="https://bitbucket.org/navarro_cristobal/testui">https://bitbucket.org/navarro_cristobal/testui</a><!-- m -->[/quote:2e4tvl3z] Actualizado
Clases UI
[quote="Kleyber":b9gtu0bv]Cristobal, Impresionante!!!! Este es un sueño que tengo, en portar todas las pantallas y dialogos de mi sistema para Metro UI. Voy a intentar usar el tuyo... Muchisimas gracias por todo y creo que llegaras al 200 por 100 rapidamente. Gracias una vez mas!!! Saludos desde Brasil,[/quote:b9gtu0bv] Kleyber, has llegado a usarlo?
Clases UI
[quote="Baxajaun":157f8z19]Cristobal, me quito la txapela. Impresionante ! Muchas gracias. Saludos[/quote:157f8z19] Has llegado a usarlo?
Clases UI
[quote="cnavarro":2kwdw6bp][quote="Kleyber":2kwdw6bp]Cristobal, Impresionante!!!! Este es un sueño que tengo, en portar todas las pantallas y dialogos de mi sistema para Metro UI. Voy a intentar usar el tuyo... Muchisimas gracias por todo y creo que llegaras al 200 por 100 rapidamente. Gracias una vez mas!!! Saludos desde Brasil,[/quote:2kwdw6bp] Kleyber, has llegado a usarlo?[/quote:2kwdw6bp] Cristobal, La verdad que no... no lo entendi exactamente la secuencia para crear todo... jeje puedes ayudarme? Deseo crearlo usando Harbour + MSVC 2010.
Clases UI
Kleyber, dime lo que necesitas
Clases UI
Cristobal, Deseo crear todo con Harbour y MSVC 2010 que es la configuración que estoy usando, pues estoy migrando todo de xHarbour + BCC para Harbour + MSVC 2010. Como quedan los bats de creación de todo?
Clases UI
[quote="Kleyber":1js4us9a]Cristobal, Deseo crear todo con Harbour y MSVC 2010 que es la configuración que estoy usando, pues estoy migrando todo de xHarbour + BCC para Harbour + MSVC 2010. Como quedan los bats de creación de todo?[/quote:1js4us9a] Ok, entendido
Clases UI
Keyber, he subido los ficheros al repositorio He creado un .bat genérico y un .mak como ejemplo para un fichero en concreto ( WndUi17 ) Solo has de modificar los paths (ojo está hecho para VS2013) y llamar al fichero: [quote:17l00wfg] c:\Fiveui> makeuims WndUI17 ( no pongas la extension .mak ) [/quote:17l00wfg] Ojo, lo he hecho de cabeza Ya me vas contando -------------------------- EDITADO ........... Lo estoy probando, no funciona bien
Clases UI
Cristobal, Gracias por tu ayuda. Me quedo esperando la conclusión.
Clases UI
[quote="cnavarro":2ma4xqxd]Para que sea más fácil, he creado un repositorio Espero que funcione <!-- m --><a class="postlink" href="https://bitbucket.org/navarro_cristobal/testui">https://bitbucket.org/navarro_cristobal/testui</a><!-- m -->[/quote:2ma4xqxd] Actualizado
Clases UI
Fix minor bugs
Clases UI
Cristobal, Como siempre tu trabajo es una muestra de tu calidad <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> te has planteado en usar el wiki del repositorio en bitbucket para documentar las clases, un tutorial, etc ? Yo he usado bastante ya el wiki de bitbucket por lo que si necesitas alguna ayuda con mucho gusto puedes contar conmigo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Clases UI
Antonio Sería una estupenda solución para documentarlo, no había caído en esa posibilidad Acabo de leer el wiki y veo que se pueden editar directamente los cambios y generar páginas, pero tu experiencia sería de gran ayuda tanto en la forma de organizarlo como, sobre todo, entender el formato y sintaxis que he de usar. Son sólo ficheros de texto o se pueden incluir también imágenes?. Gracias
Clases UI
Otras imágenes con funcionalidad de multidocumento [url=http&#58;//postimage&#46;org/:2usog250][img:2usog250]http&#58;//s29&#46;postimg&#46;org/urpyqzqqv/Title83&#46;png[/img:2usog250][/url:2usog250] [url=http&#58;//postimage&#46;org/:2usog250][img:2usog250]http&#58;//s29&#46;postimg&#46;org/5kf2qqnmv/Title86&#46;png[/img:2usog250][/url:2usog250] [url=http&#58;//postimage&#46;org/:2usog250][img:2usog250]http&#58;//s29&#46;postimg&#46;org/56dqr53jb/Title84&#46;png[/img:2usog250][/url:2usog250] [url=http&#58;//postimage&#46;org/:2usog250][img:2usog250]http&#58;//s29&#46;postimg&#46;org/daluvvpyf/Title85&#46;png[/img:2usog250][/url:2usog250]
Clases y Prgs
Hola a todos: Por necesidad pretendo cambiarme a xharbour, deje fivewin 2.3 pero me pasa lo siguiente: no consigo modificar el archivo buildx.bat para usar varios prgs. como se incluyen las clases en ese archivo ???' Estoy empezando con un programa sencillo, antes usaba TWbrowse, tBtnGet, y asi varias librerias y clases, pero por lo que he leido creo que ya no funcionan en xharbour. donde puedo conseguir esas clases nuevas y librerias. Aprovechando de su tiempo y paciencia ojala puedan enviarme un ejemplo de enlace de varios prg con varias clases. y algun ejemplo de wbrowse. <!-- e --><a href="mailto:servicomver@hotmail.com">servicomver@hotmail.com</a><!-- e --> Gracias y saludos
Clases y Prgs
Hola revisa este link, Utilities / Utilidades [url:3bcfddzk]http&#58;//forums&#46;fivetechsupport&#46;com/viewforum&#46;php?f=17[/url:3bcfddzk]
Clases y Prgs
estoy tratando de ir poco a poco con el cambio de fivewin a xharbour pero algo tan simple como este codigo que encontre no me funciona Include "FiveWin.Ch" Function Main() Local oDlg Local oGet local cVar := space( 30 ) DEFINE DIALOG oDlg from 0,0 to 400,400 pixel @ 15,15 get oGet var cVar picture "@!" bitmap "chkyes.bmp" action( msginfo( "action" ) ); size 120,12 of oDlg pixel ACTIVATE DIALOG oDlg return nil al compilar sale el error: E0030 SYNTAX ERROR: "PARSE ERROR AT "@" " UTILIZO ESTE BUILDX.BAT @ECHO OFF CLS ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ECHO ³ FiveWin for xHarbour 6.12 - December 2006 xHarbour development power ³Ü ECHO ³ (c) FiveTech, 1993-2006 for Microsoft Windows 95/98/NT/2000/ME and XP ³Û ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß if A%1 == A GOTO :SINTAX if NOT EXIST %1.prg GOTO :NOEXIST ECHO Compiling... set hdir=c:\xharbour set bcdir=c:\bcc55 %hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log @type clip.log IF ERRORLEVEL 1 PAUSE IF ERRORLEVEL 1 GOTO EXIT echo -O2 -e%1.exe -I%hdir%\include %1.c > b32.bc %bcdir%\bin\bcc32 -M -c -v @b32.bc :ENDCOMPILE IF EXIST %1.rc %bcdir%\bin\brc32 -r %1 echo c0w32.obj + > b32.bc echo %1.obj, + >> b32.bc echo %1.exe, + >> b32.bc echo %1.map, + >> b32.bc echo ..\lib\Fivehx.lib ..\lib\FiveHC.lib + >> b32.bc echo %hdir%\lib\rtl.lib + >> b32.bc echo %hdir%\lib\vm.lib + >> b32.bc echo %hdir%\lib\gtgui.lib + >> b32.bc echo %hdir%\lib\lang.lib + >> b32.bc echo %hdir%\lib\macro.lib + >> b32.bc echo %hdir%\lib\rdd.lib + >> b32.bc echo %hdir%\lib\dbfntx.lib + >> b32.bc echo %hdir%\lib\dbfcdx.lib + >> b32.bc echo %hdir%\lib\dbffpt.lib + >> b32.bc echo %hdir%\lib\hbsix.lib + >> b32.bc echo %hdir%\lib\debug.lib + >> b32.bc echo %hdir%\lib\common.lib + >> b32.bc echo %hdir%\lib\pp.lib + >> b32.bc rem Uncomment these two lines to use Advantage RDD rem echo %hdir%\lib\rddads.lib + >> b32.bc rem echo %hdir%\lib\Ace32.lib + >> b32.bc echo %bcdir%\lib\cw32.lib + >> b32.bc echo %bcdir%\lib\import32.lib + >> b32.bc echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc echo %bcdir%\lib\psdk\iphlpapi.lib, >> b32.bc IF EXIST %1.res echo %1.res >> b32.bc rem uncomment this line to use the debugger and comment the following one rem %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc %bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc IF ERRORLEVEL 1 GOTO LINKERROR ECHO * Application successfully built %1 GOTO EXIT ECHO rem delete temporary files @del %1.c :LINKERROR ECHO * There are errors GOTO EXIT :SINTAX ECHO SYNTAX: Build [Program] {-- No especifiques la extensi¢n PRG ECHO {-- Don't specify .PRG extension GOTO EXIT :NOEXIST ECHO The specified PRG %1 does not exist :EXIT ALGUNA SUGERENCIA, OBVIO QUE ALGO ESTOY HACIENDO MAL. LO QUE INTENTO ES PONER UN BOTON EN UN GET COMO LO HACIA CON BTNGET EN FIVEWIN SALUDOS
Clases y Prgs
Hola Yo utilizo estos archivos, pueden que te sirvan Ademas debes crear las carpetas [code=fw:3ucaanej]<div class="fw" id="{CB}" style="font-family: monospace;">OBJ<br />C<br />RECURSO<br /> </div>[/code:3ucaanej] [b:3ucaanej]do.bat[/b:3ucaanej] [code=fw:3ucaanej]<div class="fw" id="{CB}" style="font-family: monospace;">@ECHO OFF<br />CLS<br />ECHO Compiling...<br />ECHO.<br /><br />c:\borland\bcc582\bin\make -fwcta.rmk<br /><br /><span style="color: #00C800;">if</span> errorlevel <span style="color: #000000;">1</span> goto error<br />Wcta<br />goto fin<br /><br />:<span style="color: #000000;">error</span><br /><span style="color: #00C800;">pause</span><br /><br />:<span style="color: #000000;">fin</span><br /><br /> </div>[/code:3ucaanej] [b:3ucaanej]wcta.rmk[/b:3ucaanej] [code=fw:3ucaanej]<div class="fw" id="{CB}" style="font-family: monospace;">HBDIR=c:\xharbour<br />BCDIR=c:\borland\bcc582<br />FWDIR=c:\fwh<br /><br />#change these paths as needed<br />.path.PRG = .\;.\Classes;.\classes\dt;<br />.path.OBJ = .\obj<br />.path.CH  = $<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include;include<br />.path.C   = .\;.\C<br />.path.rc  = .\<br /><br />#important: <span style="color: #000000;">Use</span> Uppercase <span style="color: #00C800;">for</span> filenames extensions, in the <span style="color: #00C800;">next</span> two rules!<br /><br />PRG =        \<br />Wcta.PRG    \<br />Articu.PRG    \<br />Indica.PRG     \<br />FastRepH.PRG<br /><br />PROJECT    : <span style="color: #000000;">wCta</span>.exe<br /><br />#$<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\ilink32 -Gn -aa -Tpe -s @b32.bc<br /><br />Wcta.exe  : $<span style="color: #000000;">&#40;</span>PRG:.PRG=.OBJ<span style="color: #000000;">&#41;</span> $<span style="color: #000000;">&#40;</span>C:.C=.OBJ<span style="color: #000000;">&#41;</span> recurso\wcta.res recurso\toolbar1.res<br />   $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\ilink32 -Gn -aa -Tpe -s @b32.bc<br /><br />.PRG.OBJ:<br />  $<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\bin\harbour $< /a /n /w1 /es2 /Oobj\ /I$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include;include<br />  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc32 -c -tWM -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include -oobj\$& obj\$&.c<br /><br />.C.OBJ:<br />  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp<br />  echo -I$<span style="color: #000000;">&#40;</span>HBDIR<span style="color: #000000;">&#41;</span>\include;$<span style="color: #000000;">&#40;</span>FWDIR<span style="color: #000000;">&#41;</span>\include >> tmp<br />  $<span style="color: #000000;">&#40;</span>BCDIR<span style="color: #000000;">&#41;</span>\bin\bcc32 -oobj\$& @tmp c\$&.c<br />  del tmp<br /> </div>[/code:3ucaanej] [b:3ucaanej]b32.bc[/b:3ucaanej] [code=fw:3ucaanej]<div class="fw" id="{CB}" style="font-family: monospace;">c:\borland\bcc582\lib\c0w32.obj +<br />OBJ\Wcta.Obj +<br />OBJ\Articu.obj OBJ\indica.obj OBJ\FastRepH.OBJ, +<br />wcta.exe, +<br />wcta.map, +<br />c:\Fwh\lib\FiveHX.LIB +<br />c:\Fwh\lib\FiveHc.LIB +<br />c:\xharbour\lib\rtl.lib  +<br />c:\xharbour\lib\vm.lib    +<br />c:\xharbour\lib\gtgui.lib +<br />c:\xharbour\lib\lang.lib  +<br />c:\xharbour\lib\macro.lib +<br />c:\xharbour\lib\codepage.lib +<br />c:\xharbour\lib\rdd.lib   +<br />c:\xharbour\lib\dbfcdx.lib+<br />c:\xharbour\lib\dbffpt.lib+<br />c:\xharbour\lib\hbsix.lib +<br />c:\xharbour\lib\common.lib+<br />c:\xharbour\lib\pp.lib    +<br />c:\xharbour\lib\pcrepos.lib+<br />c:\xharbour\lib\ct.lib +<br />c:\borland\bcc582\lib\cw32.lib +<br />c:\borland\bcc582\lib\import32.lib +<br />c:\borland\bcc582\lib\psdk\odbc32.lib+<br />c:\borland\bcc582\lib\psdk\rasapi32.lib+<br />c:\borland\bcc582\lib\psdk\nddeapi.lib+<br />c:\borland\bcc582\lib\psdk\msimg32.lib+<br />c:\borland\bcc582\lib\psdk\iphlpapi.lib,, +<br />recurso\wcta.res recurso\toolbar1.res</div>[/code:3ucaanej]
Clases y Prgs
servicomver, El error que mencionas quiere decir que la sintaxis no es correcta. Verifica que la sintaxis sea correcta y compila de nuevo.
Clases y Prgs
ya intente con tu ejemplo pero en la linea que uso para poner el action al get me marca el siguiente error error e0030: syntax error "parse error at @ necesito alguna clase especial TGET para poder hacerlo ???? alguien la tiene, o alguna solucion ??? gracias
Clases y Prgs
Hola Al parecer la version de FWH que tienes no acepta el comando [b:1hz46gc4]ACTION..[/b:1hz46gc4] revisa el archivo fivewin.ch a ver si la tiene
Clases y Prgs
Ya logre enlazar varios prg y usar las librerias q antes usaba en fivewin pero resulta que al usar la clase twbrowse se "borran" los registros y queda en negro al mover el cursor ya desinstale todo y volvi a instalar (por tantas pruebas que he hecho) y no encuentro el problema: asi quedo el buildx.bat @ECHO OFF CLS ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ECHO ³ FiveWin for xHarbour 7.01 - January 2007 xHarbour development power ³Ü ECHO ³ (c) FiveTech, 1993-2006 for Microsoft Windows 95/98/NT/2000/ME and XP ³Û ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß set hdir=c:\xharbour set bcdir=c:\bcc55 set fwdir=c:\fwh set lib=%xdir%\lib;%bcdir%\lib;%fwdir%\lib set include=%xdir%\include;%bcdir%\include;%fwdir%\include if A%1 == A GOTO :SINTAX if NOT EXIST %1.prg GOTO :NOEXIST ECHO Compiling... %hdir%\bin\harbour %1 /n /i%fwdir%\include;%hdir%\include /w /p %2 %3 > clip.log %hdir%\bin\harbour btnget /n /i%fwdir%\include;%hdir%\include /w /p %2 %3 > clip.log %hdir%\bin\harbour wbrowse /n /i%fwdir%\include;%hdir%\include /w /p %2 %3 > clip.log @type clip.log IF ERRORLEVEL 1 PAUSE IF ERRORLEVEL 1 GOTO EXIT rem echo -O2 -e%1.exe -I%hdir%\include %1.c > b32.bc rem %bcdir%\bin\bcc32 -M -c -v @b32.bc %bcdir%\bin\bcc32 -M -c -v -O2 -I%hdir%\include %1.c %bcdir%\bin\bcc32 -M -c -v -O2 -I%hdir%\include %btnget.c %bcdir%\bin\bcc32 -M -c -v -O2 -I%hdir%\include %wbrowse.c :ENDCOMPILE IF EXIST %1.rc %bcdir%\bin\brc32 -r %1 echo c0w32.obj + > b32.bc echo %1.obj btnget.obj wbrowse.obj, + >> b32.bc echo %1.exe, + >> b32.bc echo %1.map, + >> b32.bc echo %fwdir%\lib\Fivehx.lib %fwdir%\lib\FiveHC.lib + >> b32.bc echo %hdir%\lib\rtl.lib + >> b32.bc echo %hdir%\lib\vm.lib + >> b32.bc echo %hdir%\lib\gtgui.lib + >> b32.bc echo %hdir%\lib\btnget32.lib + >> b32.bc echo %hdir%\lib\twbrowse.lib + >> b32.bc echo %hdir%\lib\lang.lib + >> b32.bc echo %hdir%\lib\macro.lib + >> b32.bc echo %hdir%\lib\rdd.lib + >> b32.bc echo %hdir%\lib\dbfntx.lib + >> b32.bc echo %hdir%\lib\dbfcdx.lib + >> b32.bc echo %hdir%\lib\dbffpt.lib + >> b32.bc echo %hdir%\lib\hbsix.lib + >> b32.bc echo %hdir%\lib\debug.lib + >> b32.bc echo %hdir%\lib\common.lib + >> b32.bc echo %hdir%\lib\pp.lib + >> b32.bc rem Uncomment these two lines to use Advantage RDD rem echo %hdir%\lib\rddads.lib + >> b32.bc rem echo %hdir%\lib\Ace32.lib + >> b32.bc echo %bcdir%\lib\cw32.lib + >> b32.bc echo %bcdir%\lib\import32.lib + >> b32.bc echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc echo %bcdir%\lib\psdk\iphlpapi.lib, >> b32.bc IF EXIST %1.res echo %1.res >> b32.bc rem uncomment this line to use the debugger and comment the following one rem %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc %bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc IF ERRORLEVEL 1 GOTO LINKERROR ECHO * Application successfully built %1 GOTO EXIT ECHO rem delete temporary files @del %1.c :LINKERROR ECHO * There are errors GOTO EXIT :SINTAX ECHO SYNTAX: Build [Program] {-- No especifiques la extensi¢n PRG ECHO {-- Don't specify .PRG extension GOTO EXIT :NOEXIST ECHO The specified PRG %1 does not exist :EXIT el ejemplo es el que viene por default en la clase twbrowse 2.1 , al mover el cursor los registros se ponen negros (no se ven) solo se ve el cursor activo , el que tiene el prompt, alguna idea ??? no movi nada del ejemplo: #include "FiveWin.ch" #include "WColors.ch" //----------------------------------------------------------------------------// function Main() local oWnd, oLbx local cKey:= "Upper(Nombre)", oItem local cDefaultMsg:= "(C) 1994-2002, CeSoTech PC Solutions" local oFont DEFINE FONT oFont NAME GetSysFont() SIZE 0,-10 use clientes index on &cKey to clientes DEFINE WINDOW oWnd FROM 0,0 TO 33,47 +25 ; TITLE "Welcome to TWBrowse ::bSeek .and. MultiLine FAST Power !!!" ICON "\FWH\ICONS\FiveWin.ico" ; oWnd:SetFont( oFont ) TWBrowse():lHScroll:= .F. @0,0 LISTBOX oLbx FIELDS clientes->nombre + CRLF + clientes->Direccion, ; clientes->Telefono, ; Str(clientes->edad,2) ; OF oWnd SIZE 480,200 ; HEADERS "Apellido y Nombres y Direccion",; "Telefono", "Edad" ; SIZES 250,50,50 oWnd:oClient:= oLbx oLbx:bBkColor:= {|nRow,nCol,nStyle| If( nStyle==0 .and. nCol==2, ; CLR_YELLOW, ) } oLbx:lAdjLastCol := .F. oLbx:nLineStyle := 2 oLbx:bSeek := {|lRet| oLbx:DbfSeek(.T.) } oLbx:bUpdateBuffer:= {|| UpdateBuffer( oWnd:oMsgBar, ; cDefaultMsg, oLbx:cBuffer ) } oLbx:nLineHeight*= 2 oLbx:nHeaderStyle:= 2 SET MESSAGE OF oWnd TO cDefaultMsg DATE KEYBOARD NOINSET DEFINE MSGITEM oItem OF oWnd:oMsgBar PROMPT "www.cesotech.com.ar" ; COLOR GetSysColor(COLOR_HIGHLIGHTTEXT),GetSysColor( COLOR_HIGHLIGHT ); SIZE 135 ACTION WinExec("Start <!-- w --><a class="postlink" href="http://www.cesotech.com.ar">www.cesotech.com.ar</a><!-- w -->",0) ACTIVATE WINDOW oWnd RELEASE FONT oFont return nil //----------------------------------------------------------------------------// static function UpdateBuffer( oMsgBar, cDefaultMsg, cBuffer ) local nClrText:= oMsgBar:nClrText local cMsg if Len( cBuffer ) > 0 cMsg:= "Buscando: " + cBuffer oMsgBar:nClrText:= CLR_BLUE else cMsg:= cDefaultMsg endif oMsgBar:SetMsg( PadR( cMsg ,200) ) oMsgBar:nClrText:= nClrText return Nil //----------------------------------------------------------------------------// Function GetSysFont() ; return "MS Sans Serif" //----------------------------------------------------------------------------// tabien se borra la cabecera se pone de color negro saludos.
Clases y Prgs
Alguien tendra la clase twbrowse para xharbour .99 fwh 6.12 bc55 ?? encontre una pero tiene el error de que los registros al mover el cursor se ponen en negro. segun lei en un post el maestro antonio hace referencia a este error y porpone modificar unas lines, pero el numero de line que menciona no "concuerda" con lo que tiene me clase wbrowse. pretendo hacer un listbox con efecto 3d y todas las demas propiedades de la clase twbrowse Saludos, mi correo es: <!-- e --><a href="mailto:servicomver@hotmail.com">servicomver@hotmail.com</a><!-- e -->
Clases y Prgs
Nuevamente por aqui: Les comento, ya logre adecuar el buildx.bat para compilar varios archivos, logre usar la clase btnget32 y funciona correctamente, el problema ahora es que no he podido encontrar una clase que funcione correctamente. sigo con el mismo ejemplo. sample02.prg ya no marca errores de enlazado o compilado, solo que ahora se ve solo un instante el ejemplo, es decir se abre y se alcanza a ver que dibuja el browse pero se cierra inmediatamente. usando el ejemplo sample01.prg lo abre pero no muestra los datos que contiene la dbf y si le doy al boton agregar se cierra por completo, aqui el fuente: [code=fw:1t8aownn]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;<span style="color: #00C800;">LOCAL</span> aTotal:= <span style="color: #000000;">&#123;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>, <span style="color: #00C800;">Nil</span>, <span style="color: #00C800;">Nil</span>, <span style="color: #00C800;">Nil</span><span style="color: #000000;">&#125;</span><br />&nbsp;<span style="color: #00C800;">LOCAL</span> aDatos:= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// Array MultiDimensional</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Cod.Art. &nbsp;Descrip. &nbsp;Cantidad &nbsp;$Unitario &nbsp;$Total &nbsp;MarcaDeNuevo</span><br />&nbsp;<span style="color: #00C800;">LOCAL</span> l3d:= .F.<br />&nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oLbx, cPic:= <span style="color: #ff0000;">"@ze 999,999.99"</span>, oFont<br />&nbsp;<span style="color: #00C800;">LOCAL</span> hBmp:= ReadBitMap<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"finger.bmp"</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Dedicado a mi amigo Mario Goanzalez</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">If</span> Alert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Quiere verlo en 3D ??"</span>, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Aceptar"</span>,<span style="color: #ff0000;">"Cancelar"</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp;l3D:= .T.<br />&nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Times New Roman"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-15</span> BOLD<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">21</span>,<span style="color: #000000;">55</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"::bEdit's TWBrowse Power !!!"</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;TWBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">lHScroll</span>:= .F.<br />&nbsp; &nbsp; &nbsp; &nbsp;@<span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">LISTBOX</span> oLbx FIELDS <span style="color: #ff0000;">""</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADER <span style="color: #ff0000;">"Id"</span>,<span style="color: #ff0000;">"Articulo"</span>, <span style="color: #ff0000;">"Descripcion"</span>, <span style="color: #ff0000;">"Cantidad"</span>, &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Unitario"</span>, <span style="color: #ff0000;">"Total"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">207</span>,<span style="color: #000000;">100</span> <span style="color: #0000ff;">PIXEL</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SIZES <span style="color: #000000;">25</span>,<span style="color: #000000;">50</span>, <span style="color: #000000;">130</span>, <span style="color: #000000;">67</span>,<span style="color: #000000;">60</span>,<span style="color: #000000;">60</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">bLine</span>:= <span style="color: #000000;">&#123;</span>|nAt| nAt:= oLbx:<span style="color: #000000;">nAt</span>, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span>aDatos<span style="color: #000000;">&#41;</span><<span style="color: #000000;">1</span> .or. nAt>Len<span style="color: #000000;">&#40;</span>aDatos<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Array<span style="color: #000000;">&#40;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#41;</span>, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oLbx!=<span style="color: #00C800;">Nil</span> .and. oLbx:<span style="color: #000000;">lSelect</span>, hBmp, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>==<span style="color: #000000;">0</span>,Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span>,StrZero<span style="color: #000000;">&#40;</span> aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Transform<span style="color: #000000;">&#40;</span> aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>, cPic <span style="color: #000000;">&#41;</span>, &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Transform<span style="color: #000000;">&#40;</span> aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>, cPic <span style="color: #000000;">&#41;</span>, &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Transform<span style="color: #000000;">&#40;</span> aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>, cPic <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">aJustify</span>:= <span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span>, .f., .t., .t. , .t. <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> aDatos <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">lAdjLastCol</span>:= .f.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">lAutoEdit</span> &nbsp;:= .t.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">lAutoSkip</span> &nbsp;:= .t.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">nLineStyle</span> &nbsp;:= <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">nHeaderStyle</span>:= <span style="color: #000000;">2</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">bBkColor</span>:= <span style="color: #000000;">&#123;</span>|nRow,nCol,nStyle| ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nStyle==<span style="color: #000000;">1</span>,<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nCol%<span style="color: #000000;">2</span>==<span style="color: #000000;">0</span>, CLR_RED &nbsp; , CLR_GREEN <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">bTextColor</span>:= <span style="color: #000000;">&#123;</span>|nRow,nCol,nStyle| ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nStyle==<span style="color: #000000;">1</span>,<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nCol%<span style="color: #000000;">2</span>==<span style="color: #000000;">0</span>, CLR_YELLOW, CLR_WHITE <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> l3D<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oLbx:<span style="color: #000000;">Set3DStyle</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">bEdit</span>:= <span style="color: #000000;">&#123;</span>|nCol, cBuffer, lFirstEdit|;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EditaCelda<span style="color: #000000;">&#40;</span> oLbx, nCol, cBuffer, aDatos, lFirstEdit, aTotal <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;@<span style="color: #000000;">105</span>, <span style="color: #000000;">110</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Neto Gravado "</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp; &nbsp; &nbsp;@<span style="color: #000000;">115</span>, <span style="color: #000000;">110</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"I.V.A. 21% &nbsp; "</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp; &nbsp; &nbsp;@<span style="color: #000000;">125</span>, <span style="color: #000000;">110</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Total &nbsp; &nbsp; &nbsp; &nbsp;"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp; &nbsp; &nbsp;@<span style="color: #000000;">105</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">SAY</span> aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'@ZE 999,999.99'</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">10</span><br />&nbsp; &nbsp; &nbsp; &nbsp;@<span style="color: #000000;">115</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">SAY</span> aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'@ZE 999,999.99'</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">10</span><br />&nbsp; &nbsp; &nbsp; &nbsp;@<span style="color: #000000;">125</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">SAY</span> aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'@ZE 999,999.99'</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">10</span><br /><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;@<span style="color: #000000;">137</span>,<span style="color: #000000;">10</span> &nbsp;<span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Agrega"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> NewReg<span style="color: #000000;">&#40;</span> aDatos, oLbx <span style="color: #000000;">&#41;</span>, oLbx:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #00C800;">Nil</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;@<span style="color: #000000;">137</span>,<span style="color: #000000;">80</span> &nbsp;<span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Modifica"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span>aDatos<span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span> .and. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">nAt</span> <= Len<span style="color: #000000;">&#40;</span>aDatos<span style="color: #000000;">&#41;</span> .and. oLbx:<span style="color: #000000;">nAt</span> > <span style="color: #000000;">0</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #00C800;">Nil</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;@<span style="color: #000000;">137</span>,<span style="color: #000000;">150</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Elimina"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span>aDatos<span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span> .and. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style="color: #000000;">nAt</span> <= Len<span style="color: #000000;">&#40;</span>aDatos<span style="color: #000000;">&#41;</span> .and. oLbx:<span style="color: #000000;">nAt</span> > <span style="color: #000000;">0</span> .and. &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Alert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Borra ?"</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"ok"</span>,<span style="color: #ff0000;">"Cancela"</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">1</span>, &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DelReg<span style="color: #000000;">&#40;</span> aDatos, oLbx, aTotal <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #00C800;">Nil</span><br /><br /><br /><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><br /><br />&nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp;ReleaseDC<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 /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> GetSysFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ; <span style="color: #00C800;">return</span> <span style="color: #ff0000;">"MS Sans Serif"</span><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">Function</span> EditaCelda<span style="color: #000000;">&#40;</span> oLbx, nCol, cBuffer, aDatos, lFirstEdit, aTotal <span style="color: #000000;">&#41;</span><br />&nbsp;<span style="color: #00C800;">LOCAL</span> aResult, nAt:= oLbx:<span style="color: #000000;">nAt</span>, uBuffer, lContinue:= .t.<br />&nbsp;<span style="color: #00C800;">LOCAL</span> bValid, nColReal:= nCol<br /><br />&nbsp; &nbsp; nCol-- &nbsp;<span style="color: #B900B9;">// Para que sea como si no exisiera BitMap</span><br /><br />&nbsp; &nbsp; uBuffer:= aDatos<span style="color: #000000;">&#91;</span>nAt,nCol<span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">While</span> .t.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Do</span> <span style="color: #00C800;">Case</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Case</span> <span style="color: #000000;">&#40;</span> nCol == <span style="color: #000000;">2</span> .or. nCol == <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> .and. lFirstEdit<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Alert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Columnas NO EDITABLES"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> .f.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Case</span> nCol == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bValid:= <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> Empty<span style="color: #000000;">&#40;</span> aResult:= SeekItem<span style="color: #000000;">&#40;</span> uBuffer <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>Alert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Codigo Articulo Inexistente :-("</span><span style="color: #000000;">&#41;</span>,.F.<span style="color: #000000;">&#41;</span> , .T. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> lContinue:= oLbx:<span style="color: #000000;">lEditCol</span><span style="color: #000000;">&#40;</span> nColReal, @uBuffer, <span style="color: #ff0000;">"@ZE 9999"</span>, bValid,,CLR_YELLOW <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:= uBuffer<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:= aResult<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:= aResult<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Case</span> nCol == <span style="color: #000000;">3</span> &nbsp;<span style="color: #B900B9;">// Cantidad</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> lContinue:= oLbx:<span style="color: #000000;">lEditCol</span><span style="color: #000000;">&#40;</span> nColReal, &nbsp;@uBuffer, <span style="color: #ff0000;">"@ZE 999,999.99"</span>,,,CLR_YELLOW <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> uBuffer <= <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Alert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Debe Especificar una cantidad !!!"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Loop<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:= uBuffer<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Case</span> nCol == <span style="color: #000000;">4</span> &nbsp;<span style="color: #B900B9;">// Unitario</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> lContinue:= oLbx:<span style="color: #000000;">lEditCol</span><span style="color: #000000;">&#40;</span> nColReal, @uBuffer, <span style="color: #ff0000;">"@ZE 999,999.99"</span>,,,CLR_YELLOW <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:= uBuffer<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:= .f. &nbsp;<span style="color: #B900B9;">// Ya no es un Nuevo Registro !!!</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Case</span> nCol == <span style="color: #000000;">5</span> .and. ! lFirstEdit .and. Len<span style="color: #000000;">&#40;</span> aDatos <span style="color: #000000;">&#41;</span> == nAt<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NewReg<span style="color: #000000;">&#40;</span> aDatos, oLbx <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndCase</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> ! lContinue .and. aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> <span style="color: #B900B9;">// Se habia agregado un nuevo Item !!!</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> Alert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Cancela este Nuevo Registro"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Ok"</span>,<span style="color: #ff0000;">"Cancelar"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DelReg<span style="color: #000000;">&#40;</span> aDatos, oLbx, aTotal <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Loop<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;Exit<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">EndDo</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">If</span> Len<span style="color: #000000;">&#40;</span> aDatos <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp;aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:= <span style="color: #0000ff;">Round</span><span style="color: #000000;">&#40;</span> aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> * aDatos<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;Suma<span style="color: #000000;">&#40;</span> aDatos, aTotal <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br /><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">If</span> lContinue<br />&nbsp; &nbsp; &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> oLbx:<span style="color: #000000;">nLastKey</span> == VK_UP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> !GetKeyState<span style="color: #000000;">&#40;</span>VK_SHIFT<span style="color: #000000;">&#41;</span>, <span style="color: #000000;">-3</span>, <span style="color: #000000;">-2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Case</span> oLbx:<span style="color: #000000;">nLastKey</span> == VK_DOWN<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> !GetKeyState<span style="color: #000000;">&#40;</span>VK_SHIFT<span style="color: #000000;">&#41;</span>, &nbsp;<span style="color: #000000;">3</span>, &nbsp;<span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Case</span> oLbx:<span style="color: #000000;">nLastKey</span> == VK_TAB<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> GetKeyState<span style="color: #000000;">&#40;</span>VK_SHIFT<span style="color: #000000;">&#41;</span>, <span style="color: #000000;">-1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndCase</span><br />&nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br /><br /><br /><span style="color: #00C800;">return</span> lContinue<br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">Function</span> SeekItem<span style="color: #000000;">&#40;</span> nCod <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// Simulamos busqueda en Base de Datos :-)</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">If</span> nCod >= <span style="color: #000000;">1</span> .and. nCod <= <span style="color: #000000;">500</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Producto "</span> + StrZero<span style="color: #000000;">&#40;</span> nCod, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>, nCod + <span style="color: #000000;">0.55</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #ff0000;">""</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">Function</span> NewReg<span style="color: #000000;">&#40;</span> aDatos, oLbx <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; Aadd<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span><span style="color: #000000;">0</span>,<span style="color: #ff0000;">""</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,.t.<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oLbx:<span style="color: #000000;">lHitBottom</span>:= .f.<br />&nbsp; &nbsp; oLbx:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">Function</span> DelReg<span style="color: #000000;">&#40;</span> aDatos, oLbx, aTotal <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ADel<span style="color: #000000;">&#40;</span> aDatos, oLbx:<span style="color: #000000;">nAt</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ASize<span style="color: #000000;">&#40;</span> aDatos, Len<span style="color: #000000;">&#40;</span> aDatos <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oLbx:<span style="color: #000000;">GoUp</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; Suma<span style="color: #000000;">&#40;</span> aDatos, aTotal <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">Function</span> Suma<span style="color: #000000;">&#40;</span> aDatos, aTotal <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:= <span style="color: #000000;">0</span><br />&nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> aDatos, <span style="color: #000000;">&#123;</span>|aItem| aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>+= aItem<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:= <span style="color: #0000ff;">Round</span><span style="color: #000000;">&#40;</span> aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:= <span style="color: #0000ff;">Round</span><span style="color: #000000;">&#40;</span> aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> * <span style="color: #000000;">0.21</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:= <span style="color: #0000ff;">Round</span><span style="color: #000000;">&#40;</span> aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> + aTotal<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> aTotal, <span style="color: #000000;">&#123;</span>|oSay| oSay:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span></div>[/code:1t8aownn] alguna sugerencia ??? saludos.
Clases y Prgs
Hola Prueba enlazar la libreria de wbrowse antes de las de fivewin [code=fw:3tn4ex7u]<div class="fw" id="{CB}" style="font-family: monospace;">wcta.exe, +<br />wcta.map, +<br />D:\APL\PRGS\LIB32\TWBRW32 +<br />c:\Fwh\lib\FiveHX.LIB +<br />&nbsp;</div>[/code:3tn4ex7u]
Clases y Prgs
ya enlace twbrw32 ahora me sale este error: ERROR BASE/1081 Argument Error: + from errorsys, line= 0 me puedes mandar la libreria correcta y la clase por favor ??? <!-- e --><a href="mailto:servicomver@hotmail.com">servicomver@hotmail.com</a><!-- e --> uso fwh 6.12 bc 5.55 harbour 1,0 (tambien intente xon xharbour 0.99.71) Saludos
Clases metodos en tGraph
Hola AmigosEstoy tratando de hacer unas pequeñas modificaciones al tGraph como poner un ListBox con MultiSelect en lugar del ComboBox de la barra para poder elegir 2 o mas Series. Cuando hago el seguimiento en el tGraph.prg poniendo el comando “?” en los metodos, los ignora totalmente y no se por donde va ni la razon por el error que emergeMi pregunta es: qué tecnica se usa para hacer el Debug o seguimiento en las clases y metodos?La información del Log no me ayuda mucho, no me dice donde está el error.Cordiales Saludos, Muchas gracias por anticipado yFeliz Navidad para todos.Jorge Vargas
Clases metodos en tGraph
Usa llamadas a MsgInfo( "traza 1" ), etc... Normalmente FiveWin preprocesa "?" por MsgInfo(), pero tal vez el orden de tus ficheros de cabecera (.CH) no sea el correcto, o estes usando una versión antigua.
Clases metodos en tGraph
Hola Amigos, Hola Antonio Les deseo un [b:p7nigs0l]Feliz Año Nuevo [/b:p7nigs0l]a todos y muchas gracias por la ayuda. tambien a ti Antonio muchas gracias. ya corregi el problema, no lo estaba compilando debidamente. <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> mi nueva pregunta es: estando en un punto del prg. en un MsgInfo por ejemplo, hay alguna forma de saber de dónde vino o cómo llegué a dicho punto?. algo asi como ver el stack? Jorge Vargas
Clasess y Funciones para facturacion electronica BOLIVIA
Amigos de foro Para el desarrollo de mi programa de facturacion electronica en linea en Bolivia, desarrolle algunas clases y funciones que tal vez le sirvan a alguien mas. Aca un resumen (tiene mucho mas..) [code=fw:y5xm6gml]<div class="fw" id="{CB}" style="font-family: monospace;"><br />TMsXml<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//para Enviar/recibir los mensajes WebServices con HTTP y validar XML con XSD</span><br />TXmlSOAP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//para generar XML Soap</span><br />T7za<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//para comprimir, generar archivos .TAR y .GZ con comando externo 7za.exe</span><br /> </div>[/code:y5xm6gml] Pueden descargarlo desde el siguiente enlace: [url:y5xm6gml]http&#58;//www&#46;sauro-sys&#46;com/Source/SR_Functions&#46;ZIP[/url:y5xm6gml] Ahora estoy desarrollando (ojala lo logre) una clase para encriptar con RSA con comando externo [b:y5xm6gml]OpenSSL.exe[/b:y5xm6gml] Atentamente, Rolando Cochabamba, Bolivia
Clasess y Funciones para facturacion electronica BOLIVIA
NOTAS: trabajo con: xHarbour v10194, BCC 7.3
Clasess y Funciones para facturacion electronica BOLIVIA
Muchas Gracias por el aporte estimado Rolando.
Clasess y Funciones para facturacion electronica BOLIVIA
Gracias por tu generosidad Rolando Pego aqui los parametros que utilizo con 7-zip para obtener máxima compresión (más lenta por supuesto) Me costó bastante ajustarlos puesto que no existe con switchs el sinónimo de "Mejor compresión" del GUI de 7zip [code=fw:1fnd9jlv]<div class="fw" id="{CB}" style="font-family: monospace;">SET SEVENZIP_COMANDO=%SEVENZIP_EXE% a -y -t7z -m0=lzma:<span style="color: #000000;">d</span>=1024m:<span style="color: #000000;">fb</span>=<span style="color: #000000;">273</span> -mx9 -md128m -mfb128 -ms=4g -ssw -bt -bb3 &nbsp;%NAME_FILE_7Z%</div>[/code:1fnd9jlv]
Clasess y Funciones para facturacion electronica BOLIVIA
Que sirva como ejemplo: [code=fw:27i2ju11]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #00C800;">Local</span> cXMLDir,cFileXML<br />   cXMLDir := <span style="color: #ff0000;">"."</span><br />   cFileXML := cXMLDir + <span style="color: #ff0000;">"<span style="color: #000000;">\F</span>actura_1"</span><br />   T7za<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>:<span style="color: #000000;">RunCMD</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"a"</span>,<span style="color: #ff0000;">"-y -t7z -m0=lzma:d=1024m:fb=273 -mx9 -md128m -mfb128 -ms=4g -ssw -bt -bb3"</span>,<span style="color: #ff0000;">'"'</span>+cFileXML+<span style="color: #ff0000;">'"'</span>, <span style="color: #ff0000;">'"'</span>+cFileXML+<span style="color: #ff0000;">".xml"</span>+<span style="color: #ff0000;">'"'</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:27i2ju11] - Genera el archivo [b:27i2ju11]Factura_1.7z[/b:27i2ju11] en la carpeta del ejecutable - Importante notar en [b:27i2ju11]'"'+cFileXML+'"'[/b:27i2ju11] las comillas antes y despues del nombre, para cuando se tiene espacios
Clasess y Funciones para facturacion electronica BOLIVIA
Estimado Rolando Como se utilizan las Clases que has brindado. Gracias por la ayuda
Clasess y Funciones para facturacion electronica BOLIVIA
[quote="acuellar":27b34ohm]Estimado Rolando Como se utilizan las Clases que has brindado. Gracias por la ayuda[/quote:27b34ohm] +1 Ejemplos simples, por favor. Regards, saludos.
Clasess y Funciones para facturacion electronica BOLIVIA
Hola Me podrian enviar, las classes y las funciones, por favor <!-- e --><a href="mailto:elmoceballos@gmail.com">elmoceballos@gmail.com</a><!-- e --> o colocarlo en un link, ya que el que esta arriba no funciona saludos gracias
Class < BtnBmp > changing to Style 2007 at Runtime ?
Hello, I added the Buttonpart for the new Update. I can switch Styles for BtnBmp between Color, Gradient and Transparent at Runtime, but cannot switch back to Style 2007. On init, there is no problem. Maybe a combination needed with : [color=#FF0000:3qbt4xuw]oBtn1:l2007 := .T.[/color:3qbt4xuw] [img:3qbt4xuw]http&#58;//www&#46;pflegeplus&#46;com/pictures/btnstyle1&#46;jpg[/img:3qbt4xuw] [code=fw:3qbt4xuw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">500</span> <span style="color: #0000ff;">OF</span> oWndBtnB  <span style="color: #000000;">2007</span> ;<br />FILENAME c_path + <span style="color: #ff0000;">"<span style="color: #000000;">\B</span>itmaps<span style="color: #000000;">\3</span>2Exit.bmp"</span> ;<br /><span style="color: #0000ff;">LEFT</span> ;<br /><span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" &Exit"</span> ;<br /><span style="color: #0000ff;">FONT</span> oTextFont ;<br /><span style="color: #0000ff;">ACTION</span>  <span style="color: #000000;">&#40;</span> oWndBtnB:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />oBtn1:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Test-Button"</span><br />...<br />...<br /><span style="color: #0000ff;">REDEFINE</span> SELEX oSelex12 <span style="color: #0000ff;">VAR</span> nBtnStyle5 <span style="color: #0000ff;">OF</span> oWndBtnB <span style="color: #0000ff;">ID</span> <span style="color: #000000;">130</span> ;<br /><span style="color: #0000ff;">ITEMS</span> <span style="color: #ff0000;">"2007"</span>, <span style="color: #ff0000;">"Grad."</span>,<span style="color: #ff0000;">"Color"</span>, <span style="color: #ff0000;">"Transp."</span> ;<br />GRADIENT OUTTRACK <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16770250</span>, <span style="color: #000000;">16312263</span> <span style="color: #000000;">&#125;</span>, ;<br />                       <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16312263</span>, <span style="color: #000000;">16770250</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> ;<br />GRADIENT INTRACK <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">8388608</span>, <span style="color: #000000;">16312263</span> <span style="color: #000000;">&#125;</span>, ;<br />                      <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16312263</span>, <span style="color: #000000;">8388608</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> ;<br />THUMBSIZE <span style="color: #000000;">30</span>, <span style="color: #000000;">20</span> ROUNDSIZE <span style="color: #000000;">5</span> ;<br /><span style="color: #0000ff;">COLOR</span> THUMB <span style="color: #000000;">14853684</span> ;<br />COLORTEXT <span style="color: #000000;">128</span>, <span style="color: #000000;">32768</span> ; <br /><span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Button-Style"</span> TOP ;<br /><span style="color: #0000ff;">FONT</span> oFont5 ;<br /><span style="color: #0000ff;">ACTION</span> BTN_SET<span style="color: #000000;">&#40;</span> oBtn1 <span style="color: #000000;">&#41;</span> ;<br />COLORTITLE <span style="color: #000000;">0</span> <br />...<br />...<br /><span style="color: #B900B9;">// -------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> BTN_SET<span style="color: #000000;">&#40;</span> oBtn1 <span style="color: #000000;">&#41;</span><br /><br />oBtn1:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">217</span>, nBtnHight5, .T. <span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #B900B9;">// ITEMS "2007", "Grad.","Color", "Transp." </span><br /><br /><span style="color: #00C800;">IF</span> nBtnStyle5 = <span style="color: #000000;">1</span> <span style="color: #B900B9;">// Doesn't work at Runtime ( only on Init ) !!!!!!!</span><br />    oBtn1:<span style="color: #000000;">l2007</span> := .T.<br />    oBtn1:<span style="color: #000000;">lTransparent</span> := .F.<br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> nBtnStyle5 = <span style="color: #000000;">2</span><br />    oBtn1:<span style="color: #000000;">l2007</span> := .T.<br />    oBtn1:<span style="color: #000000;">bClrGrad</span> = <span style="color: #000000;">&#123;</span> | lMouseOver | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lMouseOver,;<br />                <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> nMove5, nColor5a, nColor5b <span style="color: #000000;">&#125;</span>, ;<br />                  <span style="color: #000000;">&#123;</span> nMove5, nColor5b, nColor5a <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />                <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> nMove5, nColor5a, nColor5b <span style="color: #000000;">&#125;</span>, ;<br />                  <span style="color: #000000;">&#123;</span> nMove5, nColor5b, nColor5a <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> nBtnStyle5 = <span style="color: #000000;">3</span><br />    oBtn1:<span style="color: #000000;">l2007</span> := .T.<br />    oBtn1:<span style="color: #000000;">bClrGrad</span> = <span style="color: #000000;">&#123;</span> | lMouseOver | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lMouseOver,;<br />                <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> nMove5, nColor5a, nColor5a <span style="color: #000000;">&#125;</span>, ;<br />                  <span style="color: #000000;">&#123;</span> nMove5, nColor5a, nColor5a <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />                <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> nMove5, nColor5a, nColor5b <span style="color: #000000;">&#125;</span>, ;<br />                  <span style="color: #000000;">&#123;</span> nMove5, nColor5b, nColor5a <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> nBtnStyle5 = <span style="color: #000000;">4</span><br />    oBtn1:<span style="color: #000000;">l2007</span> := .F.<br />    oBtn1:<span style="color: #000000;">lTransparent</span> := .T.<br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #B900B9;">// --------------------</span><br /><br /><span style="color: #00C800;">IF</span> nBRound5 = <span style="color: #000000;">1</span><br />    oBtn1:<span style="color: #000000;">lRound</span> := .T.<br /><span style="color: #00C800;">ELSE</span>    <br />    oBtn1:<span style="color: #000000;">lRound</span> := .F. <br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #B900B9;">//---------------------</span><br /><br /><span style="color: #00C800;">IF</span> nBorder5 = <span style="color: #000000;">1</span><br />    oBtn1:<span style="color: #000000;">lBorder</span> := .T.<br /><span style="color: #00C800;">ELSE</span><br />    oBtn1:<span style="color: #000000;">lBorder</span> := .F.<br /><span style="color: #00C800;">ENDIF</span><br /><br />oBtn1:<span style="color: #0000ff;">Refresh</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 /> </div>[/code:3qbt4xuw] Best Regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
Class < BtnBmp > changing to Style 2007 at Runtime ?
A testfile without Resource ( just copy to folder /samples ) : Once a different Background is selected ( Color, Gradient or Transparent ), it is impossible to switch back to Style 2007. Maybe possible to [color=#FF0000:1utlgvhg]RESET[/color:1utlgvhg] Buttonstyle and select Style 2007 ? My Solution, to define a new Gradient ( Style 2007 ), works. [img:1utlgvhg]http&#58;//www&#46;pflegeplus&#46;com/pictures/testbtn7&#46;jpg[/img:1utlgvhg] [code=fw:1utlgvhg]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">static</span> oWnd<br />    <br /><span style="color: #B900B9;">//----------------------------------------------------------------//</span><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> oBtn0, oBtn1, oBtn2, oBtn3, oBtn4, oFont<br /><span style="color: #00C800;">local</span> cVer := FWVERSION<br />   <br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span>  oFont  <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"MS SANS SERIF"</span>  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">dialog</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test Buttonstyle"</span> + cVer <span style="color: #0000ff;">size</span> <span style="color: #000000;">500</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">pixel</span><br />   <br />@ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BTNBMP</span> oBtn0 <span style="color: #0000ff;">OF</span> oWnd  ;<br /><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span> ;<br /><span style="color: #0000ff;">PROMPT</span> cVer FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\B</span>ITMAPS<span style="color: #000000;">\s</span>ms.bmp"</span> ;                <br /><span style="color: #0000ff;">FONT</span> oFont BOTTOM ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Testbutton"</span><span style="color: #000000;">&#41;</span> <br /><br /><br /><span style="color: #B900B9;">// Style 2007</span><br /><span style="color: #B900B9;">// -------------</span><br />@ <span style="color: #000000;">100</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BTNBMP</span> oBtn1 <span style="color: #0000ff;">OF</span> oWnd  ;<br /><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">30</span>   ;<br /><span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&2007"</span>  <span style="color: #000000;">2007</span> ;                <br /><span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">CENTER</span> ;<br /><span style="color: #0000ff;">ACTION</span> BTN_SET<span style="color: #000000;">&#40;</span> oBtn0, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #B900B9;">// Color</span><br /><span style="color: #B900B9;">// -------</span><br />@ <span style="color: #000000;">100</span>, <span style="color: #000000;">70</span> <span style="color: #0000ff;">BTNBMP</span> oBtn2 <span style="color: #0000ff;">OF</span> oWnd  ;<br /><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">30</span>   ;<br /><span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Color"</span> <span style="color: #000000;">2007</span> ;                <br /><span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">CENTER</span> ;<br /><span style="color: #0000ff;">ACTION</span> BTN_SET<span style="color: #000000;">&#40;</span> oBtn0, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #B900B9;">// Gradient</span><br /><span style="color: #B900B9;">//------------</span><br />@ <span style="color: #000000;">100</span>, <span style="color: #000000;">130</span> <span style="color: #0000ff;">BTNBMP</span> oBtn3 <span style="color: #0000ff;">OF</span> oWnd  ;<br /><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">30</span>   ;<br /><span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Gradient"</span> <span style="color: #000000;">2007</span> ;                <br /><span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">CENTER</span> ;<br /><span style="color: #0000ff;">ACTION</span> BTN_SET<span style="color: #000000;">&#40;</span> oBtn0, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #B900B9;">// Transparent</span><br /><span style="color: #B900B9;">// ----------------</span><br />@ <span style="color: #000000;">100</span>, <span style="color: #000000;">190</span> <span style="color: #0000ff;">BTNBMP</span> oBtn4 <span style="color: #0000ff;">OF</span> oWnd  ;<br /><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">30</span> ;<br /><span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Transparent"</span> <span style="color: #000000;">2007</span> ;                <br /><span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">CENTER</span> ;<br /><span style="color: #0000ff;">ACTION</span> BTN_SET<span style="color: #000000;">&#40;</span> oBtn0, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <br />      <br />                      <br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWnd <span style="color: #0000ff;">CENTER</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> BTN_SET<span style="color: #000000;">&#40;</span> oBtn0, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// starts with Buttonstyle 2007</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> BTN_SET<span style="color: #000000;">&#40;</span> oBtn0, nStyle <span style="color: #000000;">&#41;</span><br /><br />oBtn0:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span>, .T. <span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #B900B9;">// ITEMS "2007", "Color", "Grad.", "Transp." </span><br /><br /><span style="color: #00C800;">IF</span> nStyle = <span style="color: #000000;">1</span><br />    oBtn0:<span style="color: #000000;">l2007</span> := .T.<br />    oBtn0:<span style="color: #000000;">lTransparent</span> := .F.<br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> nStyle = <span style="color: #000000;">2</span><br />    oBtn0:<span style="color: #000000;">l2007</span> := .T.<br />    oBtn0:<span style="color: #000000;">bClrGrad</span> = <span style="color: #000000;">&#123;</span> | lMouseOver | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lMouseOver,;<br />                <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">14853684</span>, <span style="color: #000000;">14853684</span> <span style="color: #000000;">&#125;</span>, ;<br />                  <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">14853684</span>, <span style="color: #000000;">14853684</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />                <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">14853684</span>, <span style="color: #000000;">16312263</span> <span style="color: #000000;">&#125;</span>, ;<br />                  <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16312263</span>, <span style="color: #000000;">14853684</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> nStyle = <span style="color: #000000;">3</span><br />    oBtn0:<span style="color: #000000;">l2007</span> := .T.<br />    oBtn0:<span style="color: #000000;">bClrGrad</span> = <span style="color: #000000;">&#123;</span> | lMouseOver | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lMouseOver,;<br />                <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">14853684</span>, <span style="color: #000000;">16312263</span> <span style="color: #000000;">&#125;</span>, ;<br />                  <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16312263</span>, <span style="color: #000000;">14853684</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />                <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">14853684</span>, <span style="color: #000000;">16312263</span> <span style="color: #000000;">&#125;</span>, ;<br />                  <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16312263</span>, <span style="color: #000000;">14853684</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> nStyle = <span style="color: #000000;">4</span><br />    oBtn0:<span style="color: #000000;">l2007</span> := .F.<br />    oBtn0:<span style="color: #000000;">lTransparent</span> := .T.<br /><span style="color: #00C800;">ENDIF</span><br /><br />oBtn0:<span style="color: #0000ff;">Refresh</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 /> </div>[/code:1utlgvhg] It only works with a new Gradient define ( Style 2007 ) [code=fw:1utlgvhg]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">IF</span> nStyle = <span style="color: #000000;">1</span><br />    oBtn0:<span style="color: #000000;">l2007</span> := .T.<br />    oBtn0:<span style="color: #000000;">lTransparent</span> := .F.<br />        oBtn0:<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lInvert, ;<br />                       <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>/<span style="color: #000000;">3</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">253</span>, <span style="color: #000000;">222</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">231</span>, <span style="color: #000000;">151</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />                         <span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>/<span style="color: #000000;">3</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">215</span>,  <span style="color: #000000;">84</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">233</span>, <span style="color: #000000;">162</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>, ;<br />                       <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>/<span style="color: #000000;">2</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">219</span>, <span style="color: #000000;">230</span>, <span style="color: #000000;">244</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">207</span><span style="color: #000000;">-50</span>, <span style="color: #000000;">221</span><span style="color: #000000;">-25</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />                         <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>/<span style="color: #000000;">2</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">201</span><span style="color: #000000;">-50</span>, <span style="color: #000000;">217</span><span style="color: #000000;">-25</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">231</span>, <span style="color: #000000;">242</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">ENDIF</span><br /> </div>[/code:1utlgvhg] Gradient defined ( Buttonstyle 2007 ) [img:1utlgvhg]http&#58;//www&#46;pflegeplus&#46;com/pictures/testbtn8&#46;jpg[/img:1utlgvhg] Best Regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
Class ActiveX
estoy finalizando las melhorias en la class ToleWevents pero ainda necessito de una ajuda, estoy testando un activeX que necessito passar pelo objetos valores e recebelos, EX: [code=fw:2yzmslmz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">public</span> top:=<span style="color: #000000;">0</span>, width:=<span style="color: #000000;">0</span>, <span style="color: #0000ff;">left</span>:=<span style="color: #000000;">0</span>, <span style="color: #0000ff;">right</span>:=<span style="color: #000000;">0</span><br />myActive:<span style="color: #000000;">GetWindowRect</span><span style="color: #000000;">&#40;</span> @top, @width, @<span style="color: #0000ff;">left</span>, @<span style="color: #0000ff;">right</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span>top<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// con la Class TActiveX funciona perfeitamente pero con la ToleWevents da GPFs</span></div>[/code:2yzmslmz] yo no entendo de C/C++ Alguem pode ajudar ? creio que necessita alterar alguna cosa en lo arquivo C Arquivo: [b:2yzmslmz]ToleWevents.c[/b:2yzmslmz] [code=fw:2yzmslmz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br /> *  Events for OLE<br /> *  (c) 2008 Carlos Mora (<!-- e --><a href="mailto:carlosantoniomora@yahoo.es">carlosantoniomora@yahoo.es</a><!-- e --> - harbouradvisor.blogspot.com )<br /> *  based on the work of Oscar Lira Lira for ActiveX<br /> *    (<!-- e --><a href="mailto:oscarlira78@hotmail.com">oscarlira78@hotmail.com</a><!-- e --> - <!-- m --><a class="postlink" href="http://freewin.sytes.net">http://freewin.sytes.net</a><!-- m -->)<br /> */</span><br /><br />#ifndef NONAMELESSUNION<br />   <span style="color: #00D7D7;">#define</span> NONAMELESSUNION<br />#endif<br /><br />#ifndef _HB_API_INTERNAL_<br />   <span style="color: #00D7D7;">#define</span> _HB_API_INTERNAL_<br />#endif<br /><br /><span style="color: #00D7D7;">#include</span> <hbvmopt.h><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <commctrl.h><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <hbvm.h><br /><span style="color: #00D7D7;">#include</span> <hbstack.h><br /><span style="color: #00D7D7;">#include</span> <ocidl.h><br /><span style="color: #00D7D7;">#include</span> <hbapiitm.h><br /><br />#ifdef HB_ITEM_NIL<br />   <span style="color: #00D7D7;">#define</span> hb_dynsymSymbol<span style="color: #000000;">&#40;</span> pDynSym <span style="color: #000000;">&#41;</span>        <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> pDynSym <span style="color: #000000;">&#41;</span>->pSymbol <span style="color: #000000;">&#41;</span><br />#endif<br /><br />PHB_SYMB s___GetMessage = <span style="color: #00C800;">NULL</span>;<br /><br />typedef HRESULT <span style="color: #000000;">&#40;</span> WINAPI *LPAtlAxWinInit <span style="color: #000000;">&#41;</span>       <span style="color: #000000;">&#40;</span> void <span style="color: #000000;">&#41;</span>;<br />typedef HRESULT <span style="color: #000000;">&#40;</span> WINAPI *LPAtlAxGetControl <span style="color: #000000;">&#41;</span>    <span style="color: #000000;">&#40;</span> HWND, IUnknown** <span style="color: #000000;">&#41;</span>;<br />typedef HRESULT <span style="color: #000000;">&#40;</span> WINAPI *LPAtlAxCreateControl <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span> LPCOLESTR, HWND, IStream*, IUnknown** <span style="color: #000000;">&#41;</span>;<br /><br />HMODULE hDll = <span style="color: #00C800;">NULL</span>;<br />LPAtlAxWinInit       AtlAxWinInit;<br />LPAtlAxGetControl    AtlAxGetControl;<br />LPAtlAxCreateControl AtlAxCreateControl;<br /><br /><span style="color: #00C800;">static</span> void LoadAtl<span style="color: #000000;">&#40;</span> void <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ! hDll <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      hDll = LoadLibrary<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Atl.dll"</span> <span style="color: #000000;">&#41;</span>;<br />      AtlAxWinInit       = <span style="color: #000000;">&#40;</span> LPAtlAxWinInit <span style="color: #000000;">&#41;</span>       GetProcAddress<span style="color: #000000;">&#40;</span> hDll, <span style="color: #ff0000;">"AtlAxWinInit"</span> <span style="color: #000000;">&#41;</span>;<br />      AtlAxGetControl    = <span style="color: #000000;">&#40;</span> LPAtlAxGetControl <span style="color: #000000;">&#41;</span>    GetProcAddress<span style="color: #000000;">&#40;</span> hDll, <span style="color: #ff0000;">"AtlAxGetControl"</span> <span style="color: #000000;">&#41;</span>;<br />      AtlAxCreateControl = <span style="color: #000000;">&#40;</span> LPAtlAxCreateControl <span style="color: #000000;">&#41;</span> GetProcAddress<span style="color: #000000;">&#40;</span> hDll, <span style="color: #ff0000;">"AtlAxCreateControl"</span> <span style="color: #000000;">&#41;</span>;<br />      AtlAxWinInit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />   <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> OLEWECREATE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   HWND hWndCtrl;<br /><br />   LoadAtl<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />   hWndCtrl = CreateWindowEx<span style="color: #000000;">&#40;</span><br />      <span style="color: #000000;">&#40;</span>DWORD<span style="color: #000000;">&#41;</span>   <span style="color: #000000;">0</span>                   ,   <span style="color: #B900B9;">// nExStyle</span><br />      <span style="color: #000000;">&#40;</span>LPCTSTR<span style="color: #000000;">&#41;</span> <span style="color: #ff0000;">"AtlAxWin"</span>          ,   <span style="color: #B900B9;">// cClsName</span><br />      <span style="color: #000000;">&#40;</span>LPCTSTR<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: #B900B9;">// cProgId</span><br />      <span style="color: #000000;">&#40;</span>DWORD<span style="color: #000000;">&#41;</span>   WS_OVERLAPPEDWINDOW ,   <span style="color: #B900B9;">// style</span><br />                CW_USEDEFAULT       ,   <span style="color: #B900B9;">// nLeft</span><br />                CW_USEDEFAULT       ,   <span style="color: #B900B9;">// nTop</span><br />                <span style="color: #000000;">0</span>                   ,   <span style="color: #B900B9;">// nWidth</span><br />                <span style="color: #000000;">0</span>                   ,   <span style="color: #B900B9;">// nHeight</span><br />                HWND_DESKTOP        ,    <span style="color: #B900B9;">// oParent:handle</span><br />               <span style="color: #000000;">0</span>,<br />               <span style="color: #000000;">0</span>,<br />               <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br /><br />   hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>long<span style="color: #000000;">&#41;</span> hWndCtrl <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> OLEWEDESTROY <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   DestroyWindow<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>HWND<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 /><br /><span style="color: #000000;">&#125;</span><br /><br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> OLEGETDISP <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   IUnknown *pUnk;<br />   IDispatch *pDisp;<br />   LoadAtl<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />   AtlAxGetControl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>HWND<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>, &pUnk <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>pUnk<span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      pUnk->lpVtbl->QueryInterface<span style="color: #000000;">&#40;</span> pUnk, &IID_IDispatch, <span style="color: #000000;">&#40;</span> void ** <span style="color: #000000;">&#41;</span> &pDisp <span style="color: #000000;">&#41;</span>;<br />      pUnk->lpVtbl->Release<span style="color: #000000;">&#40;</span> pUnk <span style="color: #000000;">&#41;</span>;<br />      hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>long<span style="color: #000000;">&#41;</span> pDisp <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br />HRESULT hb_oleVariantToItem<span style="color: #000000;">&#40;</span> PHB_ITEM pItem, VARIANT *pVariant <span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #00C800;">static</span> void HB_EXPORT hb_itemPushList<span style="color: #000000;">&#40;</span> ULONG ulRefMask, ULONG ulPCount, PHB_ITEM** pItems <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   PHB_ITEM itmRef;<br />   ULONG ulParam;<br /><br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ulPCount <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      itmRef = hb_itemNew<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br /><br />      itmRef->type = HB_IT_BYREF;<br />      itmRef->item.asRefer.offset = <span style="color: #000000;">-1</span>;<br />      itmRef->item.asRefer.BasePtr.itemsbasePtr = pItems;<br />      <span style="color: #00C800;">for</span><span style="color: #000000;">&#40;</span> ulParam = <span style="color: #000000;">0</span>; ulParam < ulPCount; ulParam++ <span style="color: #000000;">&#41;</span><br />      <span style="color: #000000;">&#123;</span><br />         <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ulRefMask & <span style="color: #000000;">&#40;</span> 1L << ulParam <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #000000;">&#123;</span><br />            itmRef->item.asRefer.value = ulParam<span style="color: #000000;">+1</span>;<br />            hb_vmPush<span style="color: #000000;">&#40;</span> itmRef <span style="color: #000000;">&#41;</span>;<br />         <span style="color: #000000;">&#125;</span><br />         <span style="color: #00C800;">else</span><br />         <span style="color: #000000;">&#123;</span><br />            hb_vmPush<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>*pItems<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span>ulParam<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>;<br />         <span style="color: #000000;">&#125;</span><br />      <span style="color: #000000;">&#125;</span><br /><br />      hb_itemRelease<span style="color: #000000;">&#40;</span> itmRef <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br />#undef  <span style="color: #00C800;">INTERFACE</span><br /><span style="color: #00D7D7;">#define</span> <span style="color: #00C800;">INTERFACE</span> IEventHandler<br /><br />DECLARE_INTERFACE_ <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">INTERFACE</span>, IDispatch <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   STDMETHOD  <span style="color: #000000;">&#40;</span> QueryInterface          <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span> THIS_ REFIID, void **                                                          <span style="color: #000000;">&#41;</span> PURE;<br />   STDMETHOD_ <span style="color: #000000;">&#40;</span> ULONG, AddRef           <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span> THIS                                                                           <span style="color: #000000;">&#41;</span> PURE;<br />   STDMETHOD_ <span style="color: #000000;">&#40;</span> ULONG, <span style="color: #0000ff;">Release</span>          <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span> THIS                                                                           <span style="color: #000000;">&#41;</span> PURE;<br />   STDMETHOD_ <span style="color: #000000;">&#40;</span> ULONG, GetTypeInfoCount <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span> THIS_ UINT *                                                                   <span style="color: #000000;">&#41;</span> PURE;<br />   STDMETHOD_ <span style="color: #000000;">&#40;</span> ULONG, GetTypeInfo      <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span> THIS_ UINT, LCID, ITypeInfo **                                                 <span style="color: #000000;">&#41;</span> PURE;<br />   STDMETHOD_ <span style="color: #000000;">&#40;</span> ULONG, GetIDsOfNames    <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span> THIS_ REFIID, LPOLESTR *, UINT, LCID, DISPID *                                 <span style="color: #000000;">&#41;</span> PURE;<br />   STDMETHOD_ <span style="color: #000000;">&#40;</span> ULONG, Invoke           <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span> THIS_ DISPID, REFIID, LCID, WORD, DISPPARAMS *, VARIANT *, EXCEPINFO *, UINT * <span style="color: #000000;">&#41;</span> PURE;<br /><span style="color: #000000;">&#125;</span>;<br /><br /><br />typedef struct <span style="color: #000000;">&#123;</span><br /><br />   IEventHandler*          lpVtbl;<br />   DWORD                   <span style="color: #0000ff;">count</span>;<br />   IConnectionPoint*       pIConnectionPoint;<br />   DWORD                   dwEventCookie;<br />   IID                     device_event_interface_iid;<br />   PHB_ITEM                pEvents;<br />   PHB_ITEM                pEventsExec;<br /><br /><span style="color: #000000;">&#125;</span> MyRealIEventHandler;<br /><br /><span style="color: #00C800;">static</span> HRESULT STDMETHODCALLTYPE QueryInterface<span style="color: #000000;">&#40;</span> IEventHandler *this, REFIID vTableGuid, void **ppv <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br /><br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> IsEqualIID<span style="color: #000000;">&#40;</span> vTableGuid, &IID_IUnknown <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      *ppv = <span style="color: #000000;">&#40;</span>IUnknown*<span style="color: #000000;">&#41;</span> this;<br />      this->lpVtbl->AddRef<span style="color: #000000;">&#40;</span> this <span style="color: #000000;">&#41;</span>;<br />      <span style="color: #00C800;">return</span> S_OK;<br />   <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> IsEqualIID<span style="color: #000000;">&#40;</span> vTableGuid, &IID_IDispatch <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      *ppv = <span style="color: #000000;">&#40;</span>IDispatch*<span style="color: #000000;">&#41;</span> this;<br />      this->lpVtbl->AddRef<span style="color: #000000;">&#40;</span> this <span style="color: #000000;">&#41;</span>;<br />      <span style="color: #00C800;">return</span> S_OK;<br />   <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> IsEqualIID<span style="color: #000000;">&#40;</span> vTableGuid, &<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>MyRealIEventHandler*<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->device_event_interface_iid <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      *ppv = <span style="color: #000000;">&#40;</span>IDispatch*<span style="color: #000000;">&#41;</span> this;<br />      this->lpVtbl->AddRef<span style="color: #000000;">&#40;</span> this <span style="color: #000000;">&#41;</span>;<br />      <span style="color: #00C800;">return</span> S_OK;<br />   <span style="color: #000000;">&#125;</span><br /><br />   *ppv = <span style="color: #000000;">0</span>;<br />   <span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span>E_NOINTERFACE<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">static</span> ULONG STDMETHODCALLTYPE AddRef<span style="color: #000000;">&#40;</span>IEventHandler *this<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   <span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span>++<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>MyRealIEventHandler *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->count<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">static</span> ULONG STDMETHODCALLTYPE <span style="color: #0000ff;">Release</span><span style="color: #000000;">&#40;</span>IEventHandler *this<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>--<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>MyRealIEventHandler *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->count == <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      GlobalFree<span style="color: #000000;">&#40;</span>this<span style="color: #000000;">&#41;</span>;<br />      <span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>;<br />   <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>MyRealIEventHandler *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->count<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">static</span> ULONG STDMETHODCALLTYPE GetTypeInfoCount<span style="color: #000000;">&#40;</span>IEventHandler *this, UINT *pCount<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>this<span style="color: #000000;">&#41;</span>;<br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>pCount<span style="color: #000000;">&#41;</span>;<br />   <span style="color: #00C800;">return</span> E_NOTIMPL;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">static</span> ULONG STDMETHODCALLTYPE GetTypeInfo<span style="color: #000000;">&#40;</span>IEventHandler *this, UINT itinfo, LCID lcid, ITypeInfo **pTypeInfo<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>this<span style="color: #000000;">&#41;</span>;<br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>itinfo<span style="color: #000000;">&#41;</span>;<br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>lcid<span style="color: #000000;">&#41;</span>;<br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>pTypeInfo<span style="color: #000000;">&#41;</span>;<br />   <span style="color: #00C800;">return</span> E_NOTIMPL;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">static</span> ULONG STDMETHODCALLTYPE GetIDsOfNames<span style="color: #000000;">&#40;</span>IEventHandler *this, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>this<span style="color: #000000;">&#41;</span>;<br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>riid<span style="color: #000000;">&#41;</span>;<br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>rgszNames<span style="color: #000000;">&#41;</span>;<br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>cNames<span style="color: #000000;">&#41;</span>;<br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>lcid<span style="color: #000000;">&#41;</span>;<br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>rgdispid<span style="color: #000000;">&#41;</span>;<br />   <span style="color: #00C800;">return</span> E_NOTIMPL;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">static</span> ULONG STDMETHODCALLTYPE Invoke<span style="color: #000000;">&#40;</span> IEventHandler *this, DISPID dispid, REFIID riid,<br />   LCID lcid, WORD wFlags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *pexcepinfo,<br />   UINT *puArgErr <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   PHB_ITEM pItem;<br />   USHORT iArg, i;<br />   PHB_ITEM pItemArray<span style="color: #000000;">&#91;</span><span style="color: #000000;">32</span><span style="color: #000000;">&#93;</span>;<br />   PHB_ITEM *pItems;<br />   ULONG ulRefMask = <span style="color: #000000;">0</span>;<br />   ULONG ulPos;<br />   PHB_ITEM Key;<br />   BOOL bDefault = <span style="color: #00C800;">FALSE</span>;<br /><br />   Key = hb_itemNew<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br /><br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> !IsEqualIID<span style="color: #000000;">&#40;</span> riid, &IID_NULL <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> DISP_E_UNKNOWNINTERFACE <span style="color: #000000;">&#41;</span>;<br /><br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>lcid<span style="color: #000000;">&#41;</span>;<br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>wFlags<span style="color: #000000;">&#41;</span>;<br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>result<span style="color: #000000;">&#41;</span>;<br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>pexcepinfo<span style="color: #000000;">&#41;</span>;<br />   HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>puArgErr<span style="color: #000000;">&#41;</span>;<br /><br />   ulPos = hb_arrayScan<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>MyRealIEventHandler* <span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->pEvents, hb_itemPutNL<span style="color: #000000;">&#40;</span> Key, dispid <span style="color: #000000;">&#41;</span>,<br />      <span style="color: #00C800;">NULL</span>, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span><br />         #ifdef __XHARBOUR__<br />            , <span style="color: #000000;">0</span><br />         #endif<br />      <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> !ulPos <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      ulPos = hb_arrayScan<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>MyRealIEventHandler* <span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->pEvents, hb_itemPutNL<span style="color: #000000;">&#40;</span> Key, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>,<br />      <span style="color: #00C800;">NULL</span>, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span><br />         #ifdef __XHARBOUR__<br />            , <span style="color: #000000;">0</span><br />         #endif<br />      <span style="color: #000000;">&#41;</span>;<br />      bDefault = <span style="color: #00C800;">TRUE</span>;<br />   <span style="color: #000000;">&#125;</span>;<br /><br /><br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ulPos <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      PHB_ITEM pExec = hb_arrayGetItemPtr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>MyRealIEventHandler* <span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->pEventsExec, ulPos <span style="color: #000000;">&#41;</span>;<br /><br />      <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> pExec <span style="color: #000000;">&#41;</span><br />      <span style="color: #000000;">&#123;</span><br /><br />         hb_vmPushState<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><br />         <span style="color: #00C800;">switch</span> <span style="color: #000000;">&#40;</span> hb_itemType<span style="color: #000000;">&#40;</span> pExec <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #000000;">&#123;</span><br /><br />            <span style="color: #00C800;">case</span> HB_IT_BLOCK:<br />            <span style="color: #000000;">&#123;</span><br />               hb_vmPushSymbol<span style="color: #000000;">&#40;</span> &hb_symEval <span style="color: #000000;">&#41;</span>;<br />               hb_vmPush<span style="color: #000000;">&#40;</span> pExec <span style="color: #000000;">&#41;</span>;<br />               <span style="color: #00C800;">break</span>;<br />            <span style="color: #000000;">&#125;</span><br /><br />            <span style="color: #00C800;">case</span> HB_IT_STRING:<br />            <span style="color: #000000;">&#123;</span><br />               hb_vmPushSymbol<span style="color: #000000;">&#40;</span> hb_dynsymSymbol<span style="color: #000000;">&#40;</span> hb_dynsymFindName<span style="color: #000000;">&#40;</span> hb_itemGetCPtr<span style="color: #000000;">&#40;</span> pExec <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />               hb_vmPushNil<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />               <span style="color: #00C800;">break</span>;<br /><br />            <span style="color: #000000;">&#125;</span><br /><br />            <span style="color: #00C800;">case</span> HB_IT_POINTER:<br />            <span style="color: #000000;">&#123;</span><br />               hb_vmPushSymbol<span style="color: #000000;">&#40;</span> hb_dynsymSymbol<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>PHB_SYMB<span style="color: #000000;">&#41;</span> pExec <span style="color: #000000;">&#41;</span> -> pDynSym <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />               hb_vmPushNil<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />               <span style="color: #00C800;">break</span>;<br />            <span style="color: #000000;">&#125;</span><br /><br />         <span style="color: #000000;">&#125;</span><br /><br />         <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> bDefault <span style="color: #000000;">&#41;</span><br />         <span style="color: #000000;">&#123;</span><br />            <span style="color: #B900B9;">// in default event manager (0), first param will be the EventId</span><br />            hb_vmPushLong<span style="color: #000000;">&#40;</span> dispid <span style="color: #000000;">&#41;</span>;<br />         <span style="color: #000000;">&#125;</span><br /><br />         iArg = <span style="color: #000000;">&#40;</span>USHORT<span style="color: #000000;">&#41;</span> params->cArgs;<br />         <span style="color: #00C800;">for</span><span style="color: #000000;">&#40;</span> i = <span style="color: #000000;">1</span>; i<= iArg; i++ <span style="color: #000000;">&#41;</span><br />         <span style="color: #000000;">&#123;</span><br />            pItem = hb_itemNew<span style="color: #000000;">&#40;</span><span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span>;<br />            hb_oleVariantToItem<span style="color: #000000;">&#40;</span> pItem, &<span style="color: #000000;">&#40;</span>params->rgvarg<span style="color: #000000;">&#91;</span>iArg-i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />            pItemArray<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">-1</span><span style="color: #000000;">&#93;</span> = pItem;<br />            ulRefMask |= <span style="color: #000000;">&#40;</span> 1L << <span style="color: #000000;">&#40;</span>i<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: #00C800;">if</span><span style="color: #000000;">&#40;</span> iArg <span style="color: #000000;">&#41;</span><br />         <span style="color: #000000;">&#123;</span><br />            pItems = pItemArray;<br />            hb_itemPushList<span style="color: #000000;">&#40;</span> ulRefMask, iArg, &pItems <span style="color: #000000;">&#41;</span>;<br />         <span style="color: #000000;">&#125;</span><br /><br />         hb_vmDo<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>USHORT<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span> iArg + <span style="color: #000000;">&#40;</span> bDefault ? <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />         <span style="color: #00C800;">for</span><span style="color: #000000;">&#40;</span> i=iArg; i > <span style="color: #000000;">0</span>; i-- <span style="color: #000000;">&#41;</span><br />         <span style="color: #000000;">&#123;</span><br />            <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>&<span style="color: #000000;">&#40;</span>params->rgvarg<span style="color: #000000;">&#91;</span>iArg-i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>->n1.n2.vt & VT_BYREF <span style="color: #000000;">&#41;</span> == VT_BYREF <span style="color: #000000;">&#41;</span><br />            <span style="color: #000000;">&#123;</span><br />               <span style="color: #00C800;">switch</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>&<span style="color: #000000;">&#40;</span>params->rgvarg<span style="color: #000000;">&#91;</span>iArg-i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>->n1.n2.vt <span style="color: #000000;">&#41;</span><br />               <span style="color: #000000;">&#123;</span><br />                  <span style="color: #00C800;">case</span> VT_I2|VT_BYREF:<br />                     *<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>&<span style="color: #000000;">&#40;</span>params->rgvarg<span style="color: #000000;">&#91;</span>iArg-i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>->n1.n2.n3.piVal<span style="color: #000000;">&#41;</span>    = <span style="color: #000000;">&#40;</span>short<span style="color: #000000;">&#41;</span> hb_itemGetNI<span style="color: #000000;">&#40;</span>pItemArray<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">-1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;<br />                     <span style="color: #00C800;">break</span>;<br />                  <span style="color: #00C800;">case</span> VT_I4|VT_BYREF:<br />                     *<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>&<span style="color: #000000;">&#40;</span>params->rgvarg<span style="color: #000000;">&#91;</span>iArg-i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>->n1.n2.n3.plVal<span style="color: #000000;">&#41;</span>    = <span style="color: #000000;">&#40;</span>long<span style="color: #000000;">&#41;</span> hb_itemGetNL<span style="color: #000000;">&#40;</span>pItemArray<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">-1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;<br />                     <span style="color: #00C800;">break</span>;<br />                  <span style="color: #00C800;">case</span> VT_R4|VT_BYREF:<br />                     *<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>&<span style="color: #000000;">&#40;</span>params->rgvarg<span style="color: #000000;">&#91;</span>iArg-i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>->n1.n2.n3.pfltVal<span style="color: #000000;">&#41;</span>  = <span style="color: #000000;">&#40;</span>float<span style="color: #000000;">&#41;</span> hb_itemGetND<span style="color: #000000;">&#40;</span>pItemArray<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">-1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;<br />                     <span style="color: #00C800;">break</span>;<br />                  <span style="color: #00C800;">case</span> VT_R8|VT_BYREF:<br />                     *<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>&<span style="color: #000000;">&#40;</span>params->rgvarg<span style="color: #000000;">&#91;</span>iArg-i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>->n1.n2.n3.pdblVal<span style="color: #000000;">&#41;</span>  = <span style="color: #000000;">&#40;</span>double<span style="color: #000000;">&#41;</span> hb_itemGetND<span style="color: #000000;">&#40;</span>pItemArray<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">-1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;<br />                     <span style="color: #00C800;">break</span>;<br />                  <span style="color: #00C800;">case</span> VT_BOOL|VT_BYREF:<br />                     *<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>&<span style="color: #000000;">&#40;</span>params->rgvarg<span style="color: #000000;">&#91;</span>iArg-i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>->n1.n2.n3.pboolVal<span style="color: #000000;">&#41;</span> = hb_itemGetL<span style="color: #000000;">&#40;</span> pItemArray<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">-1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> ? <span style="color: #000000;">&#40;</span>USHORT<span style="color: #000000;">&#41;</span> 0xFFFF : <span style="color: #000000;"><span style="color: #000000;">&#40;</span>USHORT</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">0</span>;<br />                     <span style="color: #00C800;">break</span>;<br />                  <span style="color: #00C800;">case</span> VT_DATE|VT_BYREF:<br />                     *<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>&<span style="color: #000000;">&#40;</span>params->rgvarg<span style="color: #000000;">&#91;</span>iArg-i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>->n1.n2.n3.pdate<span style="color: #000000;">&#41;</span>    = <span style="color: #000000;">&#40;</span>DATE<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>double<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>hb_itemGetDL<span style="color: #000000;">&#40;</span>pItemArray<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">-1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-2415019</span> <span style="color: #000000;">&#41;</span>;<br />                     <span style="color: #00C800;">break</span>;<br />               <span style="color: #000000;">&#125;</span><br />            <span style="color: #000000;">&#125;</span><br />         <span style="color: #000000;">&#125;</span><br />         hb_vmPopState<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />      <span style="color: #000000;">&#125;</span><br />   <span style="color: #000000;">&#125;</span><br /><br />   hb_itemRelease<span style="color: #000000;">&#40;</span> Key <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #00C800;">return</span> S_OK;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">static</span> const IEventHandlerVtbl IEventHandler_Vtbl = <span style="color: #000000;">&#123;</span><br />   QueryInterface,<br />   AddRef,<br />   <span style="color: #0000ff;">Release</span>,<br />   GetTypeInfoCount,<br />   GetTypeInfo,<br />   GetIDsOfNames,<br />   Invoke<br /><span style="color: #000000;">&#125;</span>;<br /><br />typedef IEventHandler device_interface;<br /><br /><span style="color: #B900B9;">//-----------------------------------------------</span><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> OLECONNECTEVENTS <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//-----------------------------------------------</span><br /><span style="color: #000000;">&#123;</span><br />   IConnectionPointContainer*  pIConnectionPointContainerTemp = <span style="color: #00C800;">NULL</span>;<br />   IUnknown*                   pIUnknown = <span style="color: #00C800;">NULL</span>;<br />   IConnectionPoint*           m_pIConnectionPoint;<br />   IEnumConnectionPoints*      m_pIEnumConnectionPoints;<br />   HRESULT                     hr; <span style="color: #B900B9;">//,r;</span><br />   IID                         rriid;<br />   register IEventHandler *    thisobj;<br />   DWORD                       dwCookie = <span style="color: #000000;">0</span>;<br /><br />   device_interface*           pdevice_interface = <span style="color: #000000;">&#40;</span>device_interface*<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 />   MyRealIEventHandler*        pThis;<br /><br />   thisobj = <span style="color: #000000;">&#40;</span> IEventHandler *<span style="color: #000000;">&#41;</span> GlobalAlloc<span style="color: #000000;">&#40;</span> GMEM_FIXED, sizeof<span style="color: #000000;">&#40;</span> MyRealIEventHandler <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> thisobj <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      thisobj->lpVtbl = <span style="color: #000000;">&#40;</span>IEventHandlerVtbl *<span style="color: #000000;">&#41;</span> &IEventHandler_Vtbl;<br /><br />      <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>MyRealIEventHandler *<span style="color: #000000;">&#41;</span> thisobj<span style="color: #000000;">&#41;</span>->count = <span style="color: #000000;">0</span>;<br /><br />      <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>MyRealIEventHandler *<span style="color: #000000;">&#41;</span> thisobj<span style="color: #000000;">&#41;</span>->device_event_interface_iid = IID_IDispatch;<br /><br />      hr = thisobj->lpVtbl->QueryInterface<span style="color: #000000;">&#40;</span> thisobj, &IID_IUnknown, <span style="color: #000000;">&#40;</span>void**<span style="color: #000000;">&#41;</span> &pIUnknown <span style="color: #000000;">&#41;</span>;<br />      <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> hr == S_OK && pIUnknown <span style="color: #000000;">&#41;</span><br />      <span style="color: #000000;">&#123;</span><br /><br />         hr = pdevice_interface->lpVtbl->QueryInterface<span style="color: #000000;">&#40;</span> pdevice_interface,<br />            &IID_IConnectionPointContainer, <span style="color: #000000;">&#40;</span>void**<span style="color: #000000;">&#41;</span> &pIConnectionPointContainerTemp <span style="color: #000000;">&#41;</span>;<br /><br />         <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> hr == S_OK && pIConnectionPointContainerTemp <span style="color: #000000;">&#41;</span><br />         <span style="color: #000000;">&#123;</span><br />            hr = pIConnectionPointContainerTemp->lpVtbl->EnumConnectionPoints<span style="color: #000000;">&#40;</span> pIConnectionPointContainerTemp, &m_pIEnumConnectionPoints <span style="color: #000000;">&#41;</span>;<br /><br />            <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> hr == S_OK && m_pIEnumConnectionPoints <span style="color: #000000;">&#41;</span><br />            <span style="color: #000000;">&#123;</span><br />               <span style="color: #00C800;">do</span><br />               <span style="color: #000000;">&#123;</span><br />                  hr = m_pIEnumConnectionPoints->lpVtbl->Next<span style="color: #000000;">&#40;</span> m_pIEnumConnectionPoints, <span style="color: #000000;">1</span>, &m_pIConnectionPoint , <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span>;<br />                  <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hr == S_OK <span style="color: #000000;">&#41;</span><br />                  <span style="color: #000000;">&#123;</span><br />                     <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> m_pIConnectionPoint->lpVtbl->GetConnectionInterface<span style="color: #000000;">&#40;</span> m_pIConnectionPoint, &rriid <span style="color: #000000;">&#41;</span> == S_OK <span style="color: #000000;">&#41;</span><br />                     <span style="color: #000000;">&#123;</span><br />                        <span style="color: #00C800;">break</span>;<br />                     <span style="color: #000000;">&#125;</span><br />                  <span style="color: #000000;">&#125;</span><br /><br />               <span style="color: #000000;">&#125;</span> <span style="color: #00C800;">while</span><span style="color: #000000;">&#40;</span> hr == S_OK <span style="color: #000000;">&#41;</span>;<br />               m_pIEnumConnectionPoints->lpVtbl->Release<span style="color: #000000;">&#40;</span>m_pIEnumConnectionPoints<span style="color: #000000;">&#41;</span>;<br />            <span style="color: #000000;">&#125;</span><br />            pIConnectionPointContainerTemp->lpVtbl->Release<span style="color: #000000;">&#40;</span> pIConnectionPointContainerTemp <span style="color: #000000;">&#41;</span>;<br />            pIConnectionPointContainerTemp = <span style="color: #00C800;">NULL</span>;<br />         <span style="color: #000000;">&#125;</span><br /><br />         <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> hr == S_OK && m_pIConnectionPoint <span style="color: #000000;">&#41;</span><br />         <span style="color: #000000;">&#123;</span><br />            <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hr == S_OK <span style="color: #000000;">&#41;</span><br />            <span style="color: #000000;">&#123;</span><br />               <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>MyRealIEventHandler *<span style="color: #000000;">&#41;</span> thisobj<span style="color: #000000;">&#41;</span>->device_event_interface_iid = rriid;<br />            <span style="color: #000000;">&#125;</span>;<br /><br />            m_pIConnectionPoint->lpVtbl->Advise<span style="color: #000000;">&#40;</span> m_pIConnectionPoint, pIUnknown, &dwCookie <span style="color: #000000;">&#41;</span>;<br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>MyRealIEventHandler *<span style="color: #000000;">&#41;</span> thisobj<span style="color: #000000;">&#41;</span>->pIConnectionPoint = m_pIConnectionPoint;<br />            <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>MyRealIEventHandler *<span style="color: #000000;">&#41;</span> thisobj<span style="color: #000000;">&#41;</span>->dwEventCookie = dwCookie;<br /><br />         <span style="color: #000000;">&#125;</span><br /><br />         pIUnknown->lpVtbl->Release<span style="color: #000000;">&#40;</span>pIUnknown<span style="color: #000000;">&#41;</span>;<br />         pIUnknown = <span style="color: #00C800;">NULL</span>;<br /><br />      <span style="color: #000000;">&#125;</span><br />   <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> thisobj <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      pThis = <span style="color: #000000;">&#40;</span>void*<span style="color: #000000;">&#41;</span> thisobj;<br /><br />      pThis->pEvents     = hb_itemNew<span style="color: #000000;">&#40;</span> hb_param<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, HB_IT_ANY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />      pThis->pEventsExec = hb_itemNew<span style="color: #000000;">&#40;</span> hb_param<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, HB_IT_ANY <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>LONG<span style="color: #000000;">&#41;</span> pThis <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">else</span><br />   <span style="color: #000000;">&#123;</span><br />      hb_ret<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />   <span style="color: #000000;">&#125;</span>;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------</span><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> OLEDISCONNECTEVENTS <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//-----------------------------------------------</span><br /><span style="color: #000000;">&#123;</span><br />   MyRealIEventHandler *this = <span style="color: #000000;">&#40;</span> MyRealIEventHandler * <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: #00C800;">if</span><span style="color: #000000;">&#40;</span> this->pIConnectionPoint <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      this->pIConnectionPoint->lpVtbl->Unadvise<span style="color: #000000;">&#40;</span> this->pIConnectionPoint, this->dwEventCookie <span style="color: #000000;">&#41;</span>;<br />      this->dwEventCookie = <span style="color: #000000;">0</span>;<br />      this->pIConnectionPoint->lpVtbl->Release<span style="color: #000000;">&#40;</span> this->pIConnectionPoint <span style="color: #000000;">&#41;</span>;<br />      this->pIConnectionPoint = <span style="color: #00C800;">NULL</span>;<br />   <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------</span><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> OLEFREEDISPATCH <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//-----------------------------------------------</span><br /><span style="color: #000000;">&#123;</span><br />   IDispatch * pObj;<br />   pObj = <span style="color: #000000;">&#40;</span> IDispatch * <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 />   pObj->lpVtbl->Release<span style="color: #000000;">&#40;</span> pObj <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /> </div>[/code:2yzmslmz] gracias.
Class ActiveX
More information / mais informarcion Description Gets the bounding rectangle of the command bar. This is the area of the window that the command bar occupies Syntax Public Sub GetWindowRect( _ ByRef Left As Long, _ ByRef Top As Long, _ ByRef Right As Long, _ ByRef Bottom As Long _ ) Parameters Left The left point of the window rectangle Top The top point of the window rectangle Right The right point of the window rectangle Bottom The bottom point of the window rectangle lo erro acontece en la chamada oAct:GetWindowRect(@left, @top, @right, @bottom) // GPF aqui [code=fw:2nwh5s6m]<div class="fw" id="{CB}" style="font-family: monospace;">ERro<br /><br />Application<br />===========<br />&nbsp; &nbsp;Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Event\demo.exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Size</span>: <span style="color: #000000;">1</span>,<span style="color: #000000;">675</span>,<span style="color: #000000;">264</span> bytes<br />&nbsp; &nbsp;Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">0</span> secs <br />&nbsp; &nbsp;Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">08</span>/<span style="color: #000000;">04</span>/<span style="color: #000000;">09</span>, <span style="color: #000000;">08</span>:<span style="color: #000000;">40</span>:<span style="color: #000000;">40</span><br />&nbsp; &nbsp;Error description: <span style="color: #000000;">Error</span> <span style="color: #000000;">18926648</span>/<span style="color: #000000;">15</span> &nbsp;DISP_E_PARAMNOTOPTIONAL: <span style="color: #000000;">GETWINDOWRECT</span><br />&nbsp; &nbsp;Args:<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">0</span><br /><br />Stack Calls<br />===========<br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\rtl\win32ole.prg => TOLEAUTO:<span style="color: #000000;">GETWINDOWRECT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> HB_EXECFROMARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">MYACTIVEX</span>.PRG => MYACTIVEX&#<span style="color: #000000;">058</span>;GETWINDOWRECT<span style="color: #000000;">&#40;</span><span style="color: #000000;">243</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">DEMO</span>.PRG => MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">38</span><span style="color: #000000;">&#41;</span></div>[/code:2nwh5s6m]
Class ActiveX
Lailton, Try this: oAct:GetRect() --> aRect // 4 elements array
Class ActiveX
Exemplo usando TActiveX, ( Funcionando Bien ) [code=fw:gxuck00o]<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;<span style="color: #00C800;">public</span> oWnd<br />&nbsp;<span style="color: #00C800;">public</span> oCommandbar<br />&nbsp;<span style="color: #00C800;">public</span> oRibbonbar<br />&nbsp;<span style="color: #00C800;">public</span> oToolA<br /><br />&nbsp;<span style="color: #00C800;">public</span> <span style="color: #0000ff;">Left</span>:=Top:=<span style="color: #0000ff;">Right</span>:=Bottom:=<span style="color: #000000;">0</span><br /><br />&nbsp;<span style="color: #0000ff;">define</span> <span style="color: #0000ff;">window</span> ownd<br /><br />&nbsp; &nbsp; oCommandBar:= TactiveX<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: #ff0000;">"Codejock.CommandBarsFrame.12.1.1"</span>,<span style="color: #000000;">0</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><br />&nbsp; &nbsp; oCommandBar:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"AttachToWindow"</span>, oWnd:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oRibbonBar:= oCommandBar:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"AddRibbonBar"</span>,<span style="color: #ff0000;">"Redstarsoft"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oRibbonBar:<span style="color: #000000;">EnableFrameTheme</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; cToolA:=oCommandBar:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Add"</span>,<span style="color: #ff0000;">"ToolBar"</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; cToolA:<span style="color: #000000;">GetWindowRect</span><span style="color: #000000;">&#40;</span> @<span style="color: #0000ff;">Left</span>, @Top, @<span style="color: #0000ff;">Right</span>, @Bottom <span style="color: #000000;">&#41;</span> <br />&nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Left</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>Top<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Right</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>Bottom<span style="color: #000000;">&#41;</span><br /><br />&nbsp;<span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">window</span> ownd<br /><br /><br /><span style="color: #00C800;">return</span></div>[/code:gxuck00o] Exemplo usando ToleWevent ( GPF ) [code=fw:gxuck00o]<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<br /><br />&nbsp;<span style="color: #00C800;">public</span> oWnd<br />&nbsp;<span style="color: #00C800;">public</span> oCommandbar<br />&nbsp;<span style="color: #00C800;">public</span> oRibbonbar<br />&nbsp;<span style="color: #00C800;">public</span> oToolA<br /><br />&nbsp;<span style="color: #00C800;">public</span> <span style="color: #0000ff;">Left</span>:=Top:=<span style="color: #0000ff;">Right</span>:=Bottom:=<span style="color: #000000;">0</span><br /><br />&nbsp;<span style="color: #0000ff;">define</span> <span style="color: #0000ff;">window</span> ownd<br /><br />&nbsp; &nbsp; oCommandBar:= OleWEvent<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;">"Codejock.CommandBars.12.1.1"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oCommandBar:<span style="color: #000000;">AttachToWindow</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oRibbonBar:= oCommandBar:<span style="color: #000000;">AddRibbonBar</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Redstarsoft"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oRibbonBar:<span style="color: #000000;">EnableFrameTheme</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; cToolA:=oCommandBar:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ToolBar"</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; cToolA:<span style="color: #000000;">GetWindowRect</span><span style="color: #000000;">&#40;</span> @<span style="color: #0000ff;">Left</span>, @Top, @<span style="color: #0000ff;">Right</span>, @Bottom <span style="color: #000000;">&#41;</span> <br />&nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Left</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>Top<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Right</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>Bottom<span style="color: #000000;">&#41;</span><br /><br />&nbsp;<span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">window</span> ownd<br /><span style="color: #00C800;">return</span></div>[/code:gxuck00o] Antonio, tu pode me dizer una cosa, porque en la class ToleWevent yo necessito usar "Codejock.CommandBars.12.1.1" pero "Codejock.CommandBarsFrame.12.1.1" return GPF ? y con la TactiveX es lo iverso, yo necessito usar Codejock.CommandBarsFrame.12.1.1 y Codejock.CommandBars.12.1.1 return GPF. No consito entender <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Link abaxo con lo exemplos. [url:gxuck00o]http&#58;//www&#46;redstarsoft&#46;com&#46;br/TOleDemo&#46;rar[/url:gxuck00o]
Class ActiveX
<!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
Class ActiveX
Lailton, > pero "Codejock.CommandBarsFrame.12.1.1" return GPF ? It is very difficult (almost impossible) to know why, because we don't have the source for that activex.
Class ActiveX
Antonio please revisa : <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=16311">viewtopic.php?f=3&t=16311</a><!-- l --> Sample + CLASS ToleWevent <!-- m --><a class="postlink" href="http://www.redstarsoft.com.br/TOleDemo.rar">http://www.redstarsoft.com.br/TOleDemo.rar</a><!-- m -->
Class ActiveX
Lailton, Please modify these lines and the GPF is solved <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> oCommandBar:= OleWEvent():New("Codejock.CommandBars.13.0.0", oWnd:hWnd) y [code=fw:pbu13hm1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> OLEWECREATE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   HWND hWndCtrl;<br /><br />   LoadAtl<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />   hWndCtrl = CreateWindowEx<span style="color: #000000;">&#40;</span><br />      <span style="color: #000000;">&#40;</span>DWORD<span style="color: #000000;">&#41;</span>   <span style="color: #000000;">0</span>                   ,   <span style="color: #B900B9;">// nExStyle</span><br />      <span style="color: #000000;">&#40;</span>LPCTSTR<span style="color: #000000;">&#41;</span> <span style="color: #ff0000;">"AtlAxWin"</span>          ,   <span style="color: #B900B9;">// cClsName</span><br />      <span style="color: #000000;">&#40;</span>LPCTSTR<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: #B900B9;">// cProgId</span><br />      <span style="color: #000000;">&#40;</span>DWORD<span style="color: #000000;">&#41;</span>   WS_CHILD | WS_VISIBLE,   <span style="color: #B900B9;">// style</span><br />                <span style="color: #000000;">0</span>       ,   <span style="color: #B900B9;">// nLeft</span><br />                <span style="color: #000000;">0</span>      ,   <span style="color: #B900B9;">// nTop</span><br />                <span style="color: #000000;">200</span>      ,   <span style="color: #B900B9;">// nWidth</span><br />                <span style="color: #000000;">200</span>    ,   <span style="color: #B900B9;">// nHeight</span><br />                <span style="color: #000000;">&#40;</span> HWND <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: #B900B9;">// oParent:handle</span><br />               <span style="color: #000000;">0</span>,<br />               <span style="color: #000000;">0</span>,<br />               <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br /><br />   hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>long<span style="color: #000000;">&#41;</span> hWndCtrl <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /> </div>[/code:pbu13hm1] You can use hb_parnl( 3 ) and hb_parnl( 4 ) for width and height and supply them from the PRG
Class ActiveX
Antonio, Continue GPF, i did it: [code=fw:dd395kww]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;<span style="color: #00C800;">public</span> oWnd,oCommandbar,oToolA<br />&nbsp;<span style="color: #00C800;">public</span> <span style="color: #0000ff;">Left</span>:=Top:=<span style="color: #0000ff;">Right</span>:=Bottom:=<span style="color: #000000;">0</span><br />&nbsp;<span style="color: #0000ff;">define</span> <span style="color: #0000ff;">window</span> ownd<br />&nbsp; &nbsp; oCommandBar:= OleWEvent<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;">"Codejock.CommandBars.13.0.0"</span>, oWnd:<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oCommandBar:<span style="color: #000000;">AttachToWindow</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; cToolA:=oCommandBar:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ToolBar"</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; cToolA:<span style="color: #000000;">GetWindowRect</span><span style="color: #000000;">&#40;</span> @<span style="color: #0000ff;">Left</span>, @Top, @<span style="color: #0000ff;">Right</span>, @Bottom <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// GPF</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Gpf yet here &nbsp;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Left</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>Top<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Right</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>Bottom<span style="color: #000000;">&#41;</span><br />&nbsp;<span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">window</span> ownd<br /><span style="color: #00C800;">return</span></div>[/code:dd395kww] Change class OleWevents.prg method new [code=fw:dd395kww]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cProgId, janela <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> OleWEvent<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oError<br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> := OLEWECREATE<span style="color: #000000;">&#40;</span> cProgId , janela<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hObj</span> := OleGetDisp<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oOle</span> := ToleAuto<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;">hObj</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; CATCH oError<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;QOut<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Description</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; END<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hSink</span> := OleConnectEvents<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hObj</span>, ::<span style="color: #000000;">aEvent</span>:= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> , ::<span style="color: #000000;">aBlock</span>:= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">SELF</span></div>[/code:dd395kww] and file C that you change. [code=fw:dd395kww]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> OLEWECREATE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;HWND hWndCtrl;<br /><br />&nbsp; &nbsp;LoadAtl<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;hWndCtrl = CreateWindowEx<span style="color: #000000;">&#40;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>DWORD<span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , &nbsp; <span style="color: #B900B9;">// nExStyle</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>LPCTSTR<span style="color: #000000;">&#41;</span> <span style="color: #ff0000;">"AtlAxWin"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, &nbsp; <span style="color: #B900B9;">// cClsName</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>LPCTSTR<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; &nbsp; &nbsp; &nbsp;, &nbsp; <span style="color: #B900B9;">// cProgId</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>DWORD<span style="color: #000000;">&#41;</span> &nbsp; WS_CHILD | WS_VISIBLE, &nbsp; <span style="color: #B900B9;">// style</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; , &nbsp; <span style="color: #B900B9;">// nLeft</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp;, &nbsp; <span style="color: #B900B9;">// nTop</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">200</span> &nbsp; &nbsp; &nbsp;, &nbsp; <span style="color: #B900B9;">// nWidth</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">200</span> &nbsp; &nbsp;, &nbsp; <span style="color: #B900B9;">// nHeight</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> HWND <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; &nbsp;<span style="color: #B900B9;">// oParent:handle</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span>,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span>,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">NULL</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>long<span style="color: #000000;">&#41;</span> hWndCtrl <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span></div>[/code:dd395kww] Estoy errado en alguna cosa ? necessita alterar algo mas ? Gracias.
Class ActiveX
Sample que estoy usando [code=fw:1qx4o77j]<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 /> <span style="color: #00C800;">public</span> oWnd,oCommandbar,oToolA<br /> <span style="color: #00C800;">public</span> <span style="color: #0000ff;">Left</span>:=Top:=<span style="color: #0000ff;">Right</span>:=Bottom:=<span style="color: #000000;">0</span><br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">window</span> ownd<br /><br />    oCommandBar:= OleWEvent<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;">"Codejock.CommandBars.13.0.0"</span>, oWnd:<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span><br />    oCommandBar:<span style="color: #000000;">AttachToWindow</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br /><br />    cToolA:=oCommandBar:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ToolBar"</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #B900B9;">//cToolA:GetWindowRect( @Left, @Top, @Right, @Bottom )  // GPF nessa linha </span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// se estiver marcada funciona normal. &nbsp;pero necessito usar lo GetWindowRect y no posso &nbsp;:( </span><br /><br />    <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Left</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>Top<span style="color: #000000;">&#41;</span><br />    <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Right</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>Bottom<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></div>[/code:1qx4o77j]
Class ActiveX
Lailton, Why don't you simply use FWH Class TActiveX that works fine ? You can use OleConnectEvents() to provide events support to OleAuto child objects of the ActiveX.
Class ActiveX
porque yo necessito delos source, estoy criando de form que funcione con harbour svn, xharbour Free y xharbour Comercial, y tambem la class TactiveX estas tento muchas modificaciones sieprete tiengo que ficar adaptando en mi aplicativos, ja con la ToleWevent funciona bem y consigo compilar ja con xh free y xh comercial, y tambem con la class TactiveX usando Biometria da GPF (Screen of erro of windows) pero con la ToleWevent it´s solved. entos necessito mucho continuar con ela, pero necessito tambem solver este erro que estas me retornando en la chamada GetWindowRect, creio que es o problem en passar variables @VAR, tu disse que alterando las linhas estarias solved, poderia manda-me las modificaciones que fez para mi email para que eu possa probar. gracias
Class ActiveX/OleWevent
Exemplo usando TActiveX, ( Funcionando Bien ) [code=fw:36q09rq2]<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;<span style="color: #00C800;">public</span> oWnd<br />&nbsp;<span style="color: #00C800;">public</span> oCommandbar<br />&nbsp;<span style="color: #00C800;">public</span> oRibbonbar<br />&nbsp;<span style="color: #00C800;">public</span> oToolA<br /><br />&nbsp;<span style="color: #00C800;">public</span> <span style="color: #0000ff;">Left</span>:=Top:=<span style="color: #0000ff;">Right</span>:=Bottom:=<span style="color: #000000;">0</span><br /><br />&nbsp;<span style="color: #0000ff;">define</span> <span style="color: #0000ff;">window</span> ownd<br /><br />&nbsp; &nbsp; oCommandBar:= TactiveX<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: #ff0000;">"Codejock.CommandBarsFrame.12.1.1"</span>,<span style="color: #000000;">0</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><br />&nbsp; &nbsp; oCommandBar:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"AttachToWindow"</span>, oWnd:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oRibbonBar:= oCommandBar:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"AddRibbonBar"</span>,<span style="color: #ff0000;">"Redstarsoft"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oRibbonBar:<span style="color: #000000;">EnableFrameTheme</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; cToolA:=oCommandBar:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Add"</span>,<span style="color: #ff0000;">"ToolBar"</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; cToolA:<span style="color: #000000;">GetWindowRect</span><span style="color: #000000;">&#40;</span> @<span style="color: #0000ff;">Left</span>, @Top, @<span style="color: #0000ff;">Right</span>, @Bottom <span style="color: #000000;">&#41;</span> <br />&nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Left</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>Top<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Right</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>Bottom<span style="color: #000000;">&#41;</span><br /><br />&nbsp;<span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">window</span> ownd<br /><br /><br /><span style="color: #00C800;">return</span></div>[/code:36q09rq2] Exemplo usando ToleWevent ( GPF ) [code=fw:36q09rq2]<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<br /><br />&nbsp;<span style="color: #00C800;">public</span> oWnd<br />&nbsp;<span style="color: #00C800;">public</span> oCommandbar<br />&nbsp;<span style="color: #00C800;">public</span> oRibbonbar<br />&nbsp;<span style="color: #00C800;">public</span> oToolA<br /><br />&nbsp;<span style="color: #00C800;">public</span> <span style="color: #0000ff;">Left</span>:=Top:=<span style="color: #0000ff;">Right</span>:=Bottom:=<span style="color: #000000;">0</span><br /><br />&nbsp;<span style="color: #0000ff;">define</span> <span style="color: #0000ff;">window</span> ownd<br /><br />&nbsp; &nbsp; oCommandBar:= OleWEvent<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;">"Codejock.CommandBars.12.1.1"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oCommandBar:<span style="color: #000000;">AttachToWindow</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oRibbonBar:= oCommandBar:<span style="color: #000000;">AddRibbonBar</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Redstarsoft"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oRibbonBar:<span style="color: #000000;">EnableFrameTheme</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; cToolA:=oCommandBar:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ToolBar"</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; cToolA:<span style="color: #000000;">GetWindowRect</span><span style="color: #000000;">&#40;</span> @<span style="color: #0000ff;">Left</span>, @Top, @<span style="color: #0000ff;">Right</span>, @Bottom <span style="color: #000000;">&#41;</span> <br />&nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Left</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>Top<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Right</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>Bottom<span style="color: #000000;">&#41;</span><br /><br />&nbsp;<span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">window</span> ownd<br /><span style="color: #00C800;">return</span></div>[/code:36q09rq2] Antonio, tu pode me dizer una cosa, porque en la class ToleWevent yo necessito usar "Codejock.CommandBars.12.1.1" pero "Codejock.CommandBarsFrame.12.1.1" return GPF ? y con la TactiveX es lo iverso, yo necessito usar Codejock.CommandBarsFrame.12.1.1 y Codejock.CommandBars.12.1.1 return GPF. No consito entender <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Link abaxo con lo exemplos. [url:36q09rq2]http&#58;//www&#46;redstarsoft&#46;com&#46;br/TOleDemo&#46;rar[/url:36q09rq2]
Class ActiveX/OleWevent
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=16291&p=84289#p84289">viewtopic.php?f=3&t=16291&p=84289#p84289</a><!-- l -->
Class INI not working on Vista ?
I suspect that the class INI is not working o Vista. Any issues on this ?Antonio
Class INI not working on Vista ?
Hello,I use VISTA and there are no problems.A sample :[code:305p09z2] c_dir &#58;= GetModuleFilename&#40;GetInstance&#40;&#41;,"MYPROG&#46;EXE" + CHR&#40;0&#41;, 255&#41; c_path &#58;= left &#40; c_dir, rat&#40; "\", c_dir&#41; -1 &#41; // ---------- READ FROM INI ---------------- IF !FILE &#40; c_path + "\Info&#46;ini" &#41; SAVE_INI&#40;"N"&#41; ENDIF IF FILE &#40; c_path + "\Infobar&#46;ini" &#41; INI oIni FILE c_path + "\Info&#46;ini" GET nDATE SECTION "Main" ENTRY "DATESET" OF oIni DEFAULT "5" GET nINSERT SECTION "Main" ENTRY "WRITESET" OF oIni DEFAULT "1" GET nORIENT SECTION "Main" ENTRY "ORIENTAT" OF oIni DEFAULT "1" ENDINI ENDIF // ---------- SAVE TO INI -------------- FUNCTION SAVE_INI&#40;message&#41; local cIni &#58;= c_path + "\Info&#46;ini" IF WritePProString&#40; "Main", "DATESET", ALLTRIM&#40;STR&#40;e_RADIO1&#41;&#41;, cIni &#41; = &#46;F&#46; MsgAlert&#40;"Not possible, to write in INI-File", "INI-File"&#41; RETURN&#40; NIL &#41; ENDIF IF WritePProString&#40; "Main", "WRITESET", ALLTRIM&#40;STR&#40;e_INSERT&#41;&#41;, cIni &#41; = &#46;F&#46; MsgAlert&#40;"Not possible, to write in INI-File", "INI-File"&#41; RETURN&#40; NIL &#41; ENDIF IF WritePProString&#40; "Main", "ORIENTAT", ALLTRIM&#40;STR&#40;e_ORIENT&#41;&#41;, cIni &#41; = &#46;F&#46; MsgAlert&#40;"Not possible, to write in INI-File", "INI-File"&#41; RETURN&#40; NIL &#41; ENDIF IF FILE&#40;cIni&#41; cOpen &#58;= "Notepad&#46;exe " + cIni WinExec&#40; "&cOpen" &#41; ELSE MsgAlert&#40; "Couldn't create File &#58; " + cIni + " !!!","ATTENTION"&#41; ENDIF RETURN&#40; NIL &#41; [/code:305p09z2]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Class INI not working on Vista ?
Please look at this thread:<!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=12935&highlight=vista">http://fivetechsoft.com/forums/viewtopi ... ight=vista</a><!-- m -->I found out that this only happens if the INI file has setup or install in the name.Regards,Otto
Class INI not working on Vista ?
It's not the case.By the way this problem happens with an app build with :Xbuilder March 2006 + FWH March 2006With all other windows ver running very stable for several years.Any idea ? Are these versions incompatible with Vista ?Antonio
Class INI not working on Vista ?
Antonio,as far as I know, Vista doesn't allow in standard settings changes to be made in the program files folder. So if your application is installed to the standard program files folder, you have to put your ini file to the general or specific user-folder windows is providing for such purposes. Another solution might be to install the application just into another folder <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
Class INI not working on Vista ?
The problem is with the INI file in a Netware server + Vista. On Vista works ok.
Class INI not working on Vista ?
Antonio, Is it a private INI file ? I mean, is it a standalone INI file ? If yes, can you check that it exists using File() or read it using MemoRead() ?
Class INI not working on Vista ?
The ini file it's "personal each user has it's own ini file.File exists (file() tested) and it can be read by memoread().Any Ideas. Antonio
Class INI not working on Vista ?
This problem only occurs in a Netware file server. If the ini file is on the Vista workstation it works ok.
Class INI not working on Vista ?
Antonio,If you can read it using MemoRead() then you may analize it from your code without using the INI functions.At least, you can use that as a workaround.
Class INI not working on Vista ?
Thanks Antonio,I'm going to try xHarvour ini functions instead.Keep my fingers crossed.Antonio
Class MyActiveX
HI, this a perfect class to use object Activex/COM is class ToleAuto with events. ( base in work of Carlos Mora WoleEvent ) A project started by Carlo Mora and Oscar Lira, i add news features that i think that is necessary. Can make download here <!-- m --><a class="postlink" href="http://fivewin.com.br/exibedicas.asp?id=1026">http://fivewin.com.br/exibedicas.asp?id=1026</a><!-- m --> How use: #include "MyActiveX.ch" @ 0, 0 MyACTIVEX oAct "Codejock.SkinFrameWorks.13.2.1" OF oWnd size 300,400 Or by REDEFINE mode REDEFINE MyACTIVEX oAct ID 4001 OF oWnd PROGID "Codejock.SkinFrameWorks.13.2.1" Or too oAct:=MyActiveX():New(ownd,"Codejock.SkinFrameWorks.13.2.1") Using events #define Update 1 oAct:Event( 1, {|| MsgINfo("I´m Event update") } ) Good Luck. And thanks carlos mora and oscar lira, thanks too Antonio linhares y daniel.
Class Printer
Hola a todos, Si imprimo este code, tengo una impresion erronea. Sabeis porque ? [code=fw:2bkbfsk8]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Printing in portrait and in landscape</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> PAD_LEFT            <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> PAD_RIGHT           <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> PAD_CENTER          <span style="color: #000000;">2</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oPrn, oFont, oPen<br />   <span style="color: #00C800;">Local</span> nLinI, nColI, nLinF, nColF<br /> <br /><br />   <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Impresión en Vertical.."</span> PREVIEW<br />      <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-10</span> BOLD <span style="color: #0000ff;">OF</span> oPrn<br />      <span style="color: #0000ff;">DEFINE</span> PEN oPen WIDTH  <span style="color: #000000;">2</span>                        <span style="color: #0000ff;">OF</span> oPrn<br /> <br />      oPrn:<span style="color: #000000;">SetPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">// A4</span><br />      oPrn:<span style="color: #000000;">SetPortrait</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Vertical</span><br /><br />      <span style="color: #0000ff;">PAGE</span><br />         nLinI := <span style="color: #000000;">0</span><br />         nColI := <span style="color: #000000;">0</span><br />         nLinF := <span style="color: #000000;">28.5</span><br />         nColF := <span style="color: #000000;">20.0</span><br /><br />         oPrn:<span style="color: #000000;">Cmtr2Pix</span><span style="color: #000000;">&#40;</span>@nLinI, @nColI<span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #000000;">cmtr2Pix</span><span style="color: #000000;">&#40;</span>@nLinF, @nColF<span style="color: #000000;">&#41;</span><br /><br />         oPrn:<span style="color: #000000;">Box</span><span style="color: #000000;">&#40;</span>nLinI, nColI, nLinF, nColF, oPen  <span style="color: #000000;">&#41;</span><br /><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>  ,  <span style="color: #000000;">0</span>  , <span style="color: #ff0000;">"Superior Izquierda (0,0)"</span> , oFont,,CLR_BLACK,,PAD_LEFT  <span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>  , <span style="color: #000000;">10.5</span>, <span style="color: #ff0000;">"Superior Centro (0,10.5)"</span> , oFont,,CLR_BLACK,,PAD_CENTER <span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>  , <span style="color: #000000;">20.0</span>, <span style="color: #ff0000;">"Superior Derecha (0, 20)"</span> , oFont,,CLR_BLACK,,PAD_RIGHT <span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">28.0</span>, <span style="color: #000000;">0</span>   , <span style="color: #ff0000;">"Inferior Izquierda (28,0)"</span>, oFont,,CLR_BLACK,,PAD_LEFT  <span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">28.0</span>, <span style="color: #000000;">10.5</span>, <span style="color: #ff0000;">"Inferior Centro (28,10.5)"</span>, oFont,,CLR_BLACK,,PAD_CENTER <span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">28.0</span>, <span style="color: #000000;">20.0</span>, <span style="color: #ff0000;">"Inferior Derecha (28,20)"</span> , oFont,,CLR_BLACK,,PAD_RIGHT <span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">ENDPAGE</span><br />   <span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2bkbfsk8] Compilado con 11.4 Gracias. C.
Class Printer
Hi, If i print this code, i've error in coordenates. Do you know why ? [code=fw:259jjiwv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Printing in portrait and in landscape</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> PAD_LEFT            <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> PAD_RIGHT           <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> PAD_CENTER          <span style="color: #000000;">2</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oPrn, oFont, oPen<br />   <span style="color: #00C800;">Local</span> nLinI, nColI, nLinF, nColF<br /> <br /><br />   <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Impresión en Vertical.."</span> PREVIEW<br />      <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-10</span> BOLD <span style="color: #0000ff;">OF</span> oPrn<br />      <span style="color: #0000ff;">DEFINE</span> PEN oPen WIDTH  <span style="color: #000000;">2</span>                        <span style="color: #0000ff;">OF</span> oPrn<br /> <br />      oPrn:<span style="color: #000000;">SetPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">// A4</span><br />      oPrn:<span style="color: #000000;">SetPortrait</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Vertical</span><br /><br />      <span style="color: #0000ff;">PAGE</span><br />         nLinI := <span style="color: #000000;">0</span><br />         nColI := <span style="color: #000000;">0</span><br />         nLinF := <span style="color: #000000;">28.5</span><br />         nColF := <span style="color: #000000;">20.0</span><br /><br />         oPrn:<span style="color: #000000;">Cmtr2Pix</span><span style="color: #000000;">&#40;</span>@nLinI, @nColI<span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #000000;">cmtr2Pix</span><span style="color: #000000;">&#40;</span>@nLinF, @nColF<span style="color: #000000;">&#41;</span><br /><br />         oPrn:<span style="color: #000000;">Box</span><span style="color: #000000;">&#40;</span>nLinI, nColI, nLinF, nColF, oPen  <span style="color: #000000;">&#41;</span><br /><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>  ,  <span style="color: #000000;">0</span>  , <span style="color: #ff0000;">"Superior Izquierda (0,0)"</span> , oFont,,CLR_BLACK,,PAD_LEFT  <span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>  , <span style="color: #000000;">10.5</span>, <span style="color: #ff0000;">"Superior Centro (0,10.5)"</span> , oFont,,CLR_BLACK,,PAD_CENTER <span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>  , <span style="color: #000000;">20.0</span>, <span style="color: #ff0000;">"Superior Derecha (0, 20)"</span> , oFont,,CLR_BLACK,,PAD_RIGHT <span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">28.0</span>, <span style="color: #000000;">0</span>   , <span style="color: #ff0000;">"Inferior Izquierda (28,0)"</span>, oFont,,CLR_BLACK,,PAD_LEFT  <span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">28.0</span>, <span style="color: #000000;">10.5</span>, <span style="color: #ff0000;">"Inferior Centro (28,10.5)"</span>, oFont,,CLR_BLACK,,PAD_CENTER <span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">28.0</span>, <span style="color: #000000;">20.0</span>, <span style="color: #ff0000;">"Inferior Derecha (28,20)"</span> , oFont,,CLR_BLACK,,PAD_RIGHT <span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">ENDPAGE</span><br />   <span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:259jjiwv] Compiled with 11.4
Class Printer
Try [code=fw:a1ghh7v3]<div class="fw" id="{CB}" style="font-family: monospace;">oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span>oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"Inferior Derecha (28,20)"</span> , oFont,,CLR_BLACK,,PAD_RIGHT <span style="color: #000000;">&#41;</span></div>[/code:a1ghh7v3] EMG
Class Printer
Hola Carles, si por error te refieres al tamaño de la caja, creo el problema podria ser que estas calculando el tamaño en pixels con la funcion para coordenadas. [code=fw:17kw5a3t]<div class="fw" id="{CB}" style="font-family: monospace;">  oPrn:<span style="color: #000000;">cmtr2Pix</span><span style="color: #000000;">&#40;</span>@nLinF, @nColF<span style="color: #000000;">&#41;</span></div>[/code:17kw5a3t] lo cual está afectado por el offset o márgen no imprimible. deberías calcular los tamaños con [code=fw:17kw5a3t]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   nLinF := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> nLinF * <span style="color: #000000;">10</span> * ::<span style="color: #000000;">nVertRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / ::<span style="color: #000000;">nVertSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   nColF := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> nColF * <span style="color: #000000;">10</span> * ::<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / ::<span style="color: #000000;">nHorzSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:17kw5a3t] o bien usas el sizeinch2pix Espero que sea eso
Class Printer
Carlos, Tiempo que no coincidimos <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->. Gracias. Tu tienes razon, soy muy novato en esta àrea. Realmente si uso la funcion CmSay o la de pasar de cmt a pixel ::Cmtr2Pix(), no se si lo hago mal o no lo entiendo, pero la realidad es que no se imprime EXACTAMENTE donde yo quiero. He probado tu tip y va perfecto y preciso. [code=fw:2cm2yhmc]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Printing in portrait and in landscape</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> PAD_LEFT            <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> PAD_RIGHT           <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> PAD_CENTER          <span style="color: #000000;">2</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oPrn, oFont, oPen<br />   <span style="color: #00C800;">Local</span> nLinI, nColI, nLinF, nColF<br /> <br /><br />   <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Impresión en Vertical.."</span> PREVIEW<br />      <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-10</span> BOLD <span style="color: #0000ff;">OF</span> oPrn<br />      <span style="color: #0000ff;">DEFINE</span> PEN oPen WIDTH  <span style="color: #000000;">2</span>                        <span style="color: #0000ff;">OF</span> oPrn<br /> <br />      oPrn:<span style="color: #000000;">SetPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">// A4</span><br />      oPrn:<span style="color: #000000;">SetPortrait</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Vertical</span><br /><br />      <span style="color: #0000ff;">PAGE</span><br /><br />         nLinI := <span style="color: #000000;">0</span><br />         nColI := <span style="color: #000000;">0</span><br />         nLinF := <span style="color: #000000;">28.5</span><br />         nColF := <span style="color: #000000;">20.0</span><br /><br />         oPrn:<span style="color: #000000;">Cmtr2Pix</span><span style="color: #000000;">&#40;</span>@nLinI, @nColI<span style="color: #000000;">&#41;</span><br />*        oPrn:<span style="color: #000000;">Cmtr2Pix</span><span style="color: #000000;">&#40;</span>@nLinF, @nColF<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//     Si para el calculo de nLinF y nColF uso el metodo Cmtr2Pix() la caja se imprime en coordenadas malas, es por eso que calculo usando tu tip...</span><br /><br />         nLinF := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> nLinF * <span style="color: #000000;">10</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / oPrn:<span style="color: #000000;">nVertSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         nColF := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> nColF * <span style="color: #000000;">10</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / oPrn:<span style="color: #000000;">nHorzSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />         oPrn:<span style="color: #000000;">Box</span><span style="color: #000000;">&#40;</span>nLinI, nColI, nLinF, nColF, oPen  <span style="color: #000000;">&#41;</span>  <br /><br />         nLinF := <span style="color: #000000;">28</span><br />         nColF := <span style="color: #000000;">20</span><br />         <br /><span style="color: #B900B9;">//     Esta linea se imprimira en coordenadas erróneas...</span><br /><br />         oPrn:<span style="color: #000000;">CmSay</span><span style="color: #000000;">&#40;</span> nLinF, nColF, <span style="color: #ff0000;">"::CmSay() Inferior Derecha (28,20)"</span> , oFont,,CLR_BLACK,,PAD_RIGHT <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//     Esta linea se imprimira en coordenadas correctas </span><br />     <br />         nLinF := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> nLinF * <span style="color: #000000;">10</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / oPrn:<span style="color: #000000;">nVertSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         nColF := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> nColF * <span style="color: #000000;">10</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / oPrn:<span style="color: #000000;">nHorzSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />         oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> nLinF, nColF, <span style="color: #ff0000;">"Say() Inferior Derecha (28,20)"</span>, oFont,,CLR_BLACK,,PAD_RIGHT <span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #0000ff;">ENDPAGE</span><br /><br />   <span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2cm2yhmc] De momento parece que la solucion correcta es esta. Cualquier nueva aclaracion sera bienvenida... <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Gracias Carlos.
Class Printer
Ciao Enrico, Grazie per il tip <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->. The problem is if i use for example the method ::CmSay() and i want to print exactly in 28,20, when i print it's in 27.6, 19.5. In topic <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=21659&p=115222#p115222">viewtopic.php?f=6&t=21659&p=115222#p115222</a><!-- l --> are a good solution for this problem (at themoment...). Grazie Enrico
Class Printer
Yes, you have to add the unprintable margin offset. EMG
Class Printer
Ciao Enrico, I don't know if you have add offset but if you see for example method CmSay you add offset, but the result is wrong... [code=fw:3gk9rjd3]<div class="fw" id="{CB}" style="font-family: monospace;">  <span style="color: #00C800;">METHOD</span> CmSay<span style="color: #000000;">&#40;</span> nRow, nCol, cText, oFont, nWidth, nClrText, nBkMode, nPad, lO2A <span style="color: #000000;">&#41;</span>;<br />       <span style="color: #00C800;">INLINE</span> ;<br />       <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">Cmtr2Pix</span><span style="color: #000000;">&#40;</span> @nRow, @nCol <span style="color: #000000;">&#41;</span>,;<br />         <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nWidth # <span style="color: #00C800;">Nil</span>, <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">Cmtr2Pix</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, @nWidth <span style="color: #000000;">&#41;</span>, nWidth += ::<span style="color: #000000;">nYOffset</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span>,;<br />         ::<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> nRow, nCol, cText, oFont, nWidth, nClrText, nBkMode, nPad, lO2A <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:3gk9rjd3] I don't understand nothing de nothing <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> [EDITED] I'm sorry. Now i see than only add offset if u specified parameter width... But dont undertand...
Class Printer
Carles, es cierto, hace mucho que no nos vemos, tendríamos que organizar otra reunión aunque más no sea para ver el daño que ocaciona el tiempo, jaja. Respecto de los errores en la impresión: Cmtr2Pix funciona correctamente para el cálculo de coordenadas relativas a la esquina superior izquierda del papel. NO SIRVE para calcular el tamaño de las cajas, es decir que se aplica a coordenadas pero no a dimensiones. La situación se dá porque el pixel con coordenadas 0,0 no está exactamente en la esquina la hoja, dado que esta suele tener márgenes sobre los que no se puede imprimir. Para poder usar como referencia los bordes de la hoja (y situar el punto 0,0 en la esquina exacta de la hoja) Cmtr2pix aplica la correción restandola a las coordenadas obtenidas. Este ajuste es correcto cuando calculamos coordenadas, pero no debe realizarse si lo que hacermos es calcular dimensiones (tamaños) que no se ven afectados por los márgenes. Esto se demuestra en parte con el código que pusiste, que cambiando la forma de calcular los tamaños de la caja la impresión es correcta. Evidentemente, las medidas calculadas serán incorrectas si las usamos como coordenadas. Amigo, espero no haberla liado mucho con tanto palabrerío, pero el tema en su momento me trajo bastantes dolores de cabeza hasta que encontramos la solución. <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=7029&start=15">viewtopic.php?f=6&t=7029&start=15</a><!-- l --> Es un post bastante viejo pero fue el origen de todo. Un abrazo
Class Printer
[code=fw:ez2p9jlb]<div class="fw" id="{CB}" style="font-family: monospace;">nWidth += ::<span style="color: #000000;">nYOffset</span></div>[/code:ez2p9jlb] Applying offset to width does not appear to make sense. Even then nYOffset has no relevance to horizontal dimension like width. Probably it was intended to be nXOffset. What if "nWidth += ::nYOffset" is omitted?
Class Printer
Carlos, Gracias por tus aclaraciones. Aqui van mis conclusiones: 1.- ::CmSay() -> Realiza el cálculo de coordenadas usando la funcion Cmtr2Pix() posicionando en las coordenadas exactas, independientemente de la impresora usada y en consecuencia del offset de esta. A excepcion de todo lo que se imprime por debajo del offset, es decir, en este pequeño ejemplo: [code=fw:21otaxb1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Printing in portrait and in landscape</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> PAD_LEFT            <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> PAD_RIGHT           <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> PAD_CENTER          <span style="color: #000000;">2</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oPrn, oFont, oPen, nrow, ncol<br />   <span style="color: #00C800;">Local</span> nLinI, nColI, nLinF, nColF<br /> <br /><br />   <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Impresión en Vertical.."</span> PREVIEW<br /><br />      <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-10</span> BOLD <span style="color: #0000ff;">OF</span> oPrn<br />      <span style="color: #0000ff;">DEFINE</span> PEN oPen WIDTH  <span style="color: #000000;">2</span>                        <span style="color: #0000ff;">OF</span> oPrn<br /> <br />      oPrn:<span style="color: #000000;">SetPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">// A4</span><br />      oPrn:<span style="color: #000000;">SetPortrait</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Vertical</span><br /><br />      <span style="color: #0000ff;">PAGE</span><br /><br /><span style="color: #B900B9;">//      Parece Correcto, si lo tomamos como base en 0, 0. Realmente se produce desplazamiento poruqe fisicamente no se imprime en 0,0</span><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span>  <span style="color: #000000;">0</span>,  <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"::CmSay() Superior Izquierda ( 0, 0)"</span> , oFont,,CLR_BLACK,,PAD_LEFT  <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//      Parece Incorrecto en relacion al primer CmSay(0,0) si lo tomamos como origen y correcto respecto al borde de la hoja</span><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span>, <span style="color: #ff0000;">"::CmSay() (10,10)"</span> , oFont,,CLR_BLACK,,PAD_LEFT <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//      Parece Incorrecto en relacion al primer CmSay(0,0) y correcto respecto al borde de la hoja</span><br />         oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">28</span>, <span style="color: #000000;">20</span>, <span style="color: #ff0000;">"::CmSay() Inferior Derecha (28,20)"</span> , oFont,,CLR_BLACK,,PAD_RIGHT <span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #0000ff;">ENDPAGE</span><br /><br />   <span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:21otaxb1] En este ejemplo, el segundo y tercer CMSay() se imprimem en la posicion correcta en coordenadas fisicas, pero si tomamos el primer CmSay en (0,0) veremos como realmente no hay la distancia correcta. Es decir, que el primer CmSay() tendra distintas "distancias" con los otros CmSay() en funcion de la impresora. 2.- Si usamos por ejemplo la funcion ::ImportWMF(), se imprime a partir del desplazamiento. Que quiere decir esto ? Si yo tomo como origen 0,0 el desplazamiento de X e Y, y todas las funciones de Impresion SAY, BOX, ... las calculo en funcion del Offset, cuadra toda la impresion independientemente de la impresora. Es cierto que una imprimira todo partir del punto (100,100) y otra a partir del (150,120), pero todo sera en relacion a este punto de origen. 3.- Para experimentarlo, he creado un archivo emf, con un rectangulo que ocupa toda la hoja. Entiendo q este rectangulo va desde la parte superior izquierda (0,0) hasta la inferior derecha. Si imprimo este EMF y realizo el posicionamiento de coordenadas a partir del offset (como el EMF), se imprime todo correctamente independientemente del tipo de impresora. [code=fw:21otaxb1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Printing in portrait and in landscape</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> PAD_LEFT            <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> PAD_RIGHT           <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> PAD_CENTER          <span style="color: #000000;">2</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oPrn, oFont, oPen<br />   <span style="color: #00C800;">Local</span> nLinI, nColI, nLinF, nColF<br /> <br /><br />   <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Impresión en Vertical.."</span> PREVIEW<br />      <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-10</span> BOLD <span style="color: #0000ff;">OF</span> oPrn<br />      <span style="color: #0000ff;">DEFINE</span> PEN oPen WIDTH  <span style="color: #000000;">2</span>                        <span style="color: #0000ff;">OF</span> oPrn<br /> <br />      oPrn:<span style="color: #000000;">SetPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">// A4</span><br />      oPrn:<span style="color: #000000;">SetPortrait</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Vertical</span><br /><br />      <span style="color: #0000ff;">PAGE</span><br /><br />         oPrn:<span style="color: #000000;">ImportWMF</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'test.emf'</span> <span style="color: #000000;">&#41;</span><br /><br />         nLinF := <span style="color: #000000;">0</span><br />         nColF := <span style="color: #000000;">0</span><br /><br />         nLinF := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> nLinF * <span style="color: #000000;">10</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / oPrn:<span style="color: #000000;">nVertSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         nColF := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> nColF * <span style="color: #000000;">10</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / oPrn:<span style="color: #000000;">nHorzSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />         oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> nLinF, nColF, <span style="color: #ff0000;">"Say() Superior Izquierda (0,0)"</span>, oFont,,CLR_BLACK,,PAD_LEFT <span style="color: #000000;">&#41;</span><br /><br />         nLinF := <span style="color: #000000;">28</span><br />         nColF := <span style="color: #000000;">20</span><br /><br />         nLinF := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> nLinF * <span style="color: #000000;">10</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / oPrn:<span style="color: #000000;">nVertSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         nColF := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> nColF * <span style="color: #000000;">10</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / oPrn:<span style="color: #000000;">nHorzSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />         oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> nLinF, nColF, <span style="color: #ff0000;">"Say() Inferior Derecha (0,0)"</span>, oFont,,CLR_BLACK,,PAD_RIGHT <span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #0000ff;">ENDPAGE</span><br /><br />   <span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:21otaxb1] Como lo veis ?
Class Printer
Tus apreciaciones son lógicas y correctas, CmSay 'mueve' (por llamarlo de alguna manera) las coordenadas hasta la mejor posición que puede imprimir segun los parametros de la impresora. Pero creo que debemos seguir teniendo como referencia los bordes físicos del papel, porque sino vamos a tenes problemas serios al tratar de rellenar un formulario preimpreso, las coordenadas finales dependeran de cada impresora y no del papel. El error es conocido y, como normalmente se produce en un rango bastante reducido, creo que preferiría que las cosas queden como están, y sabiendo que no puedo tener coordenas inferiores a 1 cm como medida general, el resto nos saldrá perfecto. Para hacer lo que tu sugieres se podría añadir una DATA que diga si se debe o no aplicar la correccion por area no imprimible.