topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
Antonio...Codigo que no funciona
|
Armando,La razón es que hasta la versión 2.4 de FWH existía un bug que no liberaba correctamente las DLLs usadas, asi al hacer LoadLibray() la DLL se quedaba cargada en memoria, aunque se llamase a FreeLibrary().Al corregirlo en siguientes versiones de FWH, entonces se hacía preciso volver a cargar la DLL, ya que dejaba de estar disponible.
|
Antonio...Codigo que no funciona
|
[quote="Antonio Linares":q8m462i7]Armando,
La razón es que hasta la versión 2.4 de FWH existía un bug que no liberaba correctamente las DLLs usadas, asi al hacer LoadLibray() la DLL se quedaba cargada en memoria, aunque se llamase a FreeLibrary().
Al corregirlo en siguientes versiones de FWH, entonces se hacía preciso volver a cargar la DLL, ya que dejaba de estar disponible.[/quote:q8m462i7]Pues SíLo que pasa es que tuvo que pasar mucho tiempo para darme cuenta que ese fue uno de los cambios que nadie avisó que se había dado... (no está encontré documentación al respecto)Ahora estoy yendo a la busqueda de solucionar el ajuste automático de la ventana cliente en MDI de manera que los degradados y bitmaps de fondo también se reajusten ante el cambio de resolución.Tengo algunos ejemplos realizados en C++ pero como no soy bueno en ese lenguaje me está tomando mucho tiempo... (no me gusta depender del API de windows)
|
Antonio...Codigo que no funciona
|
Armando,En el fichero whatsnew.txt de FWH, del cual publicamos aqui copia en cada build, se especificó claramente el error y la solución: August 2004 build =============... * IMPORTANT: Since version 2.5, FreeLibrary() 32 bits is properly working, so if you are using Borland controls, you will have to do a previous local hDLL := LoadLibrary( "bwcc32.dll" ) and a final FreeLibrary( hDLL ) besides the call to BWCCRegister() that keeps being required.>Ahora estoy yendo a la busqueda de solucionar el ajuste automático de la ventana cliente en MDI de manera que los degradados y bitmaps de fondo también se reajusten ante el cambio de resolución. >Si explicas lo que quieres hacer y pones un ejemplo, con mucho gusto intentaremos ayudar <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Antonio...butonbmp de Rosine?
|
Maestro:
Sería posible me envio los archivos a mi tambien
Se los pedí en el otro post, pero como hubieron
muchos pedidos seguro se le paso el mio.
Muchas gracias y disculpe.
Saludos
Ruben Fernandez.
|
Antonio...butonbmp de Rosine?
|
Rubén,
Vamos a publicarlos en el nuevo build de Abril dentro de pocos días.
|
Antonio...butonbmp de Rosine?
|
Gracias Maestro
Saludos
Ruben Fernandez
|
Antonio: Please explain
|
* New: FUll support to easily build your PRGs from Microsoft free vscode. Just open
a PRG from FWH\samples and build it using Ctrl + Shift + B"
I tried this ... but clearly I need to understand the setup.
I downloaded the code program ... but how does it need to be configured ? What are the steps ? I thought there was a section on this forum but I can't find it.
Thanks.
|
Antonio: Please explain
|
Dear Tim,
Please review this thread:
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=231362#p231362">viewtopic.php?p=231362#p231362</a><!-- l -->
|
Antonio: Please explain
|
OK ... I looked at that thread. I reinstalled FWH 20.04. I was able to get the settings to now use Harbour to generate the .c code.
I was working with fivedit.prg in sources. I get the .c code compiled ... but now what do I need to do to get it to link the program and run it ?
Thanks.
|
Antonio: Please explain
|
Tim,
1. Open Microsoft vscode and select the folder c:\FWH\samples folder
2. Open a PRG from samples from vscode
3. Press Ctrl + Shift + B
|
Antonio: Please explain
|
Antonio,
That is exactly what I am doing.
VSCode builds the .c but stops there and does not build the actual executable or run it.
What am I missing ? It must be a setup issue ... so what do I need to change and where ?
Tim
|
Antonio: Please explain
|
I really would like to use this feature from 20.04, but I need to understand why it does not complete the build. It creates the .c file and stops.
Certainly it does more than this.
|
Antonio: Please explain
|
Dear Tim,
Do you get an error msg ? Are you placed at c:\fwh\samples ?
Have you installed FWH 20.04 ?
You can edit the tasks.json file yourself and check it is looks like the one I pointed you to
|
Antonio: Please explain
|
Antonio,
Yes, I am running by default in the samples directory.
I am using the simpler version you pointed to, which is using buildh32.bat ( since I'm using Microsoft )
The json is in the .vscode subfolder in the samples directory.
When I press t he keys, it tells me it cannot find buildh32.bat. It is there, in the samples directory.
So, I have a clear path problem here. Though I've opened the correct folder in VS Code, I have a hunch the json is somehow directing it to look for the .bat file elsewhere.
If I execute the commoand. buildh32 fivedemo. the program is built and run. So clearly the .bat file is good.
Your input would be appreciated.
Tim
|
Antonio: Please explain
|
Tim,
Please open vscode and select "c:\fwh\samples" as the folder to work on from vscode
Being there, open a new terminal from vscode and select "cmd" instead of "powershell".
Then press Ctrl + Shift + B and it should work fine. I just tested it here with success.
|
Antonio: Please explain
|
Thank you. Using the New Terminal with CMD was the missing step. It now works.
The other thing people need to know is to use the proper build script. In my case, Buildh32.bat is used to build with Harbour/Microsoft VC++
|
Antonio: ""BUG"" in TPrinter
|
Antonio, i am using a printerobject with the direct pdf-output. Now i see, that the emf-files in the temp-directory are still present and should be deleted! If i will manually or programatically delete this files, i become a "Access Violation".
...and the temp-directory grows and grows...
A second question: After ENDPRINT the printobject shows with valtype(oPrint) still "O"???
|
Antonio: ""BUG"" in TPrinter
|
Gunther,
1. the emf-files in the temp-directory are still present
Where is located your temp-directory ? What files are there ? Please show a test and the names of the files that you get. If you cant delete them it means that they are open (in use)
2. END... does not mean that the object is turned into nil. When you go out of the scope where it is defined, the garbage collector will do its work and will finally free it.
|
Antonio: ""BUG"" in TPrinter
|
1. Antonio, when using normal Tprinter-object the EMFs are deleted! Only when i use the direct pdf-creation with clausula ..FILE "xyz.pdf" the files in Format z.b. "234571.emf" are not erased! The temp-directory are in normal windows location.
2. END.. Ok, i understand!!
|
Antonio: ""BUG"" in TPrinter
|
Gunter,
Are you calling ENDPRINT after sending the print to the PDF file ?
Class TPrinter Method End() is responsible for deleting the metafiles.
|
Antonio: ""BUG"" in TPrinter
|
[code=fw:3npp9h8k]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> PrintEnd<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> oPrinter:<span style="color: #000000;">lMeta</span><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> oPrinter:<span style="color: #000000;">cFile</span> <span style="color: #000000;">)</span><br /> oPrinter:<span style="color: #000000;">Preview</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> elseif <span style="color: #ff0000;">"pdf"</span> $ Lower<span style="color: #000000;">(</span> oPrinter:<span style="color: #000000;">cFile</span> <span style="color: #000000;">)</span><br /> FWSavePreviewToPDF<span style="color: #000000;">(</span> oPrinter, <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> Lower<span style="color: #000000;">(</span> cFileExt<span style="color: #000000;">(</span> oPrinter:<span style="color: #000000;">cFile</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"pdf"</span>, ;<br /> oPrinter:<span style="color: #000000;">cFile</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span>, oPrinter:<span style="color: #000000;">lPreview</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">else</span><br /> oPrinter:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> oPrinter := <span style="color: #00C800;">nil</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3npp9h8k]
Antonio, you see, that end() only calling on normal prints! On preview, the preview itself deletes the EMFs, on FWSavePreviewToPDF(..) nobody deletes this files!
Should end() called in all cases?
|
Antonio: ""BUG"" in TPrinter
|
Antonio, I found a solution:
1. In Emf2Jpeg() instead of CloseEnhMetafile() using DeleteEnhMetafile()! In this function should also inserted a sysrefresh(). Then i can produce hundreds of pages without Problems!
2. In FWSavePreviwToPDF() before returning oDevice:end() BUT only, when[b:1qbgq6kq] not [/b:1qbgq6kq]called from TPreview as the preview deletes the EMFs!!
|
Antonio: ""BUG"" in TPrinter
|
Gunther,
I guess you can also do:
ENDPRINT
oPrinter:End()
anyhow, please post here your exact code changes so we can review them and include them, many thanks
|
Antonio: ""BUG"" in TPrinter
|
This is my code, I use. In poor Computers with only 1Gb memory it can bee, the program terminates without any message! Possibly from the FI functions with Memory?
[code=fw:pwgemtmj]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> FWSavePreviewToPDF<span style="color: #000000;">(</span> oDevice, cPDF, lOpen, nQual <span style="color: #000000;">)</span> <span style="color: #B900B9;">// oDevice can be oPrinter or oPreview</span><br /><br /> <span style="color: #00C800;">local</span> cOrient, oPDF<br /> <span style="color: #00C800;">local</span> hWnd , lPreview<br /><br /> <span style="color: #00C800;">DEFAULT</span> nQual := <span style="color: #000000;">0</span> , lPreview := .F.<br /><br /> <span style="color: #00C800;">if</span> oDevice:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"TPREVIEW"</span> <span style="color: #000000;">)</span><br /> hWnd := oDevice:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">hWnd</span><br /> oDevice := oDevice:<span style="color: #000000;">oDevice</span><br /> lPreview := .T.<br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> LoadFreeImage<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <= <span style="color: #000000;">32</span><br /> MsgAlert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"freeimage.dll not found"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">DEFAULT</span> cPDF := cGetFile<span style="color: #000000;">(</span> <span style="color: #ff0000;">"PDF File (*.pdf)|*.pdf|"</span>, <span style="color: #ff0000;">"Select PDF File to Save"</span>, ;<br /> CurDir<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .t. <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">(</span> cPDF <span style="color: #000000;">)</span><br /> cPDF = cFileSetExt<span style="color: #000000;">(</span> cPDF, <span style="color: #ff0000;">"pdf"</span> <span style="color: #000000;">)</span><br /> CursorWait<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> cOrient = <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oDevice:<span style="color: #000000;">nHorzSize</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > oDevice:<span style="color: #000000;">nVertSize</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">'L'</span>, <span style="color: #ff0000;">'P'</span> <span style="color: #000000;">)</span><br /> oPdf = fwPdf<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> cPdf, cOrient, nQual <span style="color: #000000;">)</span><br /> AEval<span style="color: #000000;">(</span> oDevice:<span style="color: #000000;">aMeta</span>, <span style="color: #000000;">{</span> | cMeta |<span style="color: #000000;">(</span> oPdf:<span style="color: #000000;">AddMeta</span><span style="color: #000000;">(</span> cMeta <span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> oPdf:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> CursorArrow<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #00C800;">DEFAULT</span> lOpen := MsgYesNo<span style="color: #000000;">(</span> <span style="color: #ff0000;">"View "</span> + cPDF + <span style="color: #ff0000;">" (Y/N)?"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> lOpen<br /> ShellExecute<span style="color: #000000;">(</span> IfNil<span style="color: #000000;">(</span> hWnd, GetWndDefault<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"open"</span>, cPDF <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">else</span><br /> cPDF := <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span>!lPreview,oDevice:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,<span style="color: #000000;">)</span> <span style="color: #B900B9;">//BYTE-ONE 2014</span><br /><br /><span style="color: #00C800;">return</span> cPDF<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> Emf2Jpeg<span style="color: #000000;">(</span> cEMF , nQual <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> cJpeg := cFileSetExt<span style="color: #000000;">(</span> cEMF, <span style="color: #ff0000;">"jpg"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> hDC1, hDC, hDib, hDib2, hMem, hBmp, hOldBmp, hEMF<br /> <span style="color: #00C800;">local</span> cBuf, oRect, lRet := .f.<br /> <span style="color: #00C800;">local</span> nFormat<br /><br /> cBuf := MemoRead<span style="color: #000000;">(</span> cEMF <span style="color: #000000;">)</span><br /> oRect := TRect<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, Bin2L<span style="color: #000000;">(</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> cBuf, <span style="color: #000000;">21</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> / <span style="color: #000000;">2</span>, ;<br /> Bin2L<span style="color: #000000;">(</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> cBuf, <span style="color: #000000;">17</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span><br /> cBuf := <span style="color: #00C800;">nil</span> <span style="color: #B900B9;">// to release memory</span><br /> HB_GCAll<span style="color: #000000;">(</span>.T.<span style="color: #000000;">)</span><br /> hEMF := GetEnhMetaFile<span style="color: #000000;">(</span> cEMF <span style="color: #000000;">)</span><br /> hDC1 := GetDC<span style="color: #000000;">(</span> GetDesktopWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> hDC := CreateCompatibleDC<span style="color: #000000;">(</span> hDC1 <span style="color: #000000;">)</span><br /> hBmp := CreateCompatibleBitmap<span style="color: #000000;">(</span> hDC1, oRect:<span style="color: #000000;">nWidth</span>, oRect:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span><br /> hOldBmp := SelectObject<span style="color: #000000;">(</span> hDC, hBmp <span style="color: #000000;">)</span><br /> FillRect<span style="color: #000000;">(</span> hDC, oRect:<span style="color: #000000;">aRect</span>, GetStockObject<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> PlayEMF<span style="color: #000000;">(</span> hDC, hEMF, oRect:<span style="color: #000000;">cRect</span> <span style="color: #000000;">)</span><br /> DeleteEnhMetafile<span style="color: #000000;">(</span> hEMF <span style="color: #000000;">)</span> <span style="color: #B900B9;">//BYTE-ONE 2014</span><br /> hDib := DibFromBitmap<span style="color: #000000;">(</span> hBmp <span style="color: #000000;">)</span><br /> cBuf := DibToStr<span style="color: #000000;">(</span> hDib <span style="color: #000000;">)</span><br /> GloBalFree<span style="color: #000000;">(</span> hDib <span style="color: #000000;">)</span><br /> SelectObject<span style="color: #000000;">(</span> hDC, hOldBmp <span style="color: #000000;">)</span><br /> DeleteDC<span style="color: #000000;">(</span> hDC <span style="color: #000000;">)</span><br /> DeleteDC<span style="color: #000000;">(</span> hDC1 <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> hBmp <span style="color: #000000;">)</span><br /> hMem := FI_OpenMemory<span style="color: #000000;">(</span> cBuf, Len<span style="color: #000000;">(</span> cBuf <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> nFormat := FI_GetFileTypeFromMemory<span style="color: #000000;">(</span> hMem, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> hDib := FI_LoadFromMemory<span style="color: #000000;">(</span> nFormat, hMem, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> FI_CloseMemory<span style="color: #000000;">(</span> hMem <span style="color: #000000;">)</span><br /> cBuf := <span style="color: #00C800;">nil</span> <span style="color: #B900B9;">// to release memory</span><br /> HB_GCAll<span style="color: #000000;">(</span>.T.<span style="color: #000000;">)</span><br /> hDib2 := FICnv24<span style="color: #000000;">(</span> hDib <span style="color: #000000;">)</span><br /> FIUnload<span style="color: #000000;">(</span> hDib <span style="color: #000000;">)</span><br /> lRet := FISave<span style="color: #000000;">(</span> <span style="color: #000000;">2</span>, hDib2, cJpeg, nQual <span style="color: #000000;">)</span><br /> FIUnload<span style="color: #000000;">(</span> hDib2 <span style="color: #000000;">)</span><br /> cBuf := <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lRet, MemoRead<span style="color: #000000;">(</span> cJpeg <span style="color: #000000;">)</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span><br /> FErase<span style="color: #000000;">(</span> cJpeg <span style="color: #000000;">)</span><br /> sysrefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//BYTE-ONE 2014</span><br /><br /><span style="color: #00C800;">return</span> cBuf<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span></div>[/code:pwgemtmj]
|
Antonio: ""BUG"" in TPrinter
|
Have you checked for memory leaks?
|
Antonio: ""BUG"" in TPrinter
|
Yes James, no leaks. Maybe the memory-functions from "freeimage" are responsible for this fault!?
We should change to file-functions, but i am not so versed with freeimage.
|
Antonio: ""BUG"" in TPrinter
|
Günther,
Perhaps you need to use a general purpose memory leak detector program instead of the Fivewin functions. This might find memory leaks in freeimage.
James
|
Antonio: ""BUG"" in TPrinter
|
Maybe this old message will help.
James
[quote:3gocq68p]From: Patrick Mast <patrick@winfakt.com>
Subject: Re: FW Win 2000
Date: Friday, January 05, 2001 2:08 AM
Uwe,
> Big Prob my Fw App crashes with a Gpf under Win 2000
> Any Tip for me ??
My app works great in Win2000.
Have you tried this:
[code=fw:3gocq68p]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// In the begin of your app:</span><br />InterruptRegister<span style="color: #000000;">(</span> <span style="color: #000000;">{</span> || ControlGPF<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Setting our own GPF controller</span><br /><br /><span style="color: #B900B9;">//-----------</span><br /><span style="color: #00C800;">function</span> ControlGPF<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//SOCS</span><br /> CLOSE <span style="color: #00C800;">DATA</span><br /> MsgAlert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"A Windows GPF occured..."</span><span style="color: #000000;">)</span><br /> InterruptUnRegister<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// We release our GPF controller</span><br /> Eval<span style="color: #000000;">(</span> ErrorBlock<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, _FWGenError<span style="color: #000000;">(</span> <span style="color: #000000;">5</span>, <span style="color: #ff0000;">"Undetermined GPF"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//---------</span><br /> </div>[/code:3gocq68p]
This way maybe you can see what line causes the GPF.
--
Regards,
Patrick Mast
<!-- m --><a class="postlink" href="http://www.Patrick.Be.kz">http://www.Patrick.Be.kz</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.FiveWin.Be.kz">http://www.FiveWin.Be.kz</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.Harbour-Project.org">http://www.Harbour-Project.org</a><!-- m -->
[/quote:3gocq68p]
|
Antonio: ""BUG"" in TPrinter
|
Mr Gunther and Mr Antonio
I suggest modification of printend() function and no other changes anywhere else.
Proposed New function
[code=fw:x4w5cox9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> PrintEnd<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> oPrinter:<span style="color: #000000;">lMeta</span><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> oPrinter:<span style="color: #000000;">cFile</span> <span style="color: #000000;">)</span><br /> oPrinter:<span style="color: #000000;">Preview</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> elseif <span style="color: #ff0000;">"pdf"</span> $ Lower<span style="color: #000000;">(</span> oPrinter:<span style="color: #000000;">cFile</span> <span style="color: #000000;">)</span><br /> FWSavePreviewToPDF<span style="color: #000000;">(</span> oPrinter, oPrinter:<span style="color: #000000;">cFile</span>, oPrinter:<span style="color: #000000;">lPreview</span> <span style="color: #000000;">)</span><br /> oPrinter:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">else</span><br /> oPrinter:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> oPrinter := <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:x4w5cox9]
Do you think this solves the issue?
|
Antonio: ""BUG"" in TPrinter
|
OK, but usíng CloseEnhMetaFile() frees not the emf-files to let them erasing!
We must use DeleteEnhMetafile( hEMF ) in the function Emf2Jpeg(...)!
Another negative issue from this function is the dependency from the resolution of the Printer-Driver. It should in all cases
the same!
I suggest further the option to use automatically (if available) a PDF-Printer-Driver (with a special name?).
|
Antonio: ""BUG"" in TPrinter
|
Implemented.
|
Antonio: ALT accelerator with button - Urgent help needed
|
FUNCTION TESTALT// Indicates differences between results when clicking a button// compared to instead using ALT accelerator for the button.// Example 1. BUTTON'S ACTION DOESN'T FURTHER CHANGE THE FOCUS:// If ALT accelerator is pressed for a button when the current focus// is on a GET which has a valid, focus returns to the control (in// this case a GET) that had focus before the button's action was // executed - and the valid is executed twice.// If instead the button is clicked, focus remains on the BUTTON after// the button's action is executed - and the valid hass executed just// once.//// 2. BUTTON'S ACTION DOES FURTHER CHANGE THE FOCUS:// If ALT accelerator is pressed for a button when the current focus// is on a GET which has a valid, focus returns to the control (in// this case a GET) that had focus before the button's action was // executed - and the valid is not executed until AFTER the button's // ACTION.// If instead the button is clicked, focus remains on the BUTTON after// the button's action is executed - and the valid is executed BEFORE// the button's ACTION.//--------------------------------------------#include 'Fivewin.ch' LOCAL oDlg LOCAL oGet1, oGet2, oGet3, oBtnLOCAL cVar1 := 'ABCDEF ' LOCAL cVar2 := SPACE(8)LOCAL cVar3 := SPACE(8)DEFINE DIALOG oDlg FROM 0, 0 TO 10, 30 ; TITLE 'Test Alt / Button / GET_VALID' @ 1, 1 GET oGet1 VAR cVar1 SIZE 30,12 PIXEL ; Valid (MSGBEEP(), .T. )@ 2, 1 GET oGet2 VAR cVar2 SIZE 30,12@ 3, 1 GET oGet3 VAR cVar3 SIZE 30,12// Example 1: ACTION doesn't try to further change focus:@ 40,50 BUTTON oBtn PROMPT '&Test' ; SIZE 30, 20 PIXEL ; ACTION (SYSWAIT(1), ( cVar2 := cVar1 ), oGet2:Refresh())// Example 2: Next ACTION does try to further change focus.// Uncomment to see the difference:/*@ 40,50 BUTTON oBtn PROMPT '&Test' ; SIZE 30, 20 PIXEL ; ACTION MsgInfo('This is a test')*/ACTIVATE DIALOG oDlg CENTER return NIL//-------------------------------------------------Hope you can help fix if a bug, or tell me what I need to do.Thanks,Colin Wisbey
|
Antonio: ALT accelerator with button - Urgent help needed
|
Colin,We are already reviewing your example to provide you an answer as soon as possible
|
Antonio: ALT accelerator with button - Urgent help needed
|
Colin,If you modify your code this way, then there is no difference between using the mouse to click on the button or using the accelerator. Please review the generated .TXT files contents:[code:39aq2oxd]
@ 1, 1 GET oGet1 VAR cVar1 SIZE 30,12 PIXEL ;
VALID ( LogFile( "valid.txt", { "valid" } ), .T. )
...
@ 40,50 BUTTON oBtn PROMPT '&Test' ;
SIZE 30, 20 PIXEL ;
ACTION ( LogFile( "action.txt", { "action" } ), ( cVar2 := cVar1 ), oGet2:Refresh() )
[/code:39aq2oxd]Please don't use MsgInfo() as it changes the focus sequence.
|
Antonio: ALT accelerator with button - Urgent help needed
|
This code seems to be fine also. Please check the contents of the generated TXT files. Even using MsgInfo():[code:2182hnwo]
@ 1, 1 GET oGet1 VAR cVar1 SIZE 30,12 PIXEL ;
Valid ( LogFile( "valid.txt", { "valid" } ), .T. )
...
@ 40,50 BUTTON oBtn PROMPT '&Test' ;
SIZE 30, 20 PIXEL ;
ACTION ( LogFile( "action.txt", { "action" } ), MsgInfo( "action" ) )
[/code:2182hnwo]Tested with Harbour and FWH 8.07
|
Antonio: ALT accelerator with button - Urgent help needed
|
Same behaviors with xHarbour and FWH 8.07
|
Antonio: ALT accelerator with button - Urgent help needed
|
Thanks for prompt reply, Antonio, but it doesn't address either of the 2 problems. Please try the following with my original example #1: Step 1: Place cursor in oGet1. Step 2: Action the button by using ALT A. Notice that focus is still on oGet1. When done, click on another get. The VALID (which you can hear from the Msgbeep()) gets evaluated twice.Step 3: Place cursor in oGet1 again. Step 2: Action the button by clicking the button. Notice that focus is now on the button, not on oGet1. When done, click on another get. The VALID (which you can hear from the Msgbeep()) got evaluated prior (and only) prior) to the button click, which is how I want a button to be actioned.For problem 2, try the above with my original example #2.The example I posted is an artificial example to demonstrate the problem. In my real apps, the equivalent of my oGet1 VALID is vital in both it needing to be executed only once and before the button's action gets executed. The VALID can't afford to executed twice or only after the button's action.In short, clicking on the button works the way it always has and works perfectly. However, if we instead action the button by ALT-accelerator, the results are not only different (depending on what the VALID does) but very different in change of focus and when the VALID gets actioned.It's never previously presented a problem for my users because I haven't offered ALT accelerators with a button until now. Now they are screaming at me due to reproducible errors whenever they use the ALT accelerator.Incidentally, I used MSGINFO() in my 2nd example as it represents the equivalent of real-world actions of my buttons. e.g. The real-world dialog represents a docket (invoice) and one of the buttons calls up the image of the docket (obviously changing focus in the process, as does Msginfo()). The VALID on the GET does the equivalent of incrementing a base number so I can't afford it to be actioned twice.As I said, clicking on a button works fine. The problem is with actioning the button by ALT accelerator.Hope that explains my problems better than my original post did.Thanks again. Hope you can help.Col
|
Antonio: ALT accelerator with button - Urgent help needed
|
Oops!. I referred to "ALT A". I meant "ALT T" of course.
|
Antonio: ALT accelerator with button - Urgent help needed
|
Colin,When you press a button accelerator, the focus is not changed to the button. Just its action is fired. A workaround for this:[code:g4rzwigd]
@ 1, 1 GET oGet1 VAR cVar1 SIZE 30,12 PIXEL ;
Valid ( MsgBeep(), .T. )
...
@ 40,50 BUTTON oBtn PROMPT '&Test' ;
SIZE 30, 20 PIXEL ;
ACTION ( ( cVar2 := cVar1 ), oGet2:Refresh(), oBtn:SetFocus() )
[/code:g4rzwigd]
|
Antonio: ALT accelerator with button - Urgent help needed
|
>When you press a button accelerator, the focus is not changed to the button. Just its action is fired. Correct. That's the problem I've been trying to explain.>A workaround for this< snip >Great. That should do it. That solution never crossed my mind (but probably should have, now I've seen how simple it is).Many thanks, Antonio. I really appreciate such prompt and useful support.Col
|
Antonio: ALT accelerator with button - Urgent help needed
|
Antonio, your suggestion fix doesn't make any difference.The only difference it makes is that, if using ALT accelerator, focus now finishes up on the button. However, using ALT accelerator, the valid still gets executed as per all the original problems (wrong timing and/or executed twice) in my 2 examples.Any other thoughts?From a quick check, it seems Microsoft's apps behave identically regardless of whether button action is initiated by clicking or by ALT accelerator. (i.e. the way clicking on a button in FWH works, the focus automatically finishing on the button control). This is the way FWH should automatically work. Whether clicking on a button or using ALT accelerator, the sequence of actions and end results need to be identical. After all, the ALT accelerator is intended to be merely an alternative equivalent to clicking the button.(I sincerely appreciate the time you are investing on this problem. The problem poses a potential trap for any developer using ALT accelerators with buttons, especially if VALID clauses are involved.)
|
Antonio: ALT accelerator with button - Urgent help needed
|
Colin,What FWH version are you using ?Here its working fine using FWH 8.07. If you use LogFile() as I shown here then you will see that the VALID is executed just once.
|
Antonio: ALT accelerator with button - Urgent help needed
|
Antonio, please try this sample. Note that a single Validxxxxx txt file gets created (as it should) if we click the button but two Validxxxxx txt files get created if we use ALT accelerator.//--------------------------------------FUNCTION TESTALT#include 'Fivewin.ch' LOCAL oDlg LOCAL oGet1, oGet2, oGet3, oBtnLOCAL cVar1 := 'ABCDEF ' LOCAL cVar2 := SPACE(8)LOCAL cVar3 := SPACE(8)DEFINE DIALOG oDlg FROM 0, 0 TO 10, 30 ;TITLE 'Test Alt / Button / GET_VALID' @ 1, 1 GET oGet1 VAR cVar1 SIZE 30,12 PIXEL ; Valid ( LogFile( "valid" +STR(Seconds(),9,2) +".txt", { "valid" } ), .T. ) @ 2, 1 GET oGet2 VAR cVar2 SIZE 30,12@ 3, 1 GET oGet3 VAR cVar3 SIZE 30,12 @ 40,50 BUTTON oBtn PROMPT '&Test' ; SIZE 30, 20 PIXEL ; ACTION ( ( SYSWAIT(2),; LogFile( "action" +STR(Seconds(),9,2) +".txt", { "action" } ),; oBtn:SetFocus() ) )ACTIVATE DIALOG oDlg CENTER return NIL//----------------------------------FWH 8.06ThanksCol
|
Antonio: ALT accelerator with button - Urgent help needed
|
Colin,Many thanks for your example. Yes, you were right and there was a problem that was firing twice the focus, when Alt + acc was pressed.This change is required in Class TButton:[code:3kfg7bim]
METHOD Click() CLASS TButton
if ! ::lProcessing
::lProcessing = .t.
if ::bWhen != nil .and. ! Eval( ::bWhen )
::lProcessing = .f.
return nil
endif
::oWnd:lValidating = .T.
if GetFocus() != ::hWnd
SetFocus( ::hWnd )
endif
if ::bAction != nil
Eval( ::bAction )
endif
if ! ::lCancel .and. ::oWnd:hWnd != 0
Super:Click()
endif
if ( GetFocus() == ::hWnd )
::PostMsg( BM_SETSTYLE, BS_DEFPUSHBUTTON, 1 )
else
if ! ::lDefault
::PostMsg( BM_SETSTYLE, BS_PUSHBUTTON, 1 )
endif
endif
::lProcessing = .f.
endif
return nil
[/code:3kfg7bim]
With such change, this test is properly working here:
[code:3kfg7bim]
#include 'Fivewin.ch'
function Main()
LOCAL oDlg
LOCAL oGet1, oGet2, oGet3, oBtn
LOCAL cVar1 := 'ABCDEF '
LOCAL cVar2 := SPACE( 8 )
LOCAL cVar3 := SPACE( 8 )
DEFINE DIALOG oDlg FROM 0, 0 TO 10, 30 ;
TITLE 'Test Alt / Button / GET_VALID'
@ 1, 1 GET oGet1 VAR cVar1 SIZE 30,12 PIXEL ;
Valid ( LogFile( "valid" + AllTrim( Str( GetTickCount() ) ) + ".txt", { "valid" } ), .T. )
@ 2, 1 GET oGet2 VAR cVar2 SIZE 30,12
@ 3, 1 GET oGet3 VAR cVar3 SIZE 30,12
@ 40,50 BUTTON oBtn PROMPT '&Test' ;
SIZE 30, 20 PIXEL ;
ACTION ( LogFile( "action" + AllTrim( Str( GetTickCount() ) ) + ".txt", { "action", GetClassName( GetFocus() ) } ) )
ACTIVATE DIALOG oDlg CENTER
return NIL
[/code:3kfg7bim]Please test it and let us know your results. Thanks!
|
Antonio: AddPicture & EXCEL 2010
|
Amigos:
como hago para insertar una imagen en una hoja de excel ?
la idea es insertar una imagen en la primera celda de la oSheet
el siguiente codigo marca error de ejecucion: ,
Error description: Error 3302404:SHAPES/3 DISP_E_MEMBERNOTFOUND: ADDPICTURE
[code=fw:25cznwop]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <fivewin.ch><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oExcel, oSheet, oBook<br /> <span style="color: #00C800;">local</span> cFile := <span style="color: #ff0000;">'OLGA1.JPG'</span><br /><br /> oExcel = CreateObject<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Excel.Application"</span> <span style="color: #000000;">)</span><br /> oBook := oExcel:<span style="color: #000000;">WorkBooks</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oSheet := oExcel:<span style="color: #0000ff;">Get</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"ActiveSheet"</span> <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #B900B9;">//oSheet:Pictures:Insert( cFile )</span><br /> <br /> oSheet:<span style="color: #000000;">Shapes</span>:<span style="color: #000000;">AddPicture</span><span style="color: #000000;">(</span> cFile, .F., .T., <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">150</span> <span style="color: #000000;">)</span><br /><br /> oExcel:<span style="color: #000000;">Visible</span> = .T.<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:25cznwop]
Gracias por la ayuda.
|
Antonio: AddPicture & EXCEL 2010
|
Please specify the full path of the image file
For eg.
[code=fw:1pf2icaa]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">local</span> cFile := <span style="color: #ff0000;">'C:<span style="color: #000000;">\F</span>WH<span style="color: #000000;">\g</span>ifs<span style="color: #000000;">\F</span>ts.Gif'</span></div>[/code:1pf2icaa]
Regards
Anser
|
Antonio: AddPicture & EXCEL 2010
|
Anserkk, Many tanks.
Funciona perfecto,
gracias
saludos.
|
Antonio: AddPicture & EXCEL 2010
|
amigos tambien funciona con:
oSheet:Pictures:Insert( cFile )
pero como dice el amigo Anserkk,
hay que indicar la ruta completa donde esta la imagen,
he probado con JPG y BMP funciona perfecto.
saludos...
[code=fw:epqvdex0]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <fivewin.ch><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oExcel, oSheet, oBook<br /> <span style="color: #00C800;">local</span> cFile := <span style="color: #ff0000;">'C:<span style="color: #000000;">\F</span>WH<span style="color: #000000;">\S</span>AMPLES<span style="color: #000000;">\O</span>LGA1.JPG'</span><br /><br /> <span style="color: #00C800;">IF</span> FILE<span style="color: #000000;">(</span>cFile<span style="color: #000000;">)</span><br /> ? <span style="color: #ff0000;">'si existe ...'</span><br /> <span style="color: #00C800;">endif</span><br /> oExcel = CreateObject<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Excel.Application"</span> <span style="color: #000000;">)</span><br /> oBook := oExcel:<span style="color: #000000;">WorkBooks</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oSheet := oExcel:<span style="color: #0000ff;">Get</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"ActiveSheet"</span> <span style="color: #000000;">)</span> <br /> <br /> oSheet:<span style="color: #000000;">Pictures</span>:<span style="color: #000000;">Insert</span><span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</span><br /> <br /> <span style="color: #B900B9;">//oSheet:Shapes:AddPicture( cFile, .F., .T., 0, 0, 200, 150 )</span><br /><br /> oExcel:<span style="color: #000000;">Visible</span> = .T. <span style="color: #B900B9;">//ñ</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:epqvdex0]
|
Antonio: AddPicture & EXCEL 2010
|
Buen dia.
Y si esa imagen la tengo dentro de un recurso?
gracias.
|
Antonio: AddPicture & EXCEL 2010
|
[quote="goosfancito":7hq481cb]Buen dia.
Y si esa imagen la tengo dentro de un recurso?
gracias.[/quote:7hq481cb]
Lo he intentado y buscado informacion y con el OLE no creo se pueda, ya que usa los mismo macros de VB y los que he visto alli, solo permite insertar imagenes desde disco, si consigues o logras algo y puedes compartirlo seria bueno, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
|
Antonio: BUG in Treg32?
|
With the new FWH 10/6 and bcc582 the programm hangs with a call to treg32:getbinary() and uses 50% from resources. I change the code to the following:
[code=fw:rk30xzj5]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> GetBinary<span style="color: #000000;">(</span> cSubKey <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TReg32<br /><br /> <span style="color: #00C800;">local</span> cBuffer:=<span style="color: #ff0000;">""</span>, nLen := <span style="color: #000000;">0</span> , nType := <span style="color: #000000;">0</span><br /><br /> ::<span style="color: #000000;">nError</span> := RegQueryValueEx<span style="color: #000000;">(</span> ::<span style="color: #000000;">nHandle</span>, cSubkey, @nType, @cBuffer, @nLen <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nError</span> != ERROR_SUCCESS<br /> cBuffer := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> cBuffer</div>[/code:rk30xzj5]
|
Antonio: BUG in Treg32?
|
Antonio, have you seen this?
|
Antonio: BUG in Treg32?
|
byte-one
Already changed to next version
Thanks
|
Antonio: Bug in ARead()
|
In the function aRead() there must be "local nPos := 4,...." in the first line!
|
Antonio: Bug in ARead()
|
Mr Günther
You are right. Actually it was 4 in the older versions. This value was changed to 1 in some later version wrongly.
Should be restored to 4.
|
Antonio: Bug in ARead()
|
Günther,
Could you please provide an example that shows the need for that change ? thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Antonio: Bug in ARead()
|
For years i use this functions to store arrays. In the last time aread() gives wrong resultats. Antonio, please make
[code=fw:170l2n9y]<div class="fw" id="{CB}" style="font-family: monospace;">cVal := asave<span style="color: #000000;">(</span><span style="color: #000000;">{</span><span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span><span style="color: #000000;">}</span><span style="color: #000000;">)</span><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span>len<span style="color: #000000;">(</span>aread<span style="color: #000000;">(</span>cVal<span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span></div>[/code:170l2n9y]
|
Antonio: Bug in TRibbonBar
|
If i make a [b:1yv0d5mi]second[/b:1yv0d5mi] TRibbonBar in a second window and add a quickaccess, a error occured, when i add to the quickaccess a button. I found, that the static variables are on old status and the quickaccess is not properly initialized! This 3 vars should not be static.
[code=fw:1yv0d5mi]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">static</span> hQuickAreaL, hQuickAreaM, hQuickAreaR</div>[/code:1yv0d5mi]
Question also: Can i manually change static vars in a class??
|
Antonio: Bug in TRibbonBar
|
Antonio, have you seen this?
|
Antonio: Bug in cFileSubDir( cPath )
|
in cFileSubDir( cPath ) are also the drive name returned! This should not be so!
[quote:1rgp6bj8]Returns:
<cDirName> Just the path name specified inside the full filename, excluding the drive name.
[/quote:1rgp6bj8]
|
Antonio: Bug in cFileSubDir( cPath )
|
Günther,
Why do you think that the drive name should not be in the result ?
|
Antonio: Bug in cFileSubDir( cPath )
|
Antonio, read the description from this function:
[quote:s1hylwoa]Returns:
<cDirName> Just the path name specified inside the full filename, [b:s1hylwoa]excluding the drive name[/b:s1hylwoa]. [/quote:s1hylwoa]
Look also at cFilePath()! This now the same result as cFileSubDir().
|
Antonio: Bug in cFileSubDir( cPath )
|
Please try this one:
[code=fw:3lpri2fl]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> cFileSubDir<span style="color: #000000;">(</span> cPath <span style="color: #000000;">)</span> <span style="color: #B900B9;">// returns the subdir of a path & filename</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> <span style="color: #000000;">4</span>, cFilePath<span style="color: #000000;">(</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span> cPath, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"<span style="color: #000000;">\"</span> ,;<br /> Left( cPath, Len( cPath ) - 1 ), cPath ) ) )<br /></span></div>[/code:3lpri2fl]
|
Antonio: Bug in cFileSubDir( cPath )
|
Antonio, thanks!
But this method is not functioning with UNC-path !
|
Antonio: Bug in cFileSubDir( cPath )
|
Günther,
Here you have it with UNC support. cFilePath() needs to be changed too:
[code=fw:3dbbklsb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> cFilePath<span style="color: #000000;">(</span> cPathMask <span style="color: #000000;">)</span> <span style="color: #B900B9;">// returns path of a filename</span><br /><br /> <span style="color: #00C800;">local</span> lUNC := <span style="color: #ff0000;">"/"</span> $ cPathMask<br /> <span style="color: #00C800;">local</span> cSep := <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lUNC, <span style="color: #ff0000;">"/"</span>, <span style="color: #ff0000;">"<span style="color: #000000;">\"</span> )<br /> local n := RAt( cSep, cPathMask ), cDisk<br /><br />return If( n > 0, Upper( Left( cPathMask, n ) ),;<br /> ( cDisk := cFileDisc( cPathMask ) ) + If( ! Empty( cDisk ), cSep, "</span><span style="color: #ff0000;">" ) )</span></div>[/code:3dbbklsb]
[code=fw:3dbbklsb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> cFileSubDir<span style="color: #000000;">(</span> cPath <span style="color: #000000;">)</span> <span style="color: #B900B9;">// returns the subdir of a path & filename</span><br /><br /> <span style="color: #00C800;">local</span> lUNC := <span style="color: #ff0000;">"/"</span> $ cPath<br /> <span style="color: #00C800;">local</span> cTemp := cFilePath<span style="color: #000000;">(</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span> cPath, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> $ <span style="color: #ff0000;">"<span style="color: #000000;">\/</span>"</span> ,;<br /> <span style="color: #0000ff;">Left</span><span style="color: #000000;">(</span> cPath, Len<span style="color: #000000;">(</span> cPath <span style="color: #000000;">)</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>, cPath <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ! lUNC, <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> cTemp, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>, cTemp <span style="color: #000000;">)</span></div>[/code:3dbbklsb]
|
Antonio: Bug in cFileSubDir( cPath )
|
Antonio, thanks!!!
In the next FWH??
|
Antonio: Bug in cFileSubDir( cPath )
|
yes, included in next FWH version <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Antonio: Buttons with skin
|
Antonio, in 11/6 the skinbuttons are not right in reaction. If I leave the button with pressed left-mouse, the button is not released! So the button is fired also, when the mouse-arrow is outside the button.
|
Antonio: Buttons with skin
|
Antonio, please look also to this problem for 11/07!
|
Antonio: Buttons with skin
|
Antonio, in the 11/8 this problem is latent! For the moment the skinbuttons are not practicable.
|
Antonio: Buttons with skin
|
Antonio, please show to this problem! I use for the moment a old version.
|
Antonio: CHM Help
|
Antonio,I'm now trying to use .chm help files via FWH syntax.1. With .HLP files I just needed to do a SET HELPFILE TO myhlphelp.hlpand I could call up the help either by pressing F1 or by calling WINHELP(GetHelpFile()).2. With .CHM files it seems I need to do a SET HELPFILE TO mychmhelp.chmand I can call up the help either by pressing F1 or I must (?) call CHMHELPTOPIC().Note that calling WINHELP(GetHelpFile()) does nothing. Also, even with the F1 key, although it works fine with the FWH .chm files, for some reason or other my own .chm file (which incidentally has no index entries), supplied by my client, seem to requireHELPSETTOPIC('WINHELP')after theSET HELPFILE TO mychmhelp.chm,otherwise the 1st topic that pops up displays as a"This program cannot display the webpage" error (although any subsequent movement within the help file removes this message).-------------Temporarily, to save me making wholesale changes in my code to convert all references of WINHELP(GetHelpFile()) to CHMHELPTOPIC(),I've now simply created my own WINHELP() function which calls CHMHELPTOPIC().[b:3lgjj872]Is calling CHMHELPTOPIC() the recommended way to invoke .chm help from a button / menu etc?[/b:3lgjj872]Previously, I've been successfully using Winexec("HH.EXE " +"mychmhelp.chm")to invoke .chm help from a button / menu etc. That works fine but I'd rather eliminate having to call WINEXE.exe and go the recommended FWH way instead.TIAColin(P.S. I looked in TESTHLP2.prg but it didn't seem to clarify the matter for me).
|
Antonio: CHM Help
|
Colin,Yes, chmHelpTopic( nHelpID / cTopic[.htm] ) --> nil is the way to review a topic.FWH also provides (source\winapi\helpchm.prg):function chmHelpIndex( cSearch )function chmHelpSearch (cSearch )function chmHelpPopup( cnHelp, nRow, nCol, oWnd ) // nrow, ncol are optionalPlease review the documentation info provided inside helpchm.prg (at the end) for more details.
|
Antonio: CHM Help
|
Colin,>HELPSETTOPIC('WINHELP') after the SET HELPFILE TO mychmhelp.chm, >Yes, thats the way we do it in samples\TestHlp2.prg
|
Antonio: CHM Help
|
Thanks Antonio. Where I was confused was that SET HELPFILE TO mychmhelp.chmHELPSETTOPIC('WINHELP')allowed F1 to invoke help but, if I wanted to invoke help from a button or a menu, I had to callCHMHELPTOPIC()to get the same result.(Incidentally, the chm file in the app I am working on is created by the client so I never know beforehand what topic names are in it. This doesn't seem to matter. The app is not required to have context-sensitive help.)Anyway it seems to be working fine now.Colin---------------Colin, > HELPSETTOPIC('WINHELP') after the SET HELPFILE TO mychmhelp.chm, > Yes, thats the way we do it in samples\TestHlp2.prg_________________regards, saludos Antonio Linares ---------------
|
Antonio: CLASS TRBtn
|
Antonio, in this class the buttons are not declared with style WS_TABSTOP!?
I have changed the calls ::nStyle := ...... to
[code=fw:1bvpgoqx]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">nStyle</span> = nOR<span style="color: #000000;">(</span> WS_CHILD, WS_VISIBLE, <span style="color: #00C800;">if</span><span style="color: #000000;">(</span>oWnd:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"TDIALOG"</span> <span style="color: #000000;">)</span>, WS_TABSTOP, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:1bvpgoqx]
Is this right?
|
Antonio: CLASS TRBtn
|
Günther,
Yes, it is right and it makes pefect sense
Included for next FWH build, many thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Antonio: CLASS TRBtn
|
Günther,
I think a better implementation would be:
::nStyle = nOR( WS_CHILD, WS_VISIBLE, If( ! oWnd:IsKindOf( "TRBGROUP" ), WS_TABSTOP, 0 ) )
So the control may be placed any where and only on a RibbonBar would not need the focus.
|
Antonio: Defecto en Gradient en Windows 7
|
Hola Antonio:
He probado la funcion que publicastes aqui en el foro para generar un gradient en el xBrowse estilo Windows 7, el efecto es super bonito, pero tiene un fallo que no se solucionar. Cuando el campo a mostrar en el Browse no contiene informacion no generar el gradient en ese campo, y tambien tiene el mismo defecto cuando el ultimo campo declarado en el xBrowse no llega al final del tamaño del xBrowse, muestra la barra por defecto sin el gradient. Probado en una Windows MDI.
NOTA: No he subido una imagen porque todavia estoy actualizando los programas para Windows 7, ya que no funciona nada de lo que tenia, ahora necesito un FTP para Windows 7. Para la proxima duda/error intentare poner una imagen que vale mas que mil palabras.
Si algun prueba esto, que uno de los campos de la B.D que no tenga informacion para ver el efecto.
Espero que me haya explicado correctamente.
// Para Gradient estilo Windows 7
oGrid:nRowDividerStyle = LINESTYLE_NOLINES
oGrid:nColDividerStyle = LINESTYLE_NOLINES
oGrid:nMarqueeStyle = MARQSTYLE_HIGHLROW
oGrid:lTransparent = .T.
Despues de la declaracion del xBrowse:
* Metodo 1: Gradient para Windows 7
AEval( oGrid:aCols, { | oCol | oCol:bPaintText := { | oCol, hDC, cData, aRect | ;
PaintCol( oCol, hDC, cData, aRect ) } } )
Funcion:
static function PaintCol( oCol, hDC, cData, aRect )
if oCol:oBrw:VGetPos() == Especies->( OrdKeyNo() )
GradientFill( hDC, aRect[ 1 ] - 2, aRect[ 2 ] - 3, aRect[ 3 ] + 1, aRect[ 4 ] + 5,;
{ { 1, RGB( 220, 235, 252 ), RGB( 193, 219, 252 ) } }, .T. )
RoundBox( hDC, 2, aRect[ 1 ] - 1, WndWidth( oCol:oBrw:hWnd ) - 22, aRect[ 3 ] + 1, 2, 2,;
RGB( 235, 244, 253 ), 1 )
RoundBox( hDC, 1, aRect[ 1 ] - 2, WndWidth( oCol:oBrw:hWnd ) - 21, aRect[ 3 ] + 2, 2, 2,;
RGB( 125, 162, 206 ), 1 )
endif
SetTextColor( hDC, 0 )
DrawTextEx( hDC, cData, aRect, oCol:nDataStyle )
Return nil
Un saludo
JLL
|
Antonio: Defecto en Gradient en Windows 7
|
Aqui esta la Imagen:
[img:2oogmahl]http://www.proyectos-meliana.es/basura/1.jpg[/img:2oogmahl]
un saludo
JLL
|
Antonio: Defecto en Gradient en Windows 7
|
Hola,
Yo tengo el mismo problema y la verdad es que no se como resolverlo. Yo creo que el efecto de rejilla a la Windows 7 se obtiene más por los dos rebordes de la fila seleccionada, el interior blanco y el exterior azul que por el gradiente en sí. Y creo que nos estamos complicando la vida al intentar usar el método bPaintText. Estoy viendo la manera de pintar los rebordes en el método Paint() de la clase XBrowse, igual que se pinta el selector de fila cuando se ha terminado de pintar todas las columnas pintar los dos rebordes. Si lo consigo lo publicaré en el foro, y si alguien lo ha hecho así o tiene idea de cómo hacerlo agradecería que lo publicara.
Saludos,
José Luis
|
Antonio: Defecto en Gradient en Windows 7
|
jll-fwh, Jose Luis
jll-fwh
El punto ya los has tratado y te di la solucion para tu version, pero no se si la aplicaste correctamente, verifica nuevamente este hilo
[url:2n8plu72]http://forums.fivetechsupport.com/viewtopic.php?p=95369#p95369[/url:2n8plu72]
Ponle atencion al punto para tu version
[url:2n8plu72]http://forums.fivetechsupport.com/viewtopic.php?p=95709#p95709[/url:2n8plu72]
Jose luis verifica el primer link y sigue el hilo
el unico problema que no se ha solucionado y por la logica de pintado del xbrowse no tiene solucion por ahora, es el uso de bitmap junto con el gradient
|
Antonio: Defecto en Gradient en Windows 7
|
Hola,
Gracias de nuevo por la solución. He estado probando en un par de aplicaciones, y los bitmaps se ven bien con el gradiente. Uso bitmaps normales, no alphablended, porque mi versión de FWH es un tanto antigua.
Saludos,
José Luis
|
Antonio: Differences between BORLAND and VCC
|
1. If i use cGetDir(..) and choose a USB-drive for camera-cards BUT WITHOUT any inserted camera-card, the programm crashes in some times!
2. When using shadow() in MS-VC the shadow are bigger then in Borland and on some dialogs the wide (height?) of the dialog are cutting a little on right(bottom?) side.
|
Antonio: Differences between BORLAND and VCC
|
Günther,
1. Please check if a hb_out.log file is created
2. Check the manifest files embedded into the EXE
|
Antonio: Differences between BORLAND and VCC
|
Antonio, from the first point the hb_out.log:
[quote:2r6f5vli]Application Internal Error - C:\WGUN\GUN1\gun32.exe
Terminated at: 2018-04-23 14:22:53
Unrecoverable error 9015: Symbol item expected from hb_vmDo()
Called from ASCAN(0)
Called from OWNDFROMHWND(3695) in .\source\classes\WINDOW.PRG
Called from FWSKINBTNPAINT(72) in C:\prg_allgemein\skins.prg
Called from FWSKINBTNFOCUSED(363) in C:\prg_allgemein\skins.prg
Called from CGETDIR(0)[/quote:2r6f5vli]
On second point: Same manifest in MS-VC and Borland
|
Antonio: Differences between BORLAND and VCC
|
In the meantime i made some tests. No referring with ::shadow!
Please see the picture. On left side compiled with MS-VC, on right side compiled with Borland. It seems, only on dialogs from code!?
[img:1uqa9lmu]http://byte-one.com/dialogs.png[/img:1uqa9lmu]
[code=fw:1uqa9lmu]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> dlg_test<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oDlg, oFont, oMemo, oFile, oBtnok, oBtncancel, cFile := space<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span>, uTemp := <span style="color: #ff0000;">" "</span><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-10</span><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">450</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">FONT</span> oFont<br /> @ <span style="color: #000000;">4</span>, <span style="color: #000000;">3</span> <span style="color: #0000ff;">GET</span> oMemo <span style="color: #0000ff;">VAR</span> uTemp MULTILINE <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">FONT</span> oFont<br /> @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">GET</span> oFile <span style="color: #0000ff;">VAR</span> cFile <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">FONT</span> oFont<br /> @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">BUTTON</span> oBtnOk <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"OK"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">46</span>, <span style="color: #000000;">13</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">BUTTON</span> oBtnCancel <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Zurück"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">46</span>, <span style="color: #000000;">13</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> ;<br /> oMemo:<span style="color: #000000;">SetSize</span><span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">17</span>, oDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">77</span> <span style="color: #000000;">)</span>,;<br /> oMemo:<span style="color: #000000;">SetSel</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #000000;">)</span>, ;<br /> oFile:<span style="color: #000000;">nTop</span> := oDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">64</span>,;<br /> oFile:<span style="color: #000000;">nLeft</span> := <span style="color: #000000;">6</span>,;<br /> oBtnOk:<span style="color: #000000;">nTop</span> := oDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">64</span>,;<br /> oBtnOk:<span style="color: #000000;">nLeft</span> := oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">197</span>,;<br /> oBtnCancel:<span style="color: #000000;">nTop</span> := oDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">64</span>,;<br /> oBtnCancel:<span style="color: #000000;">nLeft</span> := oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">104</span>;<br /> <span style="color: #000000;">)</span><br /> oFont:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span></div>[/code:1uqa9lmu]
|
Antonio: Differences between BORLAND and VCC
|
Please inspect both EXEs using this tool:
[url:x0pmia2p]https://bitbucket.org/fivetech/fivewin-contributions/downloads/peinfo.exe[/url:x0pmia2p]
look for differences in the embedded manifest files and/or resources
|
Antonio: Differences between BORLAND and VCC
|
1. looks like memory corruption
|
Antonio: Differences between BORLAND and VCC
|
Thanks Antonio.
1. The error is present on all machines.
2. I inspect the files with PE but no differences. I compile with the exact same RC-File. Have you tested the code?
|
Antonio: Differences between BORLAND and VCC
|
Any news?
I found also that in dialogs from resource the height of the caption-area between MS-VC and Borland are different. Maybe different constants in the header-files from the compilers? For the moment i cannot use MS-VC.
|
Antonio: Differences between BORLAND and VCC
|
We are checking it but can't see where the difference comes from yet
|
Antonio: Differences between BORLAND and VCC
|
Hello to all. I not can found any reason for the differences on the both compilers. Can please several from us test the above code with VCC and report!?
|
Antonio: Differences between BORLAND and VCC
|
Gunther, I tested your sample also and I continue to investigate why
|
Antonio: Differences between BORLAND and VCC
|
To All
I have tried to create a script to compile MSVC 2017 using BuildxM ( xHarbour ) as my guide ( as you may remember ), unfortunately I gave up because I could not get any script or suggestions from the forum to cleanly compile tutor01.prg.
If anyone could post a working MSVC\xHarbour script .. I would be glad to help in comparing the difference between the two compilers.
Rick Lipkin
|
Antonio: Differences between BORLAND and VCC
|
Rick,
I do not use Borland, but I do create two builds of my primary application.
1). xHarbour ( .com / xBuilder with Pelles C ) using the version from 11/2015
2). Microsoft Visual Studio 2017 with Harbour libraries
Option 1 is only used by people who have ADS Version 7 or 8 and I have the proper libs for those in xHarbour.
Option 2 is for everyone else.
I have never tried Microsoft Visual C++ with xHarbour. I once was going to and was told there were no MSVC compatible libraries available for the commercial product.
I can assure you that Harbour and Microsoft Visual C++ work very well with FWH, and almost all of my clients use that version.
I should note: Visual Studio Community 2017 is FREE and quite capable of building any application. Antonio provides Harbour also for free. If you were to go that route, you would have no problem getting up and running. I actually do the builds in Visual Studio, and you can actually incorporate your editor of choice in the IDE ( I use UE Studio ).
Tim
|
Antonio: Differences between BORLAND and VCC
|
Tim or Anyone
I have downloaded the MSVC2017 32 bit Command line Compiler ( from Mel's site .. you do not need to install Visual Studio ) [img:1shnqzj5]http://i65.tinypic.com/2zxvzgm.jpg[/img:1shnqzj5]
[img:1shnqzj5]http://i67.tinypic.com/2rhqn2a.jpg[/img:1shnqzj5]
And the matching xHarbourM for MSVC2017
[img:1shnqzj5]http://i66.tinypic.com/9apog7.jpg[/img:1shnqzj5]
I would appreciate if anyone has a batch file ( like buildxm.bat ) to be able to compile tutor01.prg ... here are my file locations:
c:\MSVC2017
c:\Fwh1707
c:\XharbourM
Thanks
Rick Lipkin
|
Antonio: Differences between BORLAND and VCC
|
compiled with Harbour + Fivewin 18.03 and GCC 7.3 32 bit
[img:3lrdhf4n]http://www.veneziasoft.com/download/gcc_32.jpg[/img:3lrdhf4n]
compiled with Harbour + Fivewin 18.03 and GCC 7.3 64 bit
[img:3lrdhf4n]http://www.veneziasoft.com/download/gcc_64.jpg[/img:3lrdhf4n]
regards
|
Antonio: Differences between BORLAND and VCC
|
[quote="Rick Lipkin":3e0mt2xa]I would appreciate if anyone has a batch file ( like buildxm.bat ) to be able to compile tutor01.prg[/quote:3e0mt2xa]
What problem did you get using buildxm.bat?
EMG
|
Antonio: Differences between BORLAND and VCC
|
Enrico
I gave up on MSVC .... here was the last test before I gave up ... this how I modified my batch file:
[code=fw:1hru0lij]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ECHO OFF<br />CLS<br />ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿<br />ECHO ³ FiveWin <span style="color: #00C800;">for</span> Harbour <span style="color: #000000;">14.09</span> <span style="color: #000000;">(</span>MSVC++<span style="color: #000000;">)</span> Sep. <span style="color: #000000;">2014</span> Harbour development <span style="color: #0000ff;">power</span> ³Ü<br />ECHO ³ <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span> FiveTech, <span style="color: #000000;">1993</span><span style="color: #000000;">-2014</span> <span style="color: #00C800;">for</span> Microsoft Windows 9X/NT/200X/ME/XP/Vista/<span style="color: #000000;">7</span>/<span style="color: #000000;">8</span> ³Û<br />ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ<br />ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /><br /><span style="color: #00C800;">if</span> A%<span style="color: #000000;">1</span> == A GOTO :<span style="color: #000000;">SINTAX</span><br /><span style="color: #00C800;">if</span> NOT EXIST %<span style="color: #000000;">1</span>.prg GOTO :<span style="color: #000000;">NOEXIST</span><br /><br />ECHO Compiling...<br /><br />set hdir=c:\xharbourM<br />set vcdir=c:\msvc2017<br />set include=%vcdir%\include;%hdir%\include;%include%<br />set lib=%vcdir%\lib;%hdir%\lib;%lib%<br /><br /><br />rem @set fwh=%FWDIR%<br />rem @set hdir=%HBDIR%<br />rem @set hdirl=%hdir%\lib<br /><br />rem set vcdir= c:\vc<br />rem set vclib=%vcdir%\lib<br /><br /><br />%hdir%\bin\harbour %<span style="color: #000000;">1</span> /n /ic:\Fwh1707\include;%hdir%\include /w /p %<span style="color: #000000;">2</span> %<span style="color: #000000;">3</span> > comp.log <span style="color: #000000;">2</span>> warnings.log<br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO COMPILEERROR<br />@type comp.log<br />@type warnings.log<br /><br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> <span style="color: #00C800;">PAUSE</span><br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO EXIT<br /><br />: <span style="color: #000000;">mvsc</span> compiler line<br /><br />%vcdir%\bin\cl.Exe -TP -W3 -O2 -nologo -c -GA -GS -EHsc /I%hdir%\include /I%vcdir%\include %<span style="color: #000000;">1</span>.c<br /><br />:<span style="color: #000000;">ENDCOMPILE</span><br /><br /><span style="color: #00C800;">IF</span> EXIST %<span style="color: #000000;">1</span>.rc <span style="color: #00C800;">IF</span> EXIST %vcdir%\bin\rc %vcdir%\bin\rc -r -d__FLAT__ %<span style="color: #000000;">1</span><br /><span style="color: #00C800;">IF</span> EXIST %<span style="color: #000000;">1</span>.rc <span style="color: #00C800;">IF</span> NOT EXIST %<span style="color: #000000;">1</span>.res rc -r -d__FLAT__ %<span style="color: #000000;">1</span><br /><br />echo %<span style="color: #000000;">1</span>.obj > msvc.tmp<br /><br />: <span style="color: #000000;">fivewin</span> libs<br />echo c:\Fwh1707\lib\FivehMX.lib c:\fwh1707\lib\FiveHc32.lib >> msvc.tmp<br /><br />: <span style="color: #000000;">xHarbourM</span> libs<br /><br />echo %hdir%\lib\rtl.lib >> msvc.tmp<br />echo %hdir%\lib\vm.lib >> msvc.tmp<br />echo %hdir%\lib\gtgui.lib >> msvc.tmp<br />echo %hdir%\lib\lang.lib >> msvc.tmp<br />echo %hdir%\lib\macro.lib >> msvc.tmp<br />echo %hdir%\lib\rdd.lib >> msvc.tmp<br />echo %hdir%\lib\dbfntx.lib >> msvc.tmp<br />echo %hdir%\lib\dbfcdx.lib >> msvc.tmp<br />echo %hdir%\lib\dbffpt.lib >> msvc.tmp<br />echo %hdir%\lib\hbsix.lib >> msvc.tmp<br />echo %hdir%\lib\debug.lib >> msvc.tmp<br />echo %hdir%\lib\common.lib >> msvc.tmp<br />echo %hdir%\lib\pp.lib >> msvc.tmp<br />echo %hdir%\lib\pcrepos.lib >> msvc.tmp<br />echo %hdir%\lib\png.lib >> msvc.tmp<br /><br />echo %hdir%\lib\ct.lib >> msvc.tmp<br /><br />rem ... can not find this in xHarbourM<br />rem echo %hdir%\lib\hbzlib.lib >> msvc.tmp<br /><br />echo %hdir%\lib\zlib.lib >> msvc.tmp<br />echo %hdir%\lib\HBMzip.lib >> msvc.tmp<br />echo %hdir%\lib\HBzip.lib >> msvc.tmp<br /><br />: <span style="color: #000000;">msvc</span> libs<br /><br />echo %vcdir%\lib\kernel32.lib >> msvc.tmp<br />echo %vcdir%\lib\user32.lib >> msvc.tmp<br />echo %vcdir%\lib\gdi32.lib >> msvc.tmp<br />echo %vcdir%\lib\winspool.lib >> msvc.tmp<br />echo %vcdir%\lib\comctl32.lib >> msvc.tmp<br />echo %vcdir%\lib\comdlg32.lib >> msvc.tmp<br />echo %vcdir%\lib\advapi32.lib >> msvc.tmp<br />echo %vcdir%\lib\shell32.lib >> msvc.tmp<br />echo %vcdir%\lib\ole32.lib >> msvc.tmp<br />echo %vcdir%\lib\oleaut32.lib >> msvc.tmp<br />echo %vcdir%\lib\uuid.lib >> msvc.tmp<br />echo %vcdir%\lib\odbc32.lib >> msvc.tmp<br />echo %vcdir%\lib\odbccp32.lib >> msvc.tmp<br />echo %vcdir%\lib\iphlpapi.lib >> msvc.tmp<br />echo %vcdir%\lib\mpr.lib >> msvc.tmp<br />echo %vcdir%\lib\version.lib >> msvc.tmp<br />echo %vcdir%\lib\wsock32.lib >> msvc.tmp<br />echo %vcdir%\lib\msimg32.lib >> msvc.tmp<br />echo %vcdir%\lib\oledlg.lib >> msvc.tmp<br />echo %vcdir%\lib\psapi.lib >> msvc.tmp<br />echo %vcdir%\lib\gdiplus.lib >> msvc.tmp<br />echo %vcdir%\lib\winmm.lib >> msvc.tmp<br />echo %vcdir%\lib\libcmt.lib >> msvc.tmp<br />echo %vcdir%\lib\oldnames.lib >> msvc.tmp<br />echo %vcdir%\lib\libcpmt.lib >> msvc.tmp<br />echo %vcdir%\lib\ws2_32.lib >> msvc.tmp<br /><br /><span style="color: #00C800;">IF</span> EXIST %<span style="color: #000000;">1</span>.res echo %<span style="color: #000000;">1</span>.res >> msvc.tmp<br /><br />%vcdir%\bin\link @msvc.tmp /nologo /NODEFAULTLIB:<span style="color: #000000;">LIBC</span> /NODEFAULTLIB:<span style="color: #000000;">msvcrt</span> /force:<span style="color: #000000;">multiple</span> /nxcompat:<span style="color: #000000;">NO</span> /subsystem:<span style="color: #000000;">windows</span>,<span style="color: #000000;">5.01</span> /machine:<span style="color: #000000;">X86</span> /Ignore:<span style="color: #000000;">4006</span> /LIBPATH:<span style="color: #000000;">c</span>:\Msvc17\lib<br />rem %vcdir%\bin\link @msvc.tmp /nologo /NODEFAULTLIB:<span style="color: #000000;">msvcrt</span> /force:<span style="color: #000000;">multiple</span> /nxcompat:<span style="color: #000000;">NO</span> /subsystem:<span style="color: #000000;">windows</span>,<span style="color: #000000;">5.01</span> /machine:<span style="color: #000000;">X86</span> /Ignore:<span style="color: #000000;">4006</span> /LIBPATH:<span style="color: #000000;">c</span>:\Msvc17\lib<br /><br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO LINKERROR<br />ECHO * Application successfully built *<br />@set path=%oldpath%<br />@set include=%oldinclude%<br />@set lib=%oldlib%<br />@set libpath=%oldlibpath%<br />@set oldpath=<span style="color: #ff0000;">""</span><br />@set oldinclude=<span style="color: #ff0000;">""</span><br />@set oldlib=<span style="color: #ff0000;">""</span><br />@set oldlibpath=<span style="color: #ff0000;">""</span><br />%<span style="color: #000000;">1</span><br />GOTO EXIT<br />ECHO<br /><br />: <span style="color: #000000;">delete</span> temporary files<br /><br />@del %<span style="color: #000000;">1</span>.c<br />@del msvc.tmp<br /><br />:<span style="color: #000000;">COMPILEERROR</span><br />@type comp.log<br />@type warnings.log<br />ECHO * Compiling errors *<br />GOTO EXIT<br /><br />:<span style="color: #000000;">LINKERROR</span><br />ECHO * Linking errors *<br />GOTO EXIT<br /><br />:<span style="color: #000000;">SINTAX</span><br />ECHO SYNTAX: <span style="color: #000000;">Build</span> <span style="color: #000000;">[</span>Program<span style="color: #000000;">]</span> <span style="color: #000000;">{</span>-- No especifiques la extensi¢n PRG<br />ECHO <span style="color: #000000;">{</span>-- Don<span style="color: #ff0000;">'t specify .PRG extension<br />GOTO EXIT<br /><br />:NOEXIST<br />ECHO The specified PRG %1 does not exist<br /><br />:EXIT<br /></span></div>[/code:1hru0lij]
Here was the result:
[code=fw:1hru0lij]<div class="fw" id="{CB}" style="font-family: monospace;"><br />ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿<br />³ FiveWin <span style="color: #00C800;">for</span> Harbour <span style="color: #000000;">14.09</span> <span style="color: #000000;">(</span>MSVC++<span style="color: #000000;">)</span> Sep. <span style="color: #000000;">2014</span> Harbour development <span style="color: #0000ff;">power</span> ³Ü<br />³ <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span> FiveTech, <span style="color: #000000;">1993</span><span style="color: #000000;">-2014</span> <span style="color: #00C800;">for</span> Microsoft Windows 9X/NT/200X/ME/XP/Vista/<span style="color: #000000;">7</span>/<span style="color: #000000;">8</span> ³Û<br />ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ<br />ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br />Compiling...<br />xHarbour <span style="color: #000000;">1.2</span><span style="color: #000000;">.3</span> Intl. <span style="color: #000000;">(</span>SimpLex<span style="color: #000000;">)</span> <span style="color: #000000;">(</span>Build <span style="color: #000000;">20180420</span><span style="color: #000000;">)</span><br />Copyright <span style="color: #000000;">1999</span><span style="color: #000000;">-2018</span>, http:<span style="color: #B900B9;">//www.xharbour.org <!-- m --><a class="postlink" href="http://www.harbour-project.org/">http://www.harbour-project.org/</a><!-- m --></span><br />Compiling <span style="color: #ff0000;">'Tutor01.prg'</span> and generating preprocessed output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'Tutor01.ppo'</span>...<br /><br />Generating C source output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'Tutor01.c'</span>...<br />Done.<br /><br />Lines <span style="color: #000000;">13</span>, Functions/Procedures <span style="color: #000000;">1</span>, pCodes <span style="color: #000000;">14</span><br />Tutor01.c<br /> Creating <span style="color: #0000ff;">library</span> Tutor01.lib and object Tutor01.<span style="color: #0000ff;">exp</span><br />Tutor01.exe : <span style="color: #000000;">warning</span> LNK4088: <span style="color: #0000ff;">image</span> being generated due <span style="color: #0000ff;">to</span> /FORCE option; <span style="color: #0000ff;">image</span> may not run<br />* Application successfully built *<br /> </div>[/code:1hru0lij]
Msvc.Tmp
[code=fw:1hru0lij]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Tutor01.obj <br />c:\Fwh1707\lib\FivehMX.lib c:\fwh1707\lib\FiveHc32.lib <br />c:\xharbourM\lib\rtl.lib <br />c:\xharbourM\lib\vm.lib <br />c:\xharbourM\lib\gtgui.lib <br />c:\xharbourM\lib\lang.lib <br />c:\xharbourM\lib\macro.lib <br />c:\xharbourM\lib\rdd.lib <br />c:\xharbourM\lib\dbfntx.lib <br />c:\xharbourM\lib\dbfcdx.lib <br />c:\xharbourM\lib\dbffpt.lib <br />c:\xharbourM\lib\hbsix.lib <br />c:\xharbourM\lib\debug.lib <br />c:\xharbourM\lib\common.lib <br />c:\xharbourM\lib\pp.lib <br />c:\xharbourM\lib\pcrepos.lib <br />c:\xharbourM\lib\png.lib <br />c:\xharbourM\lib\ct.lib <br />c:\xharbourM\lib\zlib.lib <br />c:\xharbourM\lib\HBMzip.lib <br />c:\xharbourM\lib\HBzip.lib <br />c:\msvc2017\lib\kernel32.lib <br />c:\msvc2017\lib\user32.lib <br />c:\msvc2017\lib\gdi32.lib <br />c:\msvc2017\lib\winspool.lib <br />c:\msvc2017\lib\comctl32.lib <br />c:\msvc2017\lib\comdlg32.lib <br />c:\msvc2017\lib\advapi32.lib <br />c:\msvc2017\lib\shell32.lib <br />c:\msvc2017\lib\ole32.lib <br />c:\msvc2017\lib\oleaut32.lib <br />c:\msvc2017\lib\uuid.lib <br />c:\msvc2017\lib\odbc32.lib <br />c:\msvc2017\lib\odbccp32.lib <br />c:\msvc2017\lib\iphlpapi.lib <br />c:\msvc2017\lib\mpr.lib <br />c:\msvc2017\lib\version.lib <br />c:\msvc2017\lib\wsock32.lib <br />c:\msvc2017\lib\msimg32.lib <br />c:\msvc2017\lib\oledlg.lib <br />c:\msvc2017\lib\psapi.lib <br />c:\msvc2017\lib\gdiplus.lib <br />c:\msvc2017\lib\winmm.lib <br />c:\msvc2017\lib\libcmt.lib <br />c:\msvc2017\lib\oldnames.lib <br />c:\msvc2017\lib\libcpmt.lib <br />c:\msvc2017\lib\ws2_32.lib <br />Tutor01.res <br /> </div>[/code:1hru0lij]
The resulting Tutor01.exe will not run
Rick Lipkin
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.