topic
stringlengths
1
63
text
stringlengths
1
577k
hb_crypt and hb_decrypt problem
Hey everybody! I'm encrypting some data on my application with a random salt and I found out a problem like this: [code=fw:6f9aqc5n]<div class="fw" id="{CB}" style="font-family: monospace;">hb_crypt<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"@Selva123"</span>,<span style="color: #ff0000;">"LVLVDTWRQHVYCDTP"</span><span style="color: #000000;">&#41;</span><br /><br />hb_decrypt<span style="color: #000000;">&#40;</span>hb_crypt<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"@Selva123"</span>,<span style="color: #ff0000;">"LVLVDTWRQHVYCDTP"</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"LVLVDTWRQHVYCDTP"</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:6f9aqc5n] it encrypts the data but it was not able to decrypt using the same key... that's how I'm generating the key: [code=fw:6f9aqc5n]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FOR</span> N=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">16</span><br />&nbsp; &nbsp; &nbsp; nChar:=HB_RandomInt<span style="color: #000000;">&#40;</span> <span style="color: #000000;">65</span>, <span style="color: #000000;">90</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; cSalt+=Chr<span style="color: #000000;">&#40;</span>nChar<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span> N</div>[/code:6f9aqc5n] Does anybody know what is wrong?
hb_curl (Ejemplos).-
Saludos Desde Venezuela; Quisiera saber si alguien tiene ejemplos de uso de hb_curl con FWH. Gracias de antemano.
hb_curl (Ejemplos).-
Hola amigo, CURL es bastante amplia. En mi caso la usé para subir un fichero a la Agencia Tributaria Española para validar una liquidación trimestral de IVA. Si el resultado es correcto, te devuelve un pdf con el borrador de la liquidación, si es incorrecto debes buscar la lista de errores. Deben pasarse varios parámetros con el método POST. En las contribs de Harbour está el código y hay ejemplos de su uso tambien. El código: [code=fw:30hlfr8a]<div class="fw" id="{CB}" style="font-family: monospace;"><br />         MsgWOn<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Contactando Agencia Tributaria...'</span> <span style="color: #000000;">&#41;</span><br /><br />         curl_global_init<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />         <span style="color: #00C800;">IF</span> ! Empty<span style="color: #000000;">&#40;</span> curl := curl_easy_init<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            cTexto:= MemoRead<span style="color: #000000;">&#40;</span>cFileName<span style="color: #000000;">&#41;</span><br />            tmp1 := <span style="color: #ff0000;">'<T3030'</span>+cEjercicio+<span style="color: #ff0000;">'0A0000><AUX>'</span>+Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">300</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">'</AUX><VECTOR>001FIN'</span>+Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">294</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">'</VECTOR>'</span>+;<br />                    urlencode<span style="color: #000000;">&#40;</span> cTexto <span style="color: #000000;">&#41;</span> +<span style="color: #ff0000;">'</ T3030'</span>+cEjercicio+<span style="color: #ff0000;">'0A0000>'</span><br /><span style="color: #B900B9;">// variables POST</span><br />            tmp := <span style="color: #ff0000;">'HID=IE13030B&TIA='</span>+<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>oRB:<span style="color: #000000;">TipoDecl</span>$<span style="color: #ff0000;">'UG'</span>,<span style="color: #ff0000;">'I'</span>,oRB:<span style="color: #000000;">TipoDecl</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">'&NDC='</span>+AllTrim<span style="color: #000000;">&#40;</span>DatTrib->NIF<span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">'&NRC=&ING=&NRR=&ICO=&NR1=&IN1=&NR2=&IN2=&NR3=&IN3=&NR4=&IN4=&NR5=&IN5=&NR6=&IN6=&NR7=&IN7=&IDI=ES&F01='</span>+tmp1+;<br />                   <span style="color: #ff0000;">'&TXT=&FIR=&FIN=F&EJF='</span>+cEjercicio+<span style="color: #ff0000;">'&MOD=303&PRG=EWLINKPS'</span><br />            <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbcurl.ch"</span><br />            curl_easy_setopt<span style="color: #000000;">&#40;</span> curl, HB_CURLOPT_DOWNLOAD <span style="color: #000000;">&#41;</span><br />            curl_easy_setopt<span style="color: #000000;">&#40;</span> curl, HB_CURLOPT_URL, <span style="color: #ff0000;">"https://www2.agenciatributaria.gob.es/es13/l/zi21zilk0021"</span><span style="color: #000000;">&#41;</span><br />            curl_easy_setopt<span style="color: #000000;">&#40;</span> curl, HB_CURLOPT_POSTFIELDS, tmp<span style="color: #000000;">&#41;</span><br />            curl_easy_setopt<span style="color: #000000;">&#40;</span> curl, HB_CURLOPT_SSL_VERIFYPEER, .f. <span style="color: #000000;">&#41;</span><br />            curl_easy_setopt<span style="color: #000000;">&#40;</span> curl, HB_CURLOPT_SSL_VERIFYHOST, .f. <span style="color: #000000;">&#41;</span><br />            curl_easy_setopt<span style="color: #000000;">&#40;</span> curl, HB_CURLOPT_DL_BUFF_SETUP <span style="color: #000000;">&#41;</span><br /><br />            <span style="color: #00C800;">if</span> curl_easy_perform<span style="color: #000000;">&#40;</span> curl <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />               MsgWOff<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />               tmp := curl_easy_dl_buff_get<span style="color: #000000;">&#40;</span> curl <span style="color: #000000;">&#41;</span><br /><br />               <span style="color: #00C800;">If</span> <span style="color: #0000ff;">left</span><span style="color: #000000;">&#40;</span> tmp, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'%PDF'</span><br />                  Memowrit<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'m303.pdf'</span>, tmp <span style="color: #000000;">&#41;</span><br />                  <span style="color: #00C800;">If</span> MsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Desea ver el borrador generado?'</span> <span style="color: #000000;">&#41;</span><span style="color: #B900B9;">// Sociedades O Domiciliacion</span><br />                     ShellExecute<span style="color: #000000;">&#40;</span> , <span style="color: #ff0000;">"Open"</span>, <span style="color: #ff0000;">'m303.pdf'</span> <span style="color: #000000;">&#41;</span><br />                  <span style="color: #00C800;">EndIf</span><br />               <span style="color: #00C800;">Else</span><br />                  <span style="color: #00C800;">If</span> <span style="color: #ff0000;">'Err['</span> $ tmp <span style="color: #B900B9;">// Hay una lista de errores</span><br />                     tmp:= <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> tmp, <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Err['</span>, tmp <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />                     aLista := ListAsArray<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> tmp, <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Err['</span>, tmp <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">';'</span>, .T. <span style="color: #000000;">&#41;</span><br />                     aSize<span style="color: #000000;">&#40;</span> aLista, <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />                     tmp:= <span style="color: #ff0000;">'Lista de Errores'</span>+CRLF<br />                     <span style="color: #00C800;">For</span> i:= <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">&#40;</span> aLista <span style="color: #000000;">&#41;</span><br />                        aLista<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> := <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> aLista<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>, <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"'"</span>, aLista<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span> <span style="color: #000000;">&#41;</span><br />                        aLista<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> := <span style="color: #0000ff;">Left</span><span style="color: #000000;">&#40;</span> aLista<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>, Len<span style="color: #000000;">&#40;</span> aLista<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />                        <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> aLista<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />                           tmp+= CRLF + aLista<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><br />                        <span style="color: #00C800;">endif</span><br />                     EndFor<br />                     MsgAlert<span style="color: #000000;">&#40;</span> tmp <span style="color: #000000;">&#41;</span><br />                  <span style="color: #00C800;">Else</span><br />                     MsgAlert<span style="color: #000000;">&#40;</span> tmp, <span style="color: #ff0000;">'Error en el procesamiento de la AEAT'</span> <span style="color: #000000;">&#41;</span><br />                  <span style="color: #00C800;">EndIf</span><br />               <span style="color: #00C800;">EndIf</span><br />            <span style="color: #00C800;">Else</span><br />               <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Problemas en la comunicación'</span> <span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">EndIf</span><br />            curl_easy_reset<span style="color: #000000;">&#40;</span> curl <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">Else</span><br />            <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Problemas para inicializar conexiones'</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">EndIf</span><br />         MsgWOff<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />         curl_global_cleanup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:30hlfr8a] en realidad como ves las llamadas a la configuracion de curl son pocas, pero funciona 100%. Hoy vencía la presentacion del tercer trimestre de IVA, y hemos hecho casi 400 presentaciones de clientes y sin 1 solo problema de software.
hb_curl (Ejemplos).-
Gracias Carlos Por el ejemplo y la explicacion.
hb_curl (Ejemplos).-
Carlos, Por favor, ¿podrías indicarme dónde conseguir información para generar el modelo 303 via internet?. Si pudieras poner el ejemplo completo sería de mucha utilidad. Mil gracias.
hb_gcCollect() hb_gcCollectAll() equivalencia para xHarbour
Tengo inconveniente que ejecuto tres metodos de una misma clase, al ejecutar la tercera es como si se quedara pegado el ultimo resultado y tengo que salir del programa y solo ejecuto la tercera y obtengo el resultado correcto, estuve revisando la manera de liberar memoria o limpiar y encontre estas dos ultimas para Harbour, en xHarbour no lo reconce, probe con hb_gcAll(.T.) (que si funciona con xHarbour) y sigo con el mismo problema. Uso el Fw2007 Agradezco su apoyo
hb_hbrun
Hola. ¿Se puede llamar a una función de un script con parámetros? He comprobado que cuando compilas al vuelo un prg y luego lo ejecutas con hb_hbrun, se ejecuta la primera función del prg. No sé si se puede ejecutar otra función del prg y si se pueden pasar parámetros. Un saludo
hb_hbrun
Si, asi: hb_hrbRun( cFuncion, xParam1, xParam2,...)
hb_hbrun
Que bien, voy a probarlo. Gracias
hb_hrbRun and some functions inside ...
Hi , Antonio , how to run in the same script some functions ? This is possible ? I did through script mdi child window with xbrowse and buttonbar . Buttonbar's buttons direct to function navigate_keys( VK_F5 ) ( as a sample ) . The same is in mdi child description - oWnd:bKeyDown := { | nKey, nFlags | navigate_key( nKey ) } ... In both situations - pressing needfull key on mdi child or pressing buttonbar I'm getting "Undefined function NAVIGATE_KEY" ... I tried REQUEST NAVIGATE_KEY in the prg ( script ) , the same bad result ... <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> . At this moment I'm seeing that prg as script can run only one single function inside prg . Maybe some functions can be running in a script with other compiler options ? Many thanks in advance !
hb_hrbRun and some functions inside ...
Rimantas, [quote:3w02b66u]function navigate_keys( VK_F5 )[/quote:3w02b66u] There is a typo in the name (missing "s"), check it [quote:3w02b66u]oWnd:bKeyDown := { | nKey, nFlags | navigate_key( nKey ) } [/quote:3w02b66u]
hb_hrbRun and some functions inside ...
[quote="Antonio Linares":3eghunmj]Rimantas, [quote:3eghunmj]function navigate_keys( VK_F5 )[/quote:3eghunmj] There is a typo in the name (missing "s"), check it [quote:3eghunmj]oWnd:bKeyDown := { | nKey, nFlags | navigate_key( nKey ) } [/quote:3eghunmj][/quote:3eghunmj] No , Antonio , in mine source the function name is the same . I did mistake only here , describing problem .
hb_hrbRun and some functions inside ...
Rimantas, Using FWH\samples\scripts.prg, this example works fine: [code=fw:wu96gpfc]<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> Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;Another<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> Another<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;OneMore<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> OneMore<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Hello from OneMore()"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:wu96gpfc]
hb_hrbRun and some functions inside ...
[quote="Antonio Linares":3ail21h1]Rimantas, Using FWH\samples\scripts.prg, this example works fine: [code=fw:3ail21h1]<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> Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   Another<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 /><br /><span style="color: #00C800;">function</span> Another<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   OneMore<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 /><br /><span style="color: #00C800;">function</span> OneMore<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Hello from OneMore()"</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3ail21h1][/quote:3ail21h1] I can confirm that is working . Let describe the problem better . I mentioned , mine script create mdi child with xbrowse and button bar . Also I can say that buttonbar of mdi child window is in other function in the same prg . But all other functions in the same prg will became "undefined" after ACTIVATE WINDOW oWnd ... I don't know really , but it can be related to hb_hrbRun / hb_hrbDo lifetime or something similar ... Now prg as script run : [code=fw:3ail21h1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> Run_prg<span style="color: #000000;">&#40;</span> cPrg <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oRun<br /><span style="color: #00C800;">local</span> lRet &nbsp; &nbsp; := .t.<br /><span style="color: #00C800;">local</span> lCompile := .f.<br /><span style="color: #00C800;">local</span> dPrdDate, dHrbDate<br /><span style="color: #00C800;">local</span> cPrgTime, cHrbTime<br /><span style="color: #00C800;">local</span> cTxtFile, cLine, nFrom := <span style="color: #000000;">1</span><br /><span style="color: #00C800;">local</span> cLog := cProgr_logai + <span style="color: #ff0000;">"<span style="color: #000000;">\h</span>cmp"</span> + alltrim<span style="color: #000000;">&#40;</span> cVart_id <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">".log"</span><br /><span style="color: #00C800;">local</span> nHrb_hdl<br /><br /><span style="color: #00C800;">if</span> !jungtis_serveris<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> .f. <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">if</span> file<span style="color: #000000;">&#40;</span> cProgr_kelias + cPrg + <span style="color: #ff0000;">".prg"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> File<span style="color: #000000;">&#40;</span> cLog <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ferase<span style="color: #000000;">&#40;</span> cLog <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; FReOpen_Stderr<span style="color: #000000;">&#40;</span> cLog, <span style="color: #ff0000;">"w"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oRun &nbsp; &nbsp; := HB_compilebuf<span style="color: #000000;">&#40;</span> HB_ARGV<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, cProgr_kelias + cPrg + <span style="color: #ff0000;">".prg"</span>, <span style="color: #ff0000;">"-n"</span>, <span style="color: #ff0000;">"-i"</span> + cPagr_kelias + <span style="color: #ff0000;">"fwh_incl;"</span> + cPagr_kelias + <span style="color: #ff0000;">"hrb_incl"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cTxtFile := MemoRead<span style="color: #000000;">&#40;</span> cLog <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> empty<span style="color: #000000;">&#40;</span> cTxtFile &nbsp;<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> oRun <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BEGIN SEQUENCE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bOldError = ErrorBlock<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> | o | DoBreak<span style="color: #000000;">&#40;</span> o <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#91;</span><span style="color: #0000ff;">color</span>=#FF0000<span style="color: #000000;">&#93;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nHrb_hdl := hb_hrbload<span style="color: #000000;">&#40;</span> oRun <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hb_hrbDo<span style="color: #000000;">&#40;</span> nHrb_hdl <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hb_hrbunload<span style="color: #000000;">&#40;</span> nHrb_hdl <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#91;</span>/<span style="color: #0000ff;">color</span><span style="color: #000000;">&#93;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//hb_HrbRun( oRun )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; END SEQUENCE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ErrorBlock<span style="color: #000000;">&#40;</span> bOldError <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgInf<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Can't to generate file ... :-( "</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WinExec<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Notepad "</span> + cLog <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;CATCH e<br />&nbsp; &nbsp; &nbsp;lRet := .f.<br />&nbsp; &nbsp;END<br />&nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp;MsgInf<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Can't to find file - "</span> + cProgr_kelias + cPrg + <span style="color: #ff0000;">".prg ..."</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;lRet := .f.<br /><span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">if</span> !empty<span style="color: #000000;">&#40;</span> oRun <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oRun := <span style="color: #00C800;">NIL</span><br /><span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> lRet <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:3ail21h1] In red - script run and then unload . The engine of scripts nothing know about mdi child window inside script ... And , as I mentioned , all other functions in script became "undefined" . Maybe exist other way to run script with windows ?
hb_hrbRun and some functions inside ...
Rimantas, As soon as you call hb_hrbunload( nHrb_hdl ) then you "unload" the scripts functions. You have to call hb_hrbunload( nHrb_hdl ) once you are done with those functions and you will no longer use those functions again.
hb_hrbRun and some functions inside ...
[quote="Antonio Linares":2ioq7lwz]Rimantas, As soon as you call hb_hrbunload( nHrb_hdl ) then you "unload" the scripts functions. You have to call hb_hrbunload( nHrb_hdl ) once you are done with those functions and you will no longer use those functions again.[/quote:2ioq7lwz] The problem is that , I commented all "unload" places . // hb_hrbUnload( nHrb_hdl ) and // oRun := NIL and etc. . The same result . Tested only hb_hrbRun( oRun ) , then with hb_hrbDo( nHrb_hdl ) . Nothing changes , "undefined" after ACTIVATE WINDOW ...
hb_hrbRun and some functions inside ...
Rimantas, Please provide me a small script example to reproduce it here, thanks
hb_hrbRun and some functions inside ...
[quote="Antonio Linares":264vxdb7]Rimantas, Please provide me a small script example to reproduce it here, thanks[/quote:264vxdb7] Of course , that I must did alreday .... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Excuse . [code=fw:264vxdb7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00C800;">static</span> oWnd, oBrw<br /><br /><span style="color: #00C800;">function</span> script_mdiw<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />USE <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SALES"</span> <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"SALES"</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> WndMain<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Script problem with MDI CHILD window"</span><br /><br />@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">ALIAS</span> <span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">AUTOCOLS</span> AUTOSORT LINES CELL<br /><br />oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oWnd:<span style="color: #000000;">oClient</span> := oBrw<br /><br />oWnd:<span style="color: #000000;">bInit</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || make_bar<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />oWnd:<span style="color: #000000;">bValid</span> &nbsp; := <span style="color: #000000;">&#123;</span> || &nbsp;<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> dbclosearea<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, .t. <span style="color: #000000;">&#125;</span><br />oWnd:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span> | nKey, nFlags | wind_keyp<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"NORMAL"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> make_bar<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oBut<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span>, oBar<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">SIZE</span> nButSiz, nButSiz <span style="color: #0000ff;">OF</span> oWnd TOP 3D<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">CURSOR</span> oBar:<span style="color: #000000;">oCursor</span> HAND<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBut<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\d</span>elete.bmp"</span> ;<br /><span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Delete record - Del"</span> <span style="color: #0000ff;">ACTION</span> wind_keyp<span style="color: #000000;">&#40;</span> VK_DELETE <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBut<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\s</span>earch.bmp"</span> ;<br /><span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Find - F9"</span> <span style="color: #0000ff;">ACTION</span> wind_keyp<span style="color: #000000;">&#40;</span> VK_F9 <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBut<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\p</span>rint.bmp"</span> ;<br /><span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Print - F5"</span> <span style="color: #0000ff;">ACTION</span> wind_keyp<span style="color: #000000;">&#40;</span> VK_F5 <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">function</span> wind_keyp<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:264vxdb7] Simply run this code as script , it can be done and from your scripts sample in fwh\samples folder .
hb_hrbRun and some functions inside ...
Antonio , It seems that something I found ... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Maybe it's not clear , but working . I created 2 vars in the main prg : nMain_hrb and aHrb empty array . Now in excute section I added that : [code=fw:1j9j7f75]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nMain_hrb &nbsp; &nbsp; &nbsp;:= hb_hrbload<span style="color: #000000;">&#40;</span> oRun <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hb_hrbDo<span style="color: #000000;">&#40;</span> nMain_hrb <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;u := ascan<span style="color: #000000;">&#40;</span> aHrb, <span style="color: #000000;">&#123;</span> |x| x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> == <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> u == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aadd<span style="color: #000000;">&#40;</span> aHrb, <span style="color: #000000;">&#123;</span> nMain_hrb, oRun <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aHrb<span style="color: #000000;">&#91;</span> u, <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> := nMain_hrb<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aHrb<span style="color: #000000;">&#91;</span> u, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> := oRun<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:1j9j7f75] Then added function in main prg : [code=fw:1j9j7f75]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> harb_unload<span style="color: #000000;">&#40;</span> nHrb <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> u := ascan<span style="color: #000000;">&#40;</span> aHrb, <span style="color: #000000;">&#123;</span> |x| x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> == nHrb <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">if</span> u # <span style="color: #000000;">0</span><br />&nbsp; &nbsp;hb_hrbUnload<span style="color: #000000;">&#40;</span> nHrb <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aHrb<span style="color: #000000;">&#91;</span> u, <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;aHrb<span style="color: #000000;">&#91;</span> u, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> := <span style="color: #00C800;">NIL</span><br /><span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1j9j7f75] In script prg at the beginning of source I direccted : local nHrb := nMain_hrb In bValid of oWnd added : oWnd:bValid := { || ( cwAlias )->( dbclosearea() ), harb_unload( nHrb ), .t. } Now I can say that other functions are working with MDI Child enviroment . Some undoubts - it must be directed vars with values and unload of scripts ... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Maybe you can suggest more clear method ?
hb_hrbRun and some functions inside ...
Rimantas, It seems as a fine way to manage several loaded scripts <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
hb_hrbRun scripts ...
Hi, Here is a small sample for the problem ... [code=fw:2dhxzs5r]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"InKey.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xBrowse.ch"</span><br /><br /><span style="color: #00C800;">function</span> sal_orders<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">private</span> oChild, oBrw<br /><span style="color: #00C800;">private</span> cAls := oApp:<span style="color: #000000;">GetNewAlias</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SALES"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">if</span> !oApp:<span style="color: #000000;">OpenNewAlias</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SALES"</span>, cAls <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span> cAls <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oChild <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Sales orders"</span> <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> oApp:<span style="color: #000000;">oWnd</span><br /><br />@ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oChild <span style="color: #0000ff;">ALIAS</span> <span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">cToolTip</span> = <span style="color: #ff0000;">"This is a sales orders"</span><br />oChild:<span style="color: #000000;">oClient</span> := oBrw<br />oChild:<span style="color: #000000;">bValid</span> &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> .t., <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"before"</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> cAls <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> dbclosearea<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"after"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oChild <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> &nbsp;<br />&nbsp;</div>[/code:2dhxzs5r] I'm running prgs as scripts from hb_hrbrun() function . This sample is working , but ending this window , the main program hangs up and I must to close through task manager . The main reason of hangs up is oChild:bValid row - "after" msg doesn't appears . If comment this row , all is working OK . But I must to close this alias .. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> . It seems that hb_hrbrun can't to do validation codeblock for window or close alias ... Tried without dbclosearea() - the same . So maybe it's problem of execution of codeblock ... Thanks in advance for any ideas or comment ! Working enviroment : FW 9.05 , Harbour 2.0 a beta , BCC 5.5.1
hb_hrbRun scripts ...
[quote="Rimantas":3cdqdse4]Hi, Here is a small sample for the problem ... [/quote:3cdqdse4] It seems that with hb_hrbrun there aren't working mans ... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
hb_hrbRun scripts ...
Rimantas, You can't use a private variable here: private cAls := oApp:GetNewAlias( "SALES" ) because a MDICHILD window is non modal so the execution continues after activating the window and the private variable gets destroyed. Use a local variable instead of a private, and it should work fine <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
hb_hrbRun scripts ...
[quote="Antonio Linares":23n8ir8i]Rimantas, You can't use a private variable here: private cAls := oApp:GetNewAlias( "SALES" ) because a MDICHILD window is non modal so the execution continues after activating the window and the private variable gets destroyed. Use a local variable instead of a private, and it should work fine <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:23n8ir8i] Thanks , Antonio , for your advice ! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> . I didn't try this , but believe , that this will be solved . I have another question - can I manage a script as object ? Now I programmed in this style - created one class , for sample "TSales" , in which exist DATA oChild , oBrw and methods for managment . In the main prg I'm creating oObj := TSales():New() and also put in array of all object { "sales", salesWindowHandle } . Then I know which object are opened , can manage them - this works perfect for me . Can I do something like that as desribed with scripts ? Many thanks in advance ! With best regards !
hb_inline() not working in xharbour from fivewin
I have installed fwh705 and xharbour provided by fivewin (99.71). After upgrading, the hb_inline() is giving compliation error. ( used to work earlier with xharbour 99.70 binaries downloaded from xharbour.org). We can try compiling inline_c.prg in the samples folder. error E0020 : Incomplete statement or unbalanced delimiters. can you pl suggest the solution Mr.Antanio?
hb_inline() not working in xharbour from fivewin
Try the following sample: [code:1qg18pmm]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL n &#58;= 5 ? n HB_INLINE&#40; @n &#41;; &#123; int n = hb_parni&#40; 1 &#41; ; n++; hb_storni&#40; n, 1 &#41;; &#125; ? n RETURN NIL[/code:1qg18pmm] EMG
hb_inline() not working in xharbour from fivewin
Thanks. This is working now. The difference is semicolon is _now_ required between hb_inline( .. ) and the following curly braces ( { ) Earlier it used to work without this semicolon. Thank you very much Mr. Enrico.
hb_inline() not working in xharbour from fivewin
Sorry. I understand now. The syntax is hb_inline ( ... ) { or hb_inline( .. ) ; (semicolon is for continuation of { on the next line. { this solved the issue.
hb_jsonDecode() this Website
hi, i try to use hb_jsonDecode() for "this" Website but i got NIL ... --- my old working Way [code=fw:312ctjlw]<div class="fw" id="{CB}" style="font-family: monospace;">   cUrl := <span style="color: #ff0000;">"https://forums.fivetechsupport.com/viewtopic.php?t=42918"</span><br />   oHttp:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"GET"</span>, cUrl, .F. <span style="color: #000000;">&#41;</span> <br />   oHttp:<span style="color: #000000;">setRequestHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"User-Agent"</span>, <span style="color: #ff0000;">"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0"</span> <span style="color: #000000;">&#41;</span><br /><br />   oHttp:<span style="color: #000000;">Send</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">IF</span> nStatus = <span style="color: #000000;">200</span><br />      StrFile<span style="color: #000000;">&#40;</span> oHttp:<span style="color: #000000;">ResponseBody</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cFile <span style="color: #000000;">&#41;</span></div>[/code:312ctjlw] this way i got Website from "cURL" as "cFile" in HTML Format which i try to "analyze" to get Information ... 1st Try : [code=fw:312ctjlw]<div class="fw" id="{CB}" style="font-family: monospace;">PROCEDURE TestJSON<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> cFile, cMemo, aReturn,ii,nMax,aArray<br /><br />   cFile := <span style="color: #ff0000;">"d:<span style="color: #000000;">\P</span>HPFORUM<span style="color: #000000;">\F</span>WH<span style="color: #000000;">\T</span>0042918.HTML"</span><br />   cMemo := MEMOREAD<span style="color: #000000;">&#40;</span>cFile<span style="color: #000000;">&#41;</span><br />   aReturn := hb_jsonDecode<span style="color: #000000;">&#40;</span>cMemo, @aArray <span style="color: #000000;">&#41;</span><br />altd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span></div>[/code:312ctjlw] i try to use cFile which i have download above but aReturn is NIL and aArray is Empty ... what i´m doing wrong <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> --- i try to change oHttp:setRequestHeader() to [code=fw:312ctjlw]<div class="fw" id="{CB}" style="font-family: monospace;">   oHttp:<span style="color: #000000;">setRequestHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Content-Type"</span>, <span style="color: #ff0000;">"text/xml; charset=utf-8"</span><span style="color: #000000;">&#41;</span></div>[/code:312ctjlw] and try [code=fw:312ctjlw]<div class="fw" id="{CB}" style="font-family: monospace;">   * x1 := hb_jsonDecode<span style="color: #000000;">&#40;</span> oHttp:<span style="color: #000000;">responseText</span>, @aArray <span style="color: #000000;">&#41;</span><br />   x1 := hb_jsonDecode<span style="color: #000000;">&#40;</span> oHttp:<span style="color: #000000;">ResponseBody</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, @aArray <span style="color: #000000;">&#41;</span><br />   altd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:312ctjlw] but still Result x1 is NIL and aArray is Empty ... --- can somebody show me how use use hb_jsonDecode() for "this" Website <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> need some help please
hb_jsonDecode() this Website
hb_jsondecode( cJson, @hHash ) works only if the first parameter is a vaid json text. If valid, second param by ref is filled with Hash. In this case. the responsetext() is NOT json text.
hb_jsonDecode() this Website
hi, thx for Answer. [quote="nageswaragunupudi":1bo9xw8j]hb_jsondecode( cJson, @hHash ) works only if the first parameter is a vaid json text. If valid, second param by ref is filled with Hash. In this case. the responsetext() is NOT json text.[/quote:1bo9xw8j] ok understand so hb_jsondecode() is not a Solution for phpBB System "generated" Website
hb_out.. exe crashed...
I still have this error maybe caused by this line: [code=fw:g2stbkx3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <br />   @ nRow<span style="color: #000000;">-0.2</span>,  <span style="color: #000000;">320</span> <span style="color: #0000ff;">BTNBMP</span> oBtnGetExchange ;<br />              <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Aggiorna "</span>  <span style="color: #0000ff;">OF</span> oDlgSub;<br />              <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> FLAT GDIPLUS ;<br />              BITMAP <span style="color: #ff0000;">"BTN_INTERNET"</span>    <span style="color: #0000ff;">LEFT</span> NOROUND ;<br />              <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>nCambio:= GetExchangeRates<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"EUR"</span>,cCode,ddatacambio<span style="color: #000000;">&#41;</span>,;<br />                   aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBarSub:<span style="color: #000000;">setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#41;</span>  <span style="color: #0000ff;">WHEN</span> !empty<span style="color: #000000;">&#40;</span>ddatacambio<span style="color: #000000;">&#41;</span><br />.</div>[/code:g2stbkx3] I need to make disable this button when ddatacambio is empty ddatacambio is a simply get [b:g2stbkx3]BTN_INTERNET is a resource of a png file [/b:g2stbkx3] [code=fw:g2stbkx3]<div class="fw" id="{CB}" style="font-family: monospace;">BTN_INTERNET  <span style="color: #000000;">10</span> <span style="color: #ff0000;">"table/internet_16.png"</span></div>[/code:g2stbkx3] [b:g2stbkx3]the error[/b:g2stbkx3] [code=fw:g2stbkx3]<div class="fw" id="{CB}" style="font-family: monospace;">Called <span style="color: #0000ff;">from</span> GDIP_DELETEIMAGE<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />Called <span style="color: #0000ff;">from</span> PALBMPFREE<span style="color: #000000;">&#40;</span><span style="color: #000000;">1184</span><span style="color: #000000;">&#41;</span> in .\source\classes\BITMAP.PRG<br />Called <span style="color: #0000ff;">from</span> TBTNBMP:<span style="color: #000000;">FREEBITMAPS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1112</span><span style="color: #000000;">&#41;</span> in .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG<br />Called <span style="color: #0000ff;">from</span> TBTNBMP:<span style="color: #000000;">DESTROY</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1011</span><span style="color: #000000;">&#41;</span> in .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG<br />Called <span style="color: #0000ff;">from</span> TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />Called <span style="color: #0000ff;">from</span> TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1855</span><span style="color: #000000;">&#41;</span> in .\source\classes\CONTROL.PRG</div>[/code:g2stbkx3] for those who want I can send hbout file If I not use [b:g2stbkx3]gdiplus[/b:g2stbkx3] I see the btnbmp [b:g2stbkx3]bad[/b:g2stbkx3] when it is disabled [img:g2stbkx3]https&#58;//i&#46;postimg&#46;cc/TY5crXSK/get-date&#46;png[/img:g2stbkx3] If I use gdiplus I see good the btnbmp when it is disabled [img:g2stbkx3]https&#58;//i&#46;postimg&#46;cc/YSPNPrvK/getx&#46;png[/img:g2stbkx3] but then the exe crashed
hb_out.. exe crashed...
Whenever possible, post the complete example. Mira se ayuda: [code=fw:ny0je93q]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\FWH..\SAMPLES\GERMANO.PRG</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> lChangeBtn := .T.<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oBtn, oBtn2, oFont, cTile := <span style="color: #ff0000;">"WHEN IN BTNBMP"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-14</span> BOLD<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> cTile <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BTNBMP</span> oBtn FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\b</span>tntouch.bmp"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">65</span>, <span style="color: #000000;">50</span> NOBORDER &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Change"</span> FLAT <span style="color: #000000;">2007</span> GDIPLUS <span style="color: #0000ff;">LEFT</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> CHANGE_BTN<span style="color: #000000;">&#40;</span> oBtn2 <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oBtn:<span style="color: #000000;">LoadBitmaps</span><span style="color: #000000;">&#40;</span> ,,,,,,, <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\b</span>tntouch2.bmp"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, <span style="color: #000000;">80</span> <span style="color: #0000ff;">BTNBMP</span> oBtn2 FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\P</span>NGS<span style="color: #000000;">\i</span>mage2.png"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">65</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">LEFT</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; FLAT GDIPLUS NOROUND <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Aggiorna"</span> <span style="color: #0000ff;">WHEN</span><span style="color: #000000;">&#40;</span> lChangeBtn <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oDlg:<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 /><br />&nbsp; &nbsp;oBtn2:<span style="color: #000000;">lCancel</span> := .T.<br /><br />&nbsp; &nbsp;oBtn2:<span style="color: #000000;">LoadBitmaps</span><span style="color: #000000;">&#40;</span> ,,,,,,, <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\P</span>NGS<span style="color: #000000;">\i</span>mage6.png"</span> <span style="color: #000000;">&#41;</span><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 /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> CHANGE_BTN<span style="color: #000000;">&#40;</span> oBtn2 <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;lChangeBtn := .F.<br /><br />&nbsp; &nbsp;oBtn2:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Hide()</span><br />&nbsp; &nbsp;oBtn2:<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: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// FIN / END</span><br />&nbsp;</div>[/code:ny0je93q] Regards, saludos.
hb_out.. exe crashed...
SORRY IT IS NOT THE SAME and it make error when the user click on X of the dialog
hb_out.. exe crashed...
And why, until you find out where you went wrong, don't you turn off the "X" in the Dialog Box? ¿Y por qué, hasta que descubras dónde te equivocaste, no apagas la "X" en el cuadro de diálogo? Regards.
hb_out.. exe crashed...
[quote="karinha":16ipczgo]And why, until you find out where you went wrong, don't you turn off the "X" in the Dialog Box? ¿Y por qué, hasta que descubras dónde te equivocaste, no apagas la "X" en el cuadro de diálogo? Regards.[/quote:16ipczgo] porque no me equivoco, el problema esta en la clase btnbmp cuando se usa gdiplus con archivos png, porque a nadie le importa cuando estan deshabilitados, se ve mal sin el comando gdiplus, ya lo mencione en el foro, y porque ¿Tengo que eliminar la "X" en el cuadro de diálogo para corregir un error de btnbmp? [code=fw:16ipczgo]<div class="fw" id="{CB}" style="font-family: monospace;">Application Internal Error - C:\Work\errori\test_btn_gdi\test.Exe<br />Terminated <span style="color: #00C800;">at</span>: <span style="color: #000000;">2023</span><span style="color: #000000;">-05</span><span style="color: #000000;">-20</span> <span style="color: #000000;">20</span>:<span style="color: #000000;">24</span>:<span style="color: #000000;">51</span><br />Unrecoverable error <span style="color: #000000;">6005</span>: <span style="color: #000000;">Exception</span> error:<br /><br />    Exception Code:<span style="color: #000000;">C0000005</span> ACCESS_VIOLATION<br />    Exception Address:777B43A9<br />    EAX:00003E26  EBX:029A80D0  ECX:000001E6  EDX:029A0270<br />    ESI:029A80D0  EDI:029A0000  EBP:0019F048<br />    CS:<span style="color: #000000;">EIP</span>:<span style="color: #000000;">0023</span>:777B43A9  SS:<span style="color: #000000;">ESP</span>:002B:0019EEF8<br />    DS:002B  ES:002B  FS:<span style="color: #000000;">0053</span>  GS:002B<br />    Flags:<span style="color: #000000;">00210202</span><br />    Exception Parameters: <span style="color: #000000;">00000001</span> 029A9004<br />    CS:<span style="color: #000000;">EIP</span>: <span style="color: #000000;">66</span> <span style="color: #000000;">89</span> <span style="color: #000000;">44</span> CE <span style="color: #000000;">04</span> EB <span style="color: #000000;">11</span> 6A <span style="color: #000000;">00</span> <span style="color: #000000;">50</span> <span style="color: #000000;">51</span> <span style="color: #000000;">52</span> 8B D7 B9 0D<br />    SS:<span style="color: #000000;">ESP</span>: 8BC6F855 029A8188 029A0000 <span style="color: #000000;">00000000</span> C60001C7 029A0000 3A00003A 028248C4 0000007F 029A84D8 <span style="color: #000000;">00890814</span> <span style="color: #000000;">00000110</span> FFFFFE2F 000001A8 FFFFF729 029A1DE0<br /><br />    C stack:<br />    EIP:     EBP:       Frame: <span style="color: #000000;">OldEBP</span>, RetAddr, Params...<br />    777B43A9 0019F048   0019F0A4 777F7B1D 029A8188 029A8190 029A8190 029A0000 <span style="color: #000000;">00000001</span> 029A81B0 <span style="color: #000000;">00000000</span> 029A8190<br />    777F7B1D 0019F0A4   0019F0C0 777B3CA6 <span style="color: #000000;">00000000</span> <span style="color: #000000;">00000000</span> <span style="color: #000000;">00000000</span> 005CBAA7 777B3C60<br />    777B3CA6 0019F0C0   0019F100 6BD6741C 029A0000 <span style="color: #000000;">00000000</span> 029A8190 005CBAA7 <span style="color: #000000;">00001372</span> 029A8190 0282AAF4 008951CC<br />    6BD6741C 0019F100   0019F128 74C67726 029A0000 <span style="color: #000000;">00000000</span> 029A8190 <span style="color: #000000;">00000000</span> 0000177F 0000043F FFFFF3C0 <span style="color: #000000;">00001372</span><br />    74C67726 0019F128   0019F138 00449BED 029A8190 <span style="color: #000000;">00845910</span><br />    00449BED 0019F138   0019F174 00446D13 029A8190 <span style="color: #000000;">00000003</span> 0019FAB0 0041EECF 007D2D24 0019F148 <span style="color: #000000;">00000024</span> 005CBAA7<br />    00446D13 0019F174   0019F190 004EAC4C <span style="color: #000000;">00000054</span> <span style="color: #000000;">00000000</span> 00B91A74 <span style="color: #000000;">00000000</span> <span style="color: #000000;">00000000</span><br />    004EAC4C 0019F190   0019F2A4 004E49D3 <span style="color: #000000;">00000001</span> 005D420F <span style="color: #000000;">00000000</span> <span style="color: #000000;">00845910</span> 00845CB4 0000000C 00845D24 0000001A<br />    004E49D3 0019F2A4   0019F2B4 0042698C 005CB9F2 005C848C<br />    0042698C 0019F2B4   0019F2D0 004EAC4C 0000004A <span style="color: #000000;">00000000</span> 00B91A74 <span style="color: #000000;">00000000</span> 000004A0<br />    004EAC4C 0019F2D0   0019F3E4 004E49D3 <span style="color: #000000;">00000001</span> 005D3F20 <span style="color: #000000;">00000000</span> 005D0824 02967E40 0280F8BC 02A80484 02A80484<br />    004E49D3 0019F3E4   0019F3F4 00426DB4 005D411C 005CF684<br />    00426DB4 0019F3F4   0019F414 004EAE09 <span style="color: #000000;">00845910</span> <span style="color: #000000;">00000048</span> <span style="color: #000000;">00000000</span> 00B91A74 02BD000C <span style="color: #000000;">00000458</span><br />    004EAE09 0019F414   0019F528 004E4B14 <span style="color: #000000;">00000000</span> <span style="color: #000000;">00000000</span> <span style="color: #000000;">00000002</span> 005B5180 <span style="color: #000000;">00000004</span> <span style="color: #000000;">00000001</span> 027FC194 02967E5C<br />    004E4B14 0019F528   0019F538 00426D3C 005D3F19 005CF684<br />    00426D3C 0019F538   0019F558 004EACFC <span style="color: #000000;">00000000</span> <span style="color: #000000;">00000043</span> <span style="color: #000000;">00000000</span> 00B91A74 0147000C 000003F3<br />    004EACFC 0019F558   0019F564 004EB11D 00B80000<br />    004EB11D 0019F564   0019F58C <span style="color: #000000;">00441125</span> <span style="color: #000000;">00000000</span> 005E8F08 <span style="color: #000000;">00000000</span> 005E4A54 <span style="color: #000000;">00000004</span> 0019F5AC 004EADCA 00B62554<br />    <span style="color: #000000;">00441125</span> 0019F58C   0019F5AC 004EAE09 <span style="color: #000000;">00845910</span> 0000003D <span style="color: #000000;">00000000</span> 00B91A74 <span style="color: #000000;">01220006</span> <span style="color: #000000;">00000000</span><br />    004EAE09 0019F5AC   0019F6C0 004E4B14 <span style="color: #000000;">00000003</span> 005D665E <span style="color: #000000;">00000000</span> 005D0FE4 0019F970 0280F8BC 02A80484 02A80484<br /><br /><br />Modules:<br /><span style="color: #000000;">00400000</span> 0047B000 C:\Work\errori\test_btn_gdi\test.Exe<br /><span style="color: #000000;">77770000</span> 001A4000 C:\WINDOWS\SYSTEM32\ntdll.dll<br /><span style="color: #000000;">75840000</span> 000F0000 C:\WINDOWS\System32\KERNEL32.DLL<br /><span style="color: #000000;">77490000</span> <span style="color: #000000;">00223000</span> C:\WINDOWS\System32\KERNELBASE.dll<br />74F20000 0009F000 C:\WINDOWS\SYSTEM32\apphelp.dll<br />6BD40000 <span style="color: #000000;">00285000</span> C:\WINDOWS\SYSTEM32\AcLayers.DLL<br /><span style="color: #000000;">75960000</span> 000BF000 C:\WINDOWS\System32\msvcrt.dll<br /><span style="color: #000000;">76040000</span> 0019C000 C:\WINDOWS\System32\USER32.dll<br /><span style="color: #000000;">77740000</span> <span style="color: #000000;">00018000</span> C:\WINDOWS\System32\win32u.dll<br /><span style="color: #000000;">75930000</span> <span style="color: #000000;">00023000</span> C:\WINDOWS\System32\GDI32.dll<br />76CD0000 000E1000 C:\WINDOWS\System32\gdi32full.dll<br />75A90000 0007B000 C:\WINDOWS\System32\msvcp_win.dll<br /><span style="color: #000000;">75640000</span> <span style="color: #000000;">00120000</span> C:\WINDOWS\System32\ucrtbase.dll<br />76ED0000 005B6000 C:\WINDOWS\System32\SHELL32.dll<br />757F0000 <span style="color: #000000;">00045000</span> C:\WINDOWS\System32\SHLWAPI.dll<br />76E30000 <span style="color: #000000;">00096000</span> C:\WINDOWS\System32\OLEAUT32.dll<br /><span style="color: #000000;">76710000</span> <span style="color: #000000;">00280000</span> C:\WINDOWS\System32\combase.dll<br />76BA0000 000BF000 C:\WINDOWS\System32\RPCRT4.dll<br />75B10000 <span style="color: #000000;">00434000</span> C:\WINDOWS\System32\SETUPAPI.dll<br />75A20000 0003B000 C:\WINDOWS\System32\cfgmgr32.dll<br />76DC0000 <span style="color: #000000;">00019000</span> C:\WINDOWS\System32\bcrypt.dll<br />73DE0000 <span style="color: #000000;">00019000</span> C:\WINDOWS\SYSTEM32\MPR.dll<br /><span style="color: #000000;">66680000</span> <span style="color: #000000;">00003000</span> C:\WINDOWS\SYSTEM32\sfc.dll<br /><span style="color: #000000;">74890000</span> <span style="color: #000000;">00073000</span> C:\WINDOWS\SYSTEM32\WINSPOOL.DRV<br />74F10000 <span style="color: #000000;">00010000</span> C:\WINDOWS\SYSTEM32\sfc_os.DLL<br />75A60000 <span style="color: #000000;">00025000</span> C:\WINDOWS\System32\IMM32.DLL<br />776C0000 0007B000 C:\WINDOWS\System32\ADVAPI32.DLL<br />763D0000 <span style="color: #000000;">00076000</span> C:\WINDOWS\System32\sechost.dll<br /><span style="color: #000000;">76990000</span> 000AF000 C:\WINDOWS\System32\COMDLG32.DLL<br />74D90000 <span style="color: #000000;">00008000</span> C:\WINDOWS\SYSTEM32\VERSION.DLL<br /><span style="color: #000000;">76340000</span> <span style="color: #000000;">00087000</span> C:\WINDOWS\System32\shcore.dll<br /><span style="color: #000000;">74970000</span> <span style="color: #000000;">00210000</span> C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6<span style="color: #000000;">.0</span><span style="color: #000000;">.19041</span>.1110_none_a8625c1886757984\COMCTL32.DLL<br />75F50000 000E3000 C:\WINDOWS\System32\OLE32.DLL<br />74F00000 <span style="color: #000000;">00006000</span> C:\WINDOWS\SYSTEM32\MSIMG32.DLL<br />74ED0000 <span style="color: #000000;">00028000</span> C:\WINDOWS\SYSTEM32\WINMM.DLL<br />74EA0000 0002C000 C:\WINDOWS\SYSTEM32\OLEDLG.DLL<br />74C00000 <span style="color: #000000;">00167000</span> C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1<span style="color: #000000;">.1</span><span style="color: #000000;">.19041</span>.2251_none_d9513b1fe1046fc7\GDIPLUS.DLL<br />73C50000 <span style="color: #000000;">00074000</span> C:\WINDOWS\system32\uxtheme.dll<br />76AC0000 000D4000 C:\WINDOWS\System32\MSCTF.dll<br />6BBC0000 <span style="color: #000000;">00171000</span> C:\WINDOWS\SYSTEM32\WindowsCodecs.dll<br />747C0000 0000F000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll<br /><span style="color: #000000;">76450000</span> 0005F000 C:\WINDOWS\System32\bcryptPrimitives.dll<br />74DE0000 000BA000 C:\WINDOWS\SYSTEM32\textinputframework.dll<br />6B8A0000 0009B000 C:\WINDOWS\System32\CoreMessaging.dll<br />6B940000 0027E000 C:\WINDOWS\System32\CoreUIComponents.dll<br />76C60000 <span style="color: #000000;">00063000</span> C:\WINDOWS\System32\WS2_32.dll<br />73D20000 <span style="color: #000000;">00029000</span> C:\WINDOWS\SYSTEM32\ntmarta.dll<br />6B7C0000 000DB000 C:\WINDOWS\SYSTEM32\wintypes.dll<br />6B720000 <span style="color: #000000;">00094000</span> C:\WINDOWS\SYSTEM32\TextShaping.dll<br />6E1F0000 <span style="color: #000000;">00053000</span> C:\WINDOWS\system32\Oleacc.dll<br /><br />Called <span style="color: #0000ff;">from</span> GDIP_DELETEIMAGE<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />Called <span style="color: #0000ff;">from</span> PALBMPFREE<span style="color: #000000;">&#40;</span><span style="color: #000000;">1184</span><span style="color: #000000;">&#41;</span> in .\source\classes\BITMAP.PRG<br />Called <span style="color: #0000ff;">from</span> TBTNBMP:<span style="color: #000000;">FREEBITMAPS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1112</span><span style="color: #000000;">&#41;</span> in .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG<br />Called <span style="color: #0000ff;">from</span> TBTNBMP:<span style="color: #000000;">DESTROY</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1011</span><span style="color: #000000;">&#41;</span> in .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG<br />Called <span style="color: #0000ff;">from</span> TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />Called <span style="color: #0000ff;">from</span> TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1855</span><span style="color: #000000;">&#41;</span> in .\source\classes\CONTROL.PRG<br />Called <span style="color: #0000ff;">from</span> TBTNBMP:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">2051</span><span style="color: #000000;">&#41;</span> in .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG<br />Called <span style="color: #0000ff;">from</span> _FWH<span style="color: #000000;">&#40;</span><span style="color: #000000;">3560</span><span style="color: #000000;">&#41;</span> in .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG<br />Called <span style="color: #0000ff;">from</span> DIALOGBOXINDIRECT<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />Called <span style="color: #0000ff;">from</span> TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">304</span><span style="color: #000000;">&#41;</span> in .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG<br />Called <span style="color: #0000ff;">from</span> TEST<span style="color: #000000;">&#40;</span><span style="color: #000000;">83</span><span style="color: #000000;">&#41;</span> in test.prg<br /> </div>[/code:16ipczgo] [img:16ipczgo]https&#58;//i&#46;postimg&#46;cc/W4VWT6Q2/v&#46;png[/img:16ipczgo] [b:16ipczgo]the test [/b:16ipczgo] [code=fw:16ipczgo]<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> Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oFont,oBold<br />   <span style="color: #00C800;">local</span> oDlgSub,oBarSub<br />   <span style="color: #00C800;">local</span> nRecord<br />   <span style="color: #00C800;">local</span> oBtnAnnulla,oBtnAiuto,oBtnConferma<br />   <span style="color: #00C800;">local</span> oCursorBtn :=TCursor<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;">'HAND'</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> nWd  := GetSysMetrics<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> * .<span style="color: #000000;">35</span><br />   <span style="color: #00C800;">local</span> nHt  := <span style="color: #000000;">&#40;</span>GetSysMetrics<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> ddatacambio:=ctod<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"  /  /  "</span><span style="color: #000000;">&#41;</span>,cGiorno:=<span style="color: #ff0000;">""</span>,nCambio:=<span style="color: #ff0000;">""</span><br /><br />   <span style="color: #00C800;">local</span> nRow:= <span style="color: #000000;">0</span>,nCol:= <span style="color: #000000;">10</span><br />   <span style="color: #00C800;">local</span> nInterlinea := <span style="color: #000000;">30</span><br />   <span style="color: #00C800;">local</span> oBtnGetExchange<br />   <span style="color: #00C800;">local</span> cMoneta_azienda:=<span style="color: #ff0000;">"EUR"</span><br /><br />   <span style="color: #00C800;">local</span> oSay:=array<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> aGet:=array<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br /><br />   oFont := TFont<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;">"Tahoma"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">14</span>,, <span style="color: #000000;">&#41;</span><br />   oBold := TFont<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;">"Tahoma"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">14</span>,,.t. <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgSub <span style="color: #0000ff;">SIZE</span> nWd, nHt   <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL ;<br />   <span style="color: #0000ff;">COLOR</span> CLR_BLACK,  RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">245</span>,<span style="color: #000000;">245</span>,<span style="color: #000000;">235</span><span style="color: #000000;">&#41;</span>  <span style="color: #0000ff;">FONT</span> oFont  ;<br />   <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"test"</span><br /><br /><br /><span style="color: #B900B9;">//------------------------------------------ButtonBar</span><br />       <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBarSub <span style="color: #0000ff;">OF</span> oDlgSub <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">70</span>  <span style="color: #000000;">2015</span>   BOTTOM NOBORDER<br />        oBarSub:<span style="color: #000000;">bRClicked</span> = <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span><br />      <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnAnnulla <span style="color: #0000ff;">OF</span> oBarSub  ;<br />      FILENAME <span style="color: #ff0000;">"DLG_NO"</span>;<br />      <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Annulla"</span> TOOLTIP <span style="color: #ff0000;">"Esci"</span> ;<br />      <span style="color: #0000ff;">ACTION</span>   <span style="color: #000000;">&#40;</span> oDlgSub:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span> IDCANCEL <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnAiuto <span style="color: #0000ff;">OF</span> oBarSub  ;<br />      FILENAME <span style="color: #ff0000;">"HLP_DLG"</span>;<br />      <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Aiuto"</span> TOOLTIP <span style="color: #ff0000;">"Aiuto"</span> ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">NIL</span>   GROUP<br />      <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnConferma <span style="color: #0000ff;">OF</span> oBarSub  BTNRIGHT  ;<br />      FILENAME <span style="color: #ff0000;">"DLG_OK"</span>;<br />      <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Conferma"</span> ;<br />      TOOLTIP <span style="color: #ff0000;">"Conferma i dati"</span> ;<br />      <span style="color: #0000ff;">ACTION</span>   <span style="color: #000000;">&#40;</span> oDlgSub:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span> IDOK <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      oBarSub:<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">&#123;</span> | lPressed | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lPressed,;<br />                 <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">250</span>,<span style="color: #000000;">250</span>,<span style="color: #000000;">245</span><span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">250</span>,<span style="color: #000000;">250</span>,<span style="color: #000000;">245</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>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">245</span>,<span style="color: #000000;">245</span>,<span style="color: #000000;">235</span><span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">245</span>,<span style="color: #000000;">245</span>,<span style="color: #000000;">235</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: #B900B9;">//------------------------------------------ButtonBar</span><br /><br />   nRow+=<span style="color: #000000;">8</span><br />   @ nRow, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span>  <span style="color: #ff0000;">"Data "</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">25</span>  <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlgSub  TRANSPARENT  <span style="color: #0000ff;">FONT</span> oFont<br />   nRow-=<span style="color: #000000;">2</span><br />   @ nRow, <span style="color: #000000;">70</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> ddatacambio <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlgSub;<br />      BITMAP <span style="color: #ff0000;">"CALEND"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">NIL</span> <span style="color: #B900B9;">//msgdate(ddatacambio,"Seleziona una data",aGet[1])</span><br /><br />   nRow+=nInterlinea<br />   @ nRow,<span style="color: #000000;">10</span>  <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span>  <span style="color: #ff0000;">"Cambio"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">25</span>  <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlgSub  TRANSPARENT  <span style="color: #0000ff;">FONT</span> oFont<br />   nRow-=<span style="color: #000000;">2</span><br />   @ nRow, <span style="color: #000000;">70</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> nCambio <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlgSub <span style="color: #0000ff;">RIGHT</span><br /><br /><br />         @ nRow<span style="color: #000000;">-0.2</span>,  <span style="color: #000000;">320</span> <span style="color: #0000ff;">BTNBMP</span> oBtnGetExchange ;<br />              <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Aggiorna on line"</span>  <span style="color: #0000ff;">OF</span> oDlgSub;<br />              <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> FLAT GDIPLUS ;  <span style="color: #B900B9;">//</span><br />              BITMAP <span style="color: #ff0000;">"BTN_INTERNET"</span>    <span style="color: #0000ff;">LEFT</span> NOROUND ;<br />              <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>nCambio:= GetExchangeRates<span style="color: #000000;">&#40;</span>cMoneta_azienda,cCode,ddatacambio<span style="color: #000000;">&#41;</span>,;<br />                   aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBarSub:<span style="color: #000000;">setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#41;</span>  <span style="color: #0000ff;">WHEN</span> !empty<span style="color: #000000;">&#40;</span>ddatacambio<span style="color: #000000;">&#41;</span><br /><br />             oBtnGetExchange:<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">&#123;</span> | lPressed | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lPressed,;<br />                 <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">250</span>,<span style="color: #000000;">250</span>,<span style="color: #000000;">245</span><span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">250</span>,<span style="color: #000000;">250</span>,<span style="color: #000000;">245</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>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">245</span>,<span style="color: #000000;">245</span>,<span style="color: #000000;">235</span><span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">245</span>,<span style="color: #000000;">245</span>,<span style="color: #000000;">235</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 />             oBtnGetExchange:<span style="color: #000000;">nClrBorder</span> := RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">195</span>,<span style="color: #000000;">195</span>,<span style="color: #000000;">185</span><span style="color: #000000;">&#41;</span><br />             oBtnGetExchange:<span style="color: #000000;">oCursor</span>:=   oCursorBtn<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgSub <span style="color: #0000ff;">CENTER</span> ;<br />    <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oDlgSub:<span style="color: #000000;">resize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />          ChangeButtons<span style="color: #000000;">&#40;</span> oBarSub<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> GetExchangeRates<span style="color: #000000;">&#40;</span>cCurrency,cMoneta,dDate<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #ff0000;">"1.0807"</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">function</span> ChangeButtons<span style="color: #000000;">&#40;</span> oBar <span style="color: #000000;">&#41;</span><br />       AEval<span style="color: #000000;">&#40;</span> oBar:<span style="color: #000000;">aControls</span>, <span style="color: #000000;">&#123;</span> | oCtrl | oCtrl:<span style="color: #000000;">nTop</span> += <span style="color: #000000;">4</span>, oCtrl:<span style="color: #000000;">nHeight</span> -= <span style="color: #000000;">4</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> .T.<br /><span style="color: #B900B9;">//----------------------------------------------------------------------------------------//</span><br /> </div>[/code:16ipczgo] [b:16ipczgo]the file rc[/b:16ipczgo] [code=fw:16ipczgo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"WindowsXP.Manifest"</span><br /><br />BTN_INTERNET  <span style="color: #000000;">10</span> <span style="color: #ff0000;">"table/internet_16.png"</span><br />DLG_OK  <span style="color: #000000;">10</span> <span style="color: #ff0000;">"table/ok.png"</span><br />DLG_NO  <span style="color: #000000;">10</span> <span style="color: #ff0000;">"table/cancel.png"</span><br />HLP_DLG <span style="color: #000000;">10</span> <span style="color: #ff0000;">"table/help.png"</span><br />CALEND BITMAP  <span style="color: #ff0000;">"table/date.bmp"</span></div>[/code:16ipczgo]
hb_out.. exe crashed...
Prueba ahora y comentas: Download completo: [url:3pocmcgq]https&#58;//mega&#46;nz/file/UQ10xLiD#NJJ7OANMd4G554DopHiIKAqszoGtDYVxtDiZrjA8ZX8[/url:3pocmcgq] Regards, saludos.
hb_out.. exe crashed...
[quote="karinha":6f32fln7]Prueba ahora y comentas: Download completo: [url:6f32fln7]https&#58;//mega&#46;nz/file/UQ10xLiD#NJJ7OANMd4G554DopHiIKAqszoGtDYVxtDiZrjA8ZX8[/url:6f32fln7] Regards, saludos.[/quote:6f32fln7] Yes of course with BMP file run ok The problem Is another , of you ready good the next time perhaps you'll understood the problem I 'M USING PNG FILE NOT BMP!!!!!
hb_out.. exe crashed...
There was this bug when GDIP clause is used for BTNBMP. This bug is fixed in the recent version. For now please use this fix. Please replace the function PalBmpFree() in \source\classes\bitmap.prg with this new function. [code=fw:3gb9fu6g]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> PalBmpFree<span style="color: #000000;">&#40;</span> hBmp, hPal <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">static</span> prev<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aBmp, cType<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> HB_ISARRAY<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aBmp &nbsp; &nbsp; := hBmp<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> Len<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hPal &nbsp;:= hBmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; hBmp &nbsp;:= hBmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cType &nbsp; &nbsp;:= ValType<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> cType == <span style="color: #ff0000;">"N"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ISHICON<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DestroyIcon<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elseif ISENHMETA<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DeleteEnhMetafile<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DeleteObject<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DeleteObject<span style="color: #000000;">&#40;</span> hPal <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> cType == <span style="color: #ff0000;">"P"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> prev <span style="color: #000000;">&#41;</span> .or. prev != hBmp<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GDIP_DeleteImage<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prev &nbsp;:= hBmp<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endcase</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// added 2018-04-11</span><br />&nbsp; &nbsp;hBmp &nbsp; &nbsp; := <span style="color: #000000;">0</span> <span style="color: #B900B9;">// if params are by ref</span><br />&nbsp; &nbsp;hPal &nbsp; &nbsp; := <span style="color: #000000;">0</span> <span style="color: #B900B9;">// if params are by ref</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> aBmp != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; aBmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> Len<span style="color: #000000;">&#40;</span> aBmp <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aBmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:3gb9fu6g]
hb_out.. exe crashed...
[quote="nageswaragunupudi":tjbeaj4x]There was this bug when GDIP clause is used for BTNBMP. This bug is fixed in the recent version. For now please use this fix. Please replace the function PalBmpFree() in \source\classes\bitmap.prg with this new function. [code=fw:tjbeaj4x]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> PalBmpFree<span style="color: #000000;">&#40;</span> hBmp, hPal <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">static</span> prev<br /><br />   <span style="color: #00C800;">local</span> aBmp, cType<br /><br />   <span style="color: #00C800;">if</span> HB_ISARRAY<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />      aBmp     := hBmp<br />      <span style="color: #00C800;">if</span> Len<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">1</span><br />         hPal  := hBmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />      <span style="color: #00C800;">endif</span><br />      hBmp  := hBmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />      cType    := ValType<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />      <span style="color: #00C800;">case</span> cType == <span style="color: #ff0000;">"N"</span><br />         <span style="color: #00C800;">if</span> ISHICON<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />            DestroyIcon<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />         elseif ISENHMETA<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />            DeleteEnhMetafile<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">else</span><br />            DeleteObject<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />            DeleteObject<span style="color: #000000;">&#40;</span> hPal <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">case</span> cType == <span style="color: #ff0000;">"P"</span><br />         <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> prev <span style="color: #000000;">&#41;</span> .or. prev != hBmp<br />            GDIP_DeleteImage<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />            prev  := hBmp<br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">endcase</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #B900B9;">// added 2018-04-11</span><br />   hBmp     := <span style="color: #000000;">0</span> <span style="color: #B900B9;">// if params are by ref</span><br />   hPal     := <span style="color: #000000;">0</span> <span style="color: #B900B9;">// if params are by ref</span><br />   <span style="color: #00C800;">if</span> aBmp != <span style="color: #00C800;">nil</span><br />      aBmp<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 />      <span style="color: #00C800;">if</span> Len<span style="color: #000000;">&#40;</span> aBmp <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">1</span><br />         aBmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>   := <span style="color: #000000;">0</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:tjbeaj4x][/quote:tjbeaj4x] [b:tjbeaj4x]thanks Nages[/b:tjbeaj4x] I didn't realize that there was a fix in the new version
hb_out.. exe crashed...
Funciona perfecto con imágenes .PNGs, transformé el ARCHIVO.RC en ARCHIVO.RES y resultó excelente. It works perfect with .PNGs Images, I transformed the FILE.RC into FILE.RES and it turned out excellent. [url:3k0ct9oc]https&#58;//imgur&#46;com/sQtTjcs[/url:3k0ct9oc] [img:3k0ct9oc]https&#58;//i&#46;imgur&#46;com/sQtTjcs&#46;png[/img:3k0ct9oc] Regards, saludos.
hb_out.. exe crashed...
Download completo: [url:1smthrxs]https&#58;//mega&#46;nz/file/FFUkALaY#3Gh784MKqRlX2XwwErnupSEdv4EYVcSVwi-ZVWKuArU[/url:1smthrxs] Regards, saludos.
hb_parcx( -1 ) como funciona?
Amigos, [code:1lutmbvm] hb_vmPushSymbol&#40; hb_dynsymGet&#40; "LEECONFIGURACION"&#41; -> pSymbol &#41;; hb_vmPushNil&#40; &#41;; hb_vmPushString&#40; comando, strlen&#40; comando &#41; &#41;; hb_vmPushLogical&#40; FALSE &#41;; hb_vmFunction&#40; 2 &#41;; respuesta = hb_parcx&#40; -1 &#41;;[/code:1lutmbvm] Tengo ese código, y la función LEECONFIGURACION la cual es llamada, devuelve un dato de este tipo ( siempre con un chr( 0 ) como primer caracter ): [code:1lutmbvm]comando&#58;= chr&#40; 0 &#41; + "anulado + chr&#40; 10 &#41; + chr&#40; 9 &#41;[/code:1lutmbvm] El problema es que: [code:1lutmbvm]respuesta = hb_parcx&#40; -1 &#41;;[/code:1lutmbvm] No me devuelve el primer chr( 0 ), ya lo he verificado de diferentes maneras, escribiendoló en un .txt y viendo con un editor DOS, entre otras cosas. Verifiqué que "antes de devolver comando en la funcion LEECONFIGURACION el chr( 0 ) exista, y si existe. Alguna Idea? Gracias.
hb_parcx( -1 ) como funciona?
Creo que esto esta mal: hb_parcx( -1 ), sirve para recoger valores de harbour en C. Para enviar valores de C a Harbour, usa: hb_retc( -1 )
hb_parcx( -1 ) como funciona?
Rafa, Gustavo está intentando recuperar el valor devuelto desde el PRG por lo que la llamada a hb_par...( -1 ) es correcta. -1 significa que se acceda al valor de retorno. Gustavo: Tu problema es un problema de uso de cadenas en C. Si la cadena empieza con cero, entonces tienes que recuperar a partir del siguiente byte: respuesta = hb_parcx( -1 ) + 1;
hb_parcx( -1 ) como funciona?
Estimado, Entonces quiere decir que yo deberia luego agregarle el chr( 0 ) al inicio para que la cadena este bien? Porque entiendo que me devuelve la cadena "pero" el el primer chr( 0 ) es asi? Gracias.
hb_parcx( -1 ) como funciona?
Gustavo, En C, tradicionalmente, las cadenas se usan como un grupo de bytes terminados en un cero. De ahí que no debas ponerle un cero al principio, si deseas hacer otras operaciones como cadena. Usa la cadena desde el siguiente byte, como te he indicado, y luego ten en cuenta que tienes un cero delante.
hb_parcx( -1 ) como funciona?
[quote="Antonio Linares":35wwxpeo]Rafa, Gustavo está intentando recuperar el valor devuelto desde el PRG por lo que la llamada a hb_par...( -1 ) es correcta. -1 significa que se acceda al valor de retorno. Gustavo: Tu problema es un problema de uso de cadenas en C. Si la cadena empieza con cero, entonces tienes que recuperar a partir del siguiente byte: respuesta = hb_parcx( -1 ) + 1;[/quote:35wwxpeo] Correcto Antonio, no habia entendido bien el problema. Creia que estaba intentando recuperar un valor pasado a la funcion, no que deberia de cogerlo despues de llamar desde C a PRG y recuperar dicho valor en la mismo rutina de C.
hb_parni() no acepta dos parametros en FWH 64
Hola Fivetechsoft , En el ejemplo de mas abajo la funcion hb_parni(1,1) genera error al usarse en FWH 64. En FWH funciona correctamente. [code=fw:1mwstrwh]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//------------------------------------------------------------------------------------</span><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <math.h><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> C_ARRAY <span style="color: #000000;">&#41;</span>                         <br /><span style="color: #000000;">&#123;</span><br />int aArray, nElement, nInfo;<br /><br />aArray = hb_parni<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>;<br />nInfo = hb_parinfa<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// Retrieve no. of elements in array  // OK</span><br />hb_retni<span style="color: #000000;">&#40;</span>nInfo<span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #B900B9;">// nElement = hb_parni(1,1);  // ERROR c2660 function does not take 2 arguments</span><br /><span style="color: #B900B9;">// hb_retni(nElement);</span><br />    <span style="color: #000000;">&#125;</span><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /><span style="color: #B900B9;">//------------------------------------------------------------------------------------ </span></div>[/code:1mwstrwh] El mensaje es: ERROR c2660 'hb_parni' function does not take 2 arguments Saludos, George Version: FWH 64 for harbour 13.03 (MSVC++) Mar. 2013
hb_parni() no acepta dos parametros en FWH 64
George, Tienes que usar hb_parvni() en vez de hb_parni(): nElement = hb_parvni( 1, 1 );
hb_parni() no acepta dos parametros en FWH 64
Gracias Antonio. Funciona perfecto. George
hb_parni() no acepta dos parametros en FWH 64
Antonio, que diferencia hay entre las dos funciones ? Saludos
hb_parnl e valori decimali
Salve a tutti, devo tradurre questa chiamata ad una dll in codice xharbour DIB_IsBlank BOOL DIB_IsBlank(HDIB hdib, double dDarkness) SI tratta di una funzione per sapere se una pagina scansionata ha una certa percentuale di nero e mi serve quindi per sapere se la pagina acquisita è bianca o nera. La funzione mi restituisce un lavore logico. Voglio sapere se la pagina scansionata contiene il 2% di inchiostro. Chiamo quindi TW_ISBLANK(::hdib,0.02) && passo hdib che è la pagina acquisita e il 2% ma mi restituisce sempre .f. Ho sbagliato qualcosa ? Il dubbio che ho è principalmente sul valore decimale che gli passo come hb_parnl. E' corretto ? Questa è la traduzione che ho fatto: HB_FUNC(TW_ISBLANK) { hb_retl(DIB_IsBalnk( (HANDLE) hb_parnl(1), hb_parnl(2) )) } Grazie in anticipo
hb_parnl e valori decimali
Prova con: [code=fw:2gny0ms6]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span>TW_ISBLANK<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> hb_retl<span style="color: #000000;">&#40;</span>DIB_IsBalnk<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>HANDLE<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>, hb_parnd<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:2gny0ms6] EMG
hb_parnl e valori decimali
Funziona. Grazie per il rapido supporto.
hb_retn
Necesito devolver desde una función en C un valor double pero estoy usando la funcion hb_retnl(nDiferencia); y el compilador me arroja un warning por posible pérdida de datos en la conversión. ¿Cual es la función [b:n3gmpixj]hb_ret[/b:n3gmpixj]... de harbour para devolver un valor double de C, en 64 y en 32 bits? ¿Donde se puede encontrar documentación para poder devolver desde C los distintos tipos de valores y arrays?. Gracias por su colaboración.
hb_retn
hb_retnd <!-- m --><a class="postlink" href="http://www.marinas-gui.org/projects/harbour_manual/hb_retnd.htm">http://www.marinas-gui.org/projects/har ... _retnd.htm</a><!-- m -->
hb_retn
Gracias. Ha funcionado.
hb_retni.. y las otras como son?
Estimados: No tengo Guias norton o de donde averiguar, podrían decirme cuales son las funciones (creo que son funciones) que se utilizan para que una funcion desde C devuelva un valor: Como ser: hb_retni hb_ret... necesito saber como hago para decirle que NO DEVOLVERA NADA: algo asi como RETURN nil Gracias.
hb_retni.. y las otras como son?
<!-- m --><a class="postlink" href="http://www.clipx.net/ng/cltech/ng242.php">http://www.clipx.net/ng/cltech/ng242.php</a><!-- m -->
hb_retni.. y las otras como son?
Gustavo, Prueba a simplemente hacer un return; Saludos, José Luis Capel <!-- w --><a class="postlink" href="http://www.capelblog.com">www.capelblog.com</a><!-- w -->
hb_retni.. y las otras como son?
Jose Luis, La forma correcta es hb_ret() Aunque en realidad lo único que hace es limpiar el valor de retorno que haya de una función anterior. Realmente no es necesario llamarlo, aunque sería lo correcto.
hb_retni.. y las otras como son?
Antonio, Tienes razón... como casi siempre <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> Pero como quería no devolver nada... pues un simple return ya hace ese trabajo. Pero como bien dices, lo correcto es un hb_ret(); Saludos, José Luis Capel <!-- w --><a class="postlink" href="http://www.capelblog.com">www.capelblog.com</a><!-- w -->
hb_retni.. y las otras como son?
hb_ret(); Gracias José [quote="jlcapel"]Gustavo, Prueba a simplemente hacer un return; Saludos, José Luis Capel <!-- w --><a class="postlink" href="http://www.capelblog.com">www.capelblog.com</a><!-- w -->[/quote]
hb_sendmail
Hi All I have just converted to Harbour from xHarbour ( with some great help from Antonio ) and I am looking for the source for hb_sendmail() or where the contrib section of Harbour can be found. Cheers Colin
hb_sendmail
Look <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=23644&p=149649&hilit=hb+sendmail#p127055">viewtopic.php?f=6&t=23644&p=149649&hilit=hb+sendmail#p127055</a><!-- l -->
hb_stack. Error
Ola, Fiz o download da versão de Janeiro no FTDN. Depois de construir as libs que utilizo (TSBUTTON, BARLIB, xVGET) tentei recompilar meu projeto e deu o erro abaixo: xLINK: error: Unresolved external symbol '_hb_stack'. xLINK: fatal error: 1 unresolved external(s). Utilizo o FWH + xHarbour.com xHarbour Compiler build 0.99.60 (SimpLex) Com a versão de Dezembro não dava este erro. xHarbour Compiler build 0.99.51 (SimpLex)
hb_stack. Error
Estás usando alguna librería de terceros ? Todas las librerías con módulos en C, tienen que ser recompiladas también.
hb_stack. Error
Recompilei todas as libs de terceiros. Trabalho com a TSBUTTON, BARLIB e VGET (do Vagner Wirts), mesmo assim o erro continua!
hb_stack. Error
Todos los ficheros en C de librerías de terceros tienen que ser recompilados debido a los cambios recientes en Harbour/xHarbour.
hb_strToUTF8 en xHarbour con BUG
Amigos del foro: Tengo problemas con la funcion hb_strToUTF8() en xHarbour . Los carateres [b:iw7m3slv]á,é,í,ó,ú [/b:iw7m3slv] los transforma corrrectamente . EL caratere [b:iw7m3slv]É[/b:iw7m3slv] lo transforma corrrectamente . Los carateres [b:iw7m3slv]Á,Í,Ó,Ú[/b:iw7m3slv] NO los transforma bien, los transorma a otros caracteres Alguien a tenido este problema Como podria solucionarlo? De antemano, gracias por su ayuda Rolando
hb_strToUTF8 en xHarbour con BUG
Un .PRG de ejemplo? [url:3shsjope]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=37451&p=223889&hilit=hb_strToUTF8&sid=fe440a122ce21b8aa086346afb97527d&sid=768408bfc7a4ecc25c57925a72257a62#p223889[/url:3shsjope] Regards, saludos.
hb_strToUTF8 en xHarbour con BUG
karinha : Gracias por responder: El siguiente ejemplo crea un archivo TXT, el cual al verlo con TOTALCOMANDER (F3|OPCIONES|UTF8) muestra el problema mencionado [code=fw:17unnh2d]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> z<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> cStr<br />   cStr :=<span style="color: #ff0000;">"áéíóú ÁÉÍÓÚ"</span><br /><br />   memowrit<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">".<span style="color: #000000;">\e</span>jemploUTF8.txt"</span>, hb_strtoutf8<span style="color: #000000;">&#40;</span>cStr<span style="color: #000000;">&#41;</span> +CRLF+ hb_strtoutf8<span style="color: #000000;">&#40;</span>HB_AnsiToOem<span style="color: #000000;">&#40;</span>cStr<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:17unnh2d] De antemano, gracias por la ayuda Rolando
hb_strToUTF8 en xHarbour con BUG
mejorando el ejemplo: [code=fw:3w3vifow]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> z<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> cStr<br />   cStr :=<span style="color: #ff0000;">"áéíóú ÁÉÍÓÚ"</span><br /><br />   memowrit<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">".<span style="color: #000000;">\e</span>jemploUTF8.txt"</span>, ;<br />            hb_strtoutf8<span style="color: #000000;">&#40;</span>cStr<span style="color: #000000;">&#41;</span> +CRLF+;               <span style="color: #B900B9;">//<-esto tranforma todo mal</span><br />            hb_strtoutf8<span style="color: #000000;">&#40;</span>HB_AnsiToOem<span style="color: #000000;">&#40;</span>cStr<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> +CRLF+; <span style="color: #B900B9;">//<-esto tranforma bien solo "áéíóú &nbsp;É"</span><br />            HB_StrToUTF8<span style="color: #000000;">&#40;</span> cStr,<span style="color: #ff0000;">"ESWIN"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>           <span style="color: #B900B9;">//<-esto tranforma a vacio</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3w3vifow]
hb_strToUTF8 en xHarbour con BUG
yo uso: . FWH 1606 + xHarbour 10194 agote todos mis recursos, use: HB_SetCodePage( ) FW_SetUnicode( ) .. y nada
hb_strToUTF8 en xHarbour con BUG
Intenta asi: [code=fw:2cyuc77e]<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: #B900B9;">/* #translate SET CODEPAGE TO SPANISH &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; => &nbsp;REQUEST HB_CODEPAGE_ESWIN ; hb_setcodepage("ESWIN") */</span><br /><span style="color: #B900B9;">// #translate SET CODEPAGE TO SPANISH &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=> &nbsp;REQUEST HB_CODEPAGE_ESWIN ; hb_cdpSelect("ESWIN")</span><br /><br />REQUEST HB_CODEPAGE_ESWIN<br />REQUEST HB_LANG_ES<br />REQUEST HB_CODEPAGE_ES850C<br />REQUEST HB_CODEPAGE_ESISO<br /><br /><span style="color: #00C800;">FUNCTION</span> SALAZAR_UTF8<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cString, cStr<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//hb_setcodepage("ESWIN")</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//hb_cdpSelect("ESWIN")</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// O:</span><br /><br />&nbsp; &nbsp;HB_SETCODEPAGE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'ES850C'</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;HB_LANGSELECT<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'ES'</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;HB_SETCODEPAGE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"UTF8"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;cString := <span style="color: #ff0000;">"àèéìùç"</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"cString: "</span> + cString<br /><br />&nbsp; &nbsp;cStr :=<span style="color: #ff0000;">"áéíóú ÁÉÍÓÚ"</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"cStr: "</span> + cStr<br /><br />&nbsp; &nbsp;? HB_StrToUTF8<span style="color: #000000;">&#40;</span> cStr,<span style="color: #ff0000;">"ESWIN"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:2cyuc77e] Regards, saludos.
hb_strToUTF8 en xHarbour con BUG
Karinha: Gracias por responder, pero no me funciona. Este codigo tengo que aplicarlo en la FACTURACION EN LINEA para Bolivia, donde tengo que enviar un archivo XML. Todo esta OK, salvo los acentos de mayusculas: Á,Í,Ó,Ú Aplique lo que me dijiste al codigo de ejemplo y no funciona. [code=fw:z3r3cpwt]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> z<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> cStr<br /><br />   HB_SETCODEPAGE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'ES850C'</span><span style="color: #000000;">&#41;</span><br />   HB_LANGSELECT<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'ES'</span><span style="color: #000000;">&#41;</span><br />   HB_SETCODEPAGE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"UTF8"</span> <span style="color: #000000;">&#41;</span><br /><br />   cStr :=<span style="color: #ff0000;">"áéíóú ÁÉÍÓÚ"</span><br /><br />   memowrit<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">".<span style="color: #000000;">\e</span>jemploUTF8.txt"</span>,;<br />            hb_strtoutf8<span style="color: #000000;">&#40;</span>cStr<span style="color: #000000;">&#41;</span> +CRLF+;<br />        hb_strtoutf8<span style="color: #000000;">&#40;</span>HB_AnsiToOem<span style="color: #000000;">&#40;</span>cStr<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> +CRLF+;<br />        HB_StrToUTF8<span style="color: #000000;">&#40;</span> cStr,<span style="color: #ff0000;">"ESWIN"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:z3r3cpwt] Este codigo genera un archivo [b:z3r3cpwt]ejemploUTF8.txt[/b:z3r3cpwt], mira como se generado, por favor. Gracias Rolando.
hb_strToUTF8 en xHarbour con BUG
+1
hb_strToUTF8 en xHarbour con BUG
Intenta asi: [code=fw:1x7nsu7z]<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: #B900B9;">/* #translate SET CODEPAGE TO SPANISH &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; => &nbsp;REQUEST HB_CODEPAGE_ESWIN ; hb_setcodepage("ESWIN") */</span><br /><span style="color: #B900B9;">// #translate SET CODEPAGE TO SPANISH &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=> &nbsp;REQUEST HB_CODEPAGE_ESWIN ; hb_cdpSelect("ESWIN")</span><br /><br />REQUEST HB_CODEPAGE_ESWIN<br />REQUEST HB_LANG_ES<br />REQUEST HB_CODEPAGE_ES850C<br />REQUEST HB_CODEPAGE_ESISO<br /><br /><span style="color: #00C800;">FUNCTION</span> SALAZAR_UTF8<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cString, cStr<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//hb_setcodepage("ESWIN")</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//hb_cdpSelect("ESWIN")</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// O:</span><br /><br />&nbsp; &nbsp;HB_SETCODEPAGE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'ES850C'</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;HB_LANGSELECT<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'ES'</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;HB_SETCODEPAGE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"UTF8"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;cStr :=<span style="color: #ff0000;">"áéíóú ÁÉÍÓÚ"</span><br /><br />&nbsp; &nbsp;cStr &nbsp;:= UPPER<span style="color: #000000;">&#40;</span> TiraAcento<span style="color: #000000;">&#40;</span> cStr <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;MEMOWRIT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">".<span style="color: #000000;">\U</span>TF8.txt"</span>, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hb_strtoutf8<span style="color: #000000;">&#40;</span>cStr<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +CRLF+ ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hb_strtoutf8<span style="color: #000000;">&#40;</span>HB_AnsiToOem<span style="color: #000000;">&#40;</span>cStr<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> +CRLF+ ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HB_StrToUTF8<span style="color: #000000;">&#40;</span> cStr,<span style="color: #ff0000;">"ESWIN"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> TiraAcento<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> ARINICIO, ARFIM, XRETTEXT, ICTEXT, LETRACTEXT<br /><br />&nbsp; &nbsp;cText := StrTran<span style="color: #000000;">&#40;</span>cText,<span style="color: #ff0000;">"<span style="color: #000000;">\"</span>,"</span>/<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ã<span style="color: #ff0000;">","</span>A<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Â<span style="color: #ff0000;">","</span>A<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Á<span style="color: #ff0000;">","</span>A<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ä<span style="color: #ff0000;">","</span>A<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>À<span style="color: #ff0000;">","</span>A<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ã<span style="color: #ff0000;">","</span>a<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>â<span style="color: #ff0000;">","</span>a<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>á<span style="color: #ff0000;">","</span>a<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ä<span style="color: #ff0000;">","</span>a<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>à<span style="color: #ff0000;">","</span>a<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>É<span style="color: #ff0000;">","</span>E<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ê<span style="color: #ff0000;">","</span>E<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ë<span style="color: #ff0000;">","</span>E<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>È<span style="color: #ff0000;">","</span>E<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>é<span style="color: #ff0000;">","</span>e<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ê<span style="color: #ff0000;">","</span>e<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ë<span style="color: #ff0000;">","</span>e<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>è<span style="color: #ff0000;">","</span>e<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Í<span style="color: #ff0000;">","</span>I<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Î<span style="color: #ff0000;">","</span>I<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ï<span style="color: #ff0000;">","</span>I<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ì<span style="color: #ff0000;">","</span>I<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>í<span style="color: #ff0000;">","</span>i<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>î<span style="color: #ff0000;">","</span>i<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ï<span style="color: #ff0000;">","</span>i<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ì<span style="color: #ff0000;">","</span>i<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ó<span style="color: #ff0000;">","</span>O<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Õ<span style="color: #ff0000;">","</span>O<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ô<span style="color: #ff0000;">","</span>O<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ó<span style="color: #ff0000;">","</span>o<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ö<span style="color: #ff0000;">","</span>O<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ò<span style="color: #ff0000;">","</span>O<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>õ<span style="color: #ff0000;">","</span>o<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ô<span style="color: #ff0000;">","</span>o<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ó<span style="color: #ff0000;">","</span>o<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ö<span style="color: #ff0000;">","</span>o<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ò<span style="color: #ff0000;">","</span>o<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Û<span style="color: #ff0000;">","</span>U<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ú<span style="color: #ff0000;">","</span>U<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ü<span style="color: #ff0000;">","</span>U<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ù<span style="color: #ff0000;">","</span>U<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>û<span style="color: #ff0000;">","</span>u<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ú<span style="color: #ff0000;">","</span>u<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ü<span style="color: #ff0000;">","</span>u<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ù<span style="color: #ff0000;">","</span>u<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>Ç<span style="color: #ff0000;">","</span>C<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ç<span style="color: #ff0000;">","</span>c<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>£<span style="color: #ff0000;">","</span>E<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>&<span style="color: #ff0000;">","</span>E<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span><<span style="color: #ff0000;">","</span>.<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>><span style="color: #ff0000;">","</span>.<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>ª<span style="color: #ff0000;">","</span>a<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>º<span style="color: #ff0000;">","</span>o<span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>´<span style="color: #ff0000;">","</span> <span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>²<span style="color: #ff0000;">","</span><span style="color: #000000;">2</span><span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>³<span style="color: #ff0000;">","</span> <span style="color: #ff0000;">")<br />&nbsp; &nbsp;cText := StrTran(cText,"</span>¹<span style="color: #ff0000;">","</span><span style="color: #000000;">1</span><span style="color: #ff0000;">")<br /><br />&nbsp; &nbsp;arINICIO := 32<br />&nbsp; &nbsp;arFIM &nbsp; &nbsp;:= 126<br />&nbsp; &nbsp;xRetText := "</span><span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;For IcText=1 to len(cText)<br /><br />&nbsp; &nbsp; &nbsp; LetracText := subs( cText, IcText, 1 )<br /><br />&nbsp; &nbsp; &nbsp; if asc(LetracText)<arINICIO .or. asc(LetracText)>arFIM<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LetracText := "</span> <span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp; &nbsp; end<br /><br />&nbsp; &nbsp; &nbsp; xRetText += LetracText<br /><br />&nbsp; &nbsp;next<br /><br />RETURN(xRetText)<br /></span></div>[/code:1x7nsu7z] Regards, saludos.
hb_strToUTF8 en xHarbour con BUG
Hola, Siempre comento que es muy importante comprobar en que codificas tu código. Si tenemos este simple codigo: [code=fw:2li0sd51]<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 />   <span style="color: #00C800;">local</span> cStr :=<span style="color: #ff0000;">"àáéèíòóú ÀÁÈÉÍÒÓÚ ñÑçC"</span><br /> <br />   memowrit<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"z1.txt"</span>, cStr <span style="color: #000000;">&#41;</span> <br />  <br />retu <span style="color: #00C800;">nil</span></div>[/code:2li0sd51] Y lo codificamos en ANSI, el fichero resultante està en ANSI, seguramente si le das un previsualizar al fichero lo veas bien, mientras que si lo codificamos con el editor en UTF8 el fichero resultante està en utf8. Cuando digo codificar, hablo de como tienes configurado tu editor. Es mas si pruebas de coger el fichero que esta en utf8 y lo lees con tu editor en ansi veras un carajo. Y asi un monton de combinaciones. És muy importante tener claro todo el tipo de codificaciones. [img:2li0sd51]https&#58;//i&#46;postimg&#46;cc/W3FDSLRq/ansiutf8&#46;jpg[/img:2li0sd51] Es mas, en entorno web hay como una mania de usar el utf8 si usamos dbfs, la mayoria codifcadas en ansi, con lo que te obligas a realizar conversiones continuamente,... Un mundo <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
hb_strToUTF8 en xHarbour con BUG
Hello Carles, Thanks for your info. I have been looking for so long for a display where you can see the different codings. Thanks to your screenshot I have now found out that it is possible with The internal file lister (F3) of TotalComander The integrated file lister allows to view files of almost any size (now up to 2^63 bytes) in text, Unicode, HTML, binary or hex format, bitmap graphics (bmp, jpg, gif, png), multimedia files, and now also RTF files. It keeps only a small part of the file in memory (except for bitmaps), the rest is automatically loaded when scrolling through the text. Best regards, Otto
hb_tonkenCount() cuenta bien ?
En Harbour : hb_tokenCount( "juan;pedro", ":" ) = 1 hb_tokenCount( "juan;pedro", ";" ) = 2 Sabe alguien si es correcto , es un bug o tengo que proporcionar mas parámetros a la función.
hb_tonkenCount() cuenta bien ?
Salvador... Los parametros estan bien... lo malo (al parecer) es el resultado expuse el problema en el foro de harbour (con la solucion incluida) a ver que nos dicen [url:ii0xe6i3]http&#58;//groups&#46;google&#46;com/group/harbour-devel/browse_thread/thread/a28e906147c292fa[/url:ii0xe6i3]
hb_tonkenCount() cuenta bien ?
Hola [quote="Salvador":cpm2a3ee]En Harbour : hb_tokenCount( "juan;pedro", ":" ) = 1 hb_tokenCount( "juan;pedro", ";" ) = 2 [/quote:cpm2a3ee] Pienso que es correcto, lo que hb_tokenCount hace es dar los token que hay en la expresion, segun el separador que proporcionas. Saludos Marcelo
hb_tonkenCount() cuenta bien ?
[quote="Marcelo Via Giglio":1p30smb9]Hola [quote="Salvador":1p30smb9]En Harbour : hb_tokenCount( "juan;pedro", ":" ) = 1 hb_tokenCount( "juan;pedro", ";" ) = 2 [/quote:1p30smb9] Pienso que es correcto, lo que hb_tokenCount hace es dar los token que hay en la expresion, segun el separador que proporcionas. Saludos Marcelo[/quote:1p30smb9] Marcelo... cierto el punto no es contar los separadores es contar los token <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
hb_tonkenCount() cuenta bien ?
hb_tokenCount( "juan;pedro;", ";" ) = 3 hb_tokenCount( "", ";" ) = 1 Creo que es confuso. <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? -->
hb_tonkenCount() cuenta bien ?
Salvador, Afirmativamente, cuenta bien. hb_tokencount() --> [b:11y76flk]NO CUENTA[/b:11y76flk] el numero de apariciones de un separador en una cadena En el caso de una cadena vacia o una cadena que no contenga ninguna aparicion del separador el resultado siempre sera 1 [code=fw:11y76flk]<div class="fw" id="{CB}" style="font-family: monospace;"><br />hb_tokenCount<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">";"</span> <span style="color: #000000;">&#41;</span> = <span style="color: #000000;">1</span><br /> </div>[/code:11y76flk] Siempre devolvera el Numero de apariciones del separador en la cadena mas uno. [code=fw:11y76flk]<div class="fw" id="{CB}" style="font-family: monospace;"><br />hb_tokenCount<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"juan;pedro;"</span>, <span style="color: #ff0000;">";"</span> <span style="color: #000000;">&#41;</span> = <span style="color: #000000;">3</span><br />&nbsp;</div>[/code:11y76flk] Saludos, Andres Reyes
hb_unzipfile + FWH 8.04 = error GPF
Hi,After update to FWH 8.04 I do not success to unzip files. It always generates an error GPF!Help-me !!!!
hb_unzipfile + FWH 8.04 = error GPF
Try to move hbzip.lib before fivehc.lib in your link script.EMG
hb_unzipfile + FWH 8.04 = error GPF
Enrico,Thanks, it´s ok.
hb_unzipfile + FWH 8.04 = error GPF
By the way, I don't think it is a good thing. This problem is originated after the recent changes in zlib library and should be fixed for me.EMG
hb_unzipfile no me descomprime carpetas vacias.
por qué pasa eso? he probado comprimir con 7zip en formato zip una estructura de carpetas vacias y al descomprimir con hb_unzipfile no me descomprime nada. Como que el hb_unzipfile solo descomprime archivos. alguna solucion? gracias.
hb_urlencode
Dear Antonio, I have a question about hb_urlencode (). I can't find this function in Harbour. It is available in mod harbour. Shouldn't it be called HB_FUNC( AP_URLDECODE )? Is there also a urlencode function? Best regards, Otto
hb_urlencode
Dear Otto, Here it is: [url:1gbe7ocs]https&#58;//github&#46;com/harbour/core/blob/d407898675b14fbf9b10cd2e23723e9a522686e5/contrib/hbtip/encurlc&#46;c[/url:1gbe7ocs] We renamed TIP_URLDECODE() into HB_URLDECODE() in mod_harbour to remember its origin: [url:1gbe7ocs]https&#58;//github&#46;com/FiveTechSoft/mod_harbour/blob/master/source/url&#46;c[/url:1gbe7ocs] Giancarlo also provides a TIP_URLENCODE() but we have not needed it in mod_harbour yet
hb_vmPushString...
Estimados, Antonio en un momento me contesto sobre el "llamado de funciones FWH desde codigo C", Necesito saber si existe algun ejemplo dando vuelta porque me interesó el tema y estoy necesitando mas informacion al respecto. Gracias.
hb_vmPushString...
Gustavo, Estos foros tienen una opción de búsqueda (search) muy potente. Prueba a buscar BEGINDUMP por ejemplo.
hb_xFree invalid pointer
Hi , Can anyone tell me why this error occures ? hb_xfree() Invalid Pointer 012879FC I can't provide a sample because the program is too big. If anyone has any idea please respond. Thanks A.S.K
hb_xFree invalid pointer
Are you using harbour or xharbour ? what build ?
hb_xFree invalid pointer
[quote="ask":jxikcyo2]Hi , Can anyone tell me why this error occures ? hb_xfree() Invalid Pointer 012879FC I can't provide a sample because the program is too big. If anyone has any idea please respond. Thanks A.S.K[/quote:jxikcyo2] This is a nasty error that can be provided by many reasons. Can you check that you are not indexing on a very large field ? I have been through something like this in the past . Hth Richard
hb_xFree invalid pointer
[quote="Antonio Linares":1g7oact5]Are you using harbour or xharbour ? what build ?[/quote:1g7oact5] I'm using xharbour 0.99.4 and fwh 2.5 october 2004 This error has something to do with [b:1g7oact5]release function[/b:1g7oact5]