topic
stringlengths
1
63
text
stringlengths
1
577k
Bug in Harbour version of toolbar
[quote="Antonio Linares":36nnfhtq]Enrico, We have tested FWH 7.11 with Harbour svn 05 Nov, and it works fine. Its the one distributed with FWH 7.11. So it has to be a change in Harbour since 05 Nov.[/quote:36nnfhtq] It maybe. Or I'm doing something wrong. [quote="Antonio Linares":36nnfhtq]Do you get an error.log file ?[/quote:36nnfhtq] Unfortunately not. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> EMG
Bug in Harbour version of toolbar
Enrico, We have just done a fresh checkout from the Harbour svn, and your test code works fine here
Bug in Harbour version of toolbar
Can I see the batch you are using to build Harbour? EMG
Bug in Harbour version of toolbar
Is this the latest changelog you see in your changelog file? 2007-11-07 01:47 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/filesys.c * updated hb_fsTell() and hb_fsEof() to respect platform dependent API calls used in hb_fsSeek[Large]() EMG
Bug in Harbour version of toolbar
This is the batch I'm using to build Harbour: @ ECHO OFF SET PATH=e:\bcc55\bin;e:\harbour cvs\harbour\bin\b32 SET C_USR=-DHB_FM_STATISTICS_OFF SET PRG_USR=-l CALL make_b32 clean CALL make_b32 CD contrib\hbzlib CALL make_b32 clean CALL make_b32 CD ..\win32 CALL make_b32 clean CALL make_b32 CD ..\adordd CALL make_b32 clean CALL make_b32 EMG
Bug in Harbour version of toolbar
Enrico, We name this makeb32.bat: SET PATH=%PATH%;%DEVDRIVE%\bcc55\bin;%DEVDRIVE%\util SET BISON_SIMPLE=%DEVDRIVE%\util\bison.simple SET CFLAGS=-D__EXPORT__ -DHB_GUI -tWM -DHB_COMPAT_XHB -DHB_FM_STATISTICS_OFF -DHB_INCLUDE_WINEXCHANDLER -DHARBOUR_MAIN_WIN -d -a8 -OS -O2 -5 -6 make_b32.bat %1 2007-11-07 01:47 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/filesys.c * updated hb_fsTell() and hb_fsEof() to respect platform dependent API calls used in hb_fsSeek[Large]()
Bug in Harbour version of toolbar
Enrico, I email you the most recent FWH Harbour libs, just to be sure we use the same files
Bug in Harbour version of toolbar
[quote="Antonio Linares":2w9vtltc]Enrico, We have just done a fresh checkout from the Harbour svn, and your test code works fine here[/quote:2w9vtltc] I just done a fresh checkout too: no changes. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> EMG
Bug in Harbour version of toolbar
Enrico, Are you using the most recent FWH Harbour libs that I have emailed you ?
Bug in Harbour version of toolbar
[quote="Antonio Linares":fkfsuhwc]Enrico, We name this makeb32.bat: SET PATH=%PATH%;%DEVDRIVE%\bcc55\bin;%DEVDRIVE%\util SET BISON_SIMPLE=%DEVDRIVE%\util\bison.simple SET CFLAGS=-D__EXPORT__ -DHB_GUI -tWM -DHB_COMPAT_XHB -DHB_FM_STATISTICS_OFF -DHB_INCLUDE_WINEXCHANDLER -DHARBOUR_MAIN_WIN -d -a8 -OS -O2 -5 -6 make_b32.bat %1[/quote:fkfsuhwc] As far as I know, Bison is no longer required. Anyway, all I get running your batch is a make_b32.log containing [quote:fkfsuhwc]MAKE Version 5.2 Copyright (c) 1987, 2000 Borland[/quote:fkfsuhwc] What am I doing wrong? EMG
Bug in Harbour version of toolbar
[quote="Antonio Linares":10z5egu3]Enrico, I email you the most recent FWH Harbour libs, just to be sure we use the same files[/quote:10z5egu3] Tried. No changes. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> EMG
Bug in Harbour version of toolbar
I tracked down the error. It seems that is the call [code:26km7cep]TrackMouseEvent&#40; &#58;&#58;hWnd, TME_LEAVE &#41;[/code:26km7cep] in MouseMove() method of TBtnBmp class that recursively calls MouseMove() again and again. Any thought? EMG
Bug in Harbour version of toolbar
Enrico, But TrackMouseEvent( ::hWnd, TME_LEAVE ) is called with TME_LEAVE parameter, so it just notifies when the mouse leaves the control, not when the mouse is moved. Anyhow, an error like the one that you describe looks as a recursive call that forces the operating system to quit the task
Bug in Harbour version of toolbar
Can you compile my sample and send me the resulting EXE? EMG
Bug in Harbour version of toolbar
Enrico, Already sent
Bug in Harbour version of toolbar
Your EXE works fine here too. EMG
Bug in Harbour version of toolbar
[quote="Antonio Linares":1ttfhsdi]Enrico, But TrackMouseEvent( ::hWnd, TME_LEAVE ) is called with TME_LEAVE parameter, so it just notifies when the mouse leaves the control, not when the mouse is moved. Anyhow, an error like the one that you describe looks as a recursive call that forces the operating system to quit the task[/quote:1ttfhsdi] It seems that TrackMouseEvent( ::hWnd, TME_LEAVE ) calls HandleEvent() that, in turn, calls MouseMove() again but I can't understand how... EMG
Bug in Harbour version of toolbar
Can you send me a ZIP file containing: - HARBOUR.EXE - inlcude folder - lib folder from your Harbour installation? EMG
Bug in Harbour version of toolbar
Enrico, Have you used the libraries that I just sent you ? If we use the same libraries and the same Harbour, then we should get the same EXE
Bug in Harbour version of toolbar
[quote="Antonio Linares":3fcqhuhz]Enrico, Have you used the libraries that I just sent you ? If we use the same libraries and the same Harbour, then we should get the same EXE[/quote:3fcqhuhz] Yes, as I wrote some messages ago, I tried with your libraries and found no differences. EMG
Bug in Harbour version of toolbar
Using your Harbour libraries the problem goes away. The size of your libraries are different from those I have. I'm going to investigate why... EMG
Bug in Harbour version of toolbar
It is vm.lib. I have to find what I'm doing wrong building Harbour... EMG
Bug in Harbour version of toolbar
I tried all the differences from your compile batch and mine. The only one that I've not tried yet is Bison. I don't have bison.simple here. Can you send it to me? Are you sure it is required? EMG
Bug in Harbour version of toolbar
Enrico, Already sent I don't know if it is still required, but I use it
Bug in Harbour version of toolbar
Tried with Bison. No differences. I'm running out of ideas... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> EMG
Bug in Harbour version of toolbar
Enrico, If you comment TrackMouseEvent() call then it gets fixed ?
Bug in Harbour version of toolbar
Yes. EMG
Bug in Harbour version of toolbar
Enrico, Do you use any library or OBJ of your own ?
Bug in Harbour version of toolbar
No, I made the test with pure xHarbour/FWH. EMG
Bug in Harbour version of toolbar
Another sample that bombs out as soon as I move the mouse over the link (please note that also TUrlLink uses TrackMouseEvent()): [code:1rh0ufa9]#include "Fivewin&#46;ch" #include "Urllink&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oWnd, oUrl DEFINE WINDOW oWnd @ 1, 1 URLLINK oUrl URL "This is a test" ACTIVATE WINDOW oWnd RETURN NIL[/code:1rh0ufa9] I don't understand... <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> EMG
Bug in Harbour version of toolbar
Enrico, Here it is working fine too <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> Are you testing on XP ? I am testing on Vista 32
Bug in Harbour version of toolbar
Yes, XP. Do you still have an XP to try my samples on it? EMG
Bug in Harbour version of toolbar
Enrico, Yes, I have XP and Vista here on the same computer <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> We are going to try it. Well, in fact, I use five different operating systems on my computer <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> XP/Vista, Ubuntu and OSX Tiger/Leopard
Bug in Harbour version of toolbar
Enrico, Both examples work fine on XP Do you have your XP upgraded with all automatic updates ?
Bug in Harbour version of toolbar
[quote="Antonio Linares":2tbt4evz]Enrico, Both examples work fine on XP Do you have your XP upgraded with all automatic updates ?[/quote:2tbt4evz] Of course. But sorry, these tests are a waste of time. The facts are that if I replace my vm.lib with the one you sent me yesterday then the problem vanishes. Keep in mind that I'm building Harbour for myself since years. I really can't imagine what the difference is... EMG
Bug in Harbour version of toolbar
> I really can't imagine what the difference is... Same here <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
Bug in Harbour version of toolbar
Don't worry: sooner or later we will find the reason. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
Bug in Harbour version of toolbar
Enrico, Your example is even running on new OSX Leopard <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [url=http&#58;//imageshack&#46;us:3rdjp4lx][img:3rdjp4lx]http&#58;//img228&#46;imageshack&#46;us/img228/6734/picture1lg8&#46;png[/img:3rdjp4lx][/url:3rdjp4lx] CrossOver is a "Wine" alike Windows emulator for OSX, so you can directly run Windows EXEs on Mac OSX
Bug in Harbour version of toolbar
Wonderful! EMG
Bug in Harbour version of toolbar
Another question: are you using BCC 5.5.1 or a newer version? EMG
Bug in Harbour version of toolbar
Enrico, Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Bug in Harbour version of toolbar
Ok. I still trying to find the difference. Even your HARBOUR.EXE is different from mine and I don't know why. C compiler is the same. Harbour sources are the same. I tried all the switches you use in your batch. What am I missing? EMG
Bug in Harbour version of toolbar
Can I see your BCC32.CFG and ILINK32.CFG? EMG
Bug in Harbour version of toolbar
bcc32.cfg -I"c:\Bcc55\include" -L"c:\Bcc55\lib" ilink32.cfg -L"c:\Bcc55\lib"
Bug in Harbour version of toolbar
Found! It was -DHB_NO_TRACE Can you test with it? EMG
Bug in Harbour version of toolbar
Enrico, Were you using -DHB_NO_TRACE ? Is it fine now, without it ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in Harbour version of toolbar
[quote="Antonio Linares":34lobkm0]Enrico, Were you using -DHB_NO_TRACE ?[/quote:34lobkm0] Yes. [quote="Antonio Linares":34lobkm0]Is it fine now, without it ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:34lobkm0] Yes. Anyway, I would want to report it to the Harbour developers list, if you confirm the problem. EMG
Bug in Harbour version of toolbar
Enrico, I am currently reinstalling an operating system on the computer As soon as I finish I will check it, thanks
Bug in Harbour version of toolbar
Ok, thank you. EMG
Bug in Harbour version of toolbar
Enrico, Problem confirmed: -DHB_NO_TRACE can't be used. It also GPFs here. I appreciate if you report it on the list, thanks
Bug in Harbour version of toolbar
Great! Thank you. EMG
Bug in HasAlpha()
The function HasAlpha doesn't work anymore. It returns .T. even if the image doesn't have an alpha channel. I noticed that the function has been changed in dibbmp.c, don't know exactly when. EMG
Bug in HasAlpha()
This is a sample: [code=fw:2uqi14sy]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> hBmp := LOADIMG<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\o</span>lga1.jpg"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; ? hBmp<br />&nbsp; &nbsp; ? HASALPHA<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> LOADIMG<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> !FILE<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> UPPER<span style="color: #000000;">&#40;</span> CFILEEXT<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"BMP"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> READBITMAP<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, cFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> GDIP_IMAGEFROMFILE<span style="color: #000000;">&#40;</span> cFile, .T., UPPER<span style="color: #000000;">&#40;</span> CFILEEXT<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"GIF"</span> <span style="color: #000000;">&#41;</span></div>[/code:2uqi14sy] Any ideas? EMG
Bug in HasAlpha()
Up! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
Bug in HasAlpha()
Try with [code=fw:30m63ca6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cFile := <span style="color: #ff0000;">"d:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\f</span>whteam<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\o</span>lga1.jpg"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> hBmp := LoadImg<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; ? hBmp, HASALPHA<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ? GdiplusImagePixGetAlpha<span style="color: #000000;">&#40;</span> GdiPlusImageLoadCachedFile<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> GdiplusImagePixGetAlpha<span style="color: #000000;">&#40;</span> GdiPlusImageLoadCachedFile<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> = <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; cFile &nbsp;:= <span style="color: #ff0000;">"D:<span style="color: #000000;">\F</span>wh<span style="color: #000000;">\F</span>whTeam<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\A</span>lphaBmp<span style="color: #000000;">\a</span>ndroid.bmp"</span><br />&nbsp; &nbsp; hBmp := LoadImg<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; ? hBmp, HASALPHA<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ? GdiplusImagePixGetAlpha<span style="color: #000000;">&#40;</span> GdiPlusImageLoadCachedFile<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> GdiplusImagePixGetAlpha<span style="color: #000000;">&#40;</span> GdiPlusImageLoadCachedFile<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> = <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">FUNCTION</span> LoadImg<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> !FILE<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> UPPER<span style="color: #000000;">&#40;</span> CFILEEXT<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"BMP"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> READBITMAP<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, cFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">Return</span> GDIP_IMAGEFROMFILE<span style="color: #000000;">&#40;</span> cFile, .T., UPPER<span style="color: #000000;">&#40;</span> CFILEEXT<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"GIF"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:30m63ca6]
Bug in HasAlpha()
Another possibility [code=fw:1tdcmeip]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBmp<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cFile := <span style="color: #ff0000;">"d:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\f</span>whteam<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\o</span>lga1.jpg"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hBmp := LoadImg<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;? hBmp, HASALPHA<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? GdiplusImagePixGetAlpha<span style="color: #000000;">&#40;</span> GdiPlusImageLoadCachedFile<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> GdiplusImagePixGetAlpha<span style="color: #000000;">&#40;</span> GdiPlusImageLoadCachedFile<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> = <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;cFile &nbsp;:= <span style="color: #ff0000;">"D:<span style="color: #000000;">\F</span>wh<span style="color: #000000;">\F</span>whTeam<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\A</span>lphaBmp<span style="color: #000000;">\a</span>ndroid.bmp"</span><br />&nbsp; &nbsp;hBmp := LoadImg<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;? hBmp, HASALPHA<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? GdiplusImagePixGetAlpha<span style="color: #000000;">&#40;</span> GdiPlusImageLoadCachedFile<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> GdiplusImagePixGetAlpha<span style="color: #000000;">&#40;</span> GdiPlusImageLoadCachedFile<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> = <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;cFile := <span style="color: #ff0000;">"d:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\f</span>whteam<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\o</span>lga1.jpg"</span><br />&nbsp; &nbsp;oBmp := GdiBmp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? oBmp:<span style="color: #000000;">IsAlphaChannel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBmp:<span style="color: #000000;">Is32Bits</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBmp:<span style="color: #000000;">Destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;cFile &nbsp;:= <span style="color: #ff0000;">"D:<span style="color: #000000;">\F</span>wh<span style="color: #000000;">\F</span>whTeam<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\A</span>lphaBmp<span style="color: #000000;">\a</span>ndroid.bmp"</span><br />&nbsp; &nbsp;oBmp := GdiBmp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? oBmp:<span style="color: #000000;">IsAlphaChannel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBmp:<span style="color: #000000;">Is32Bits</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBmp:<span style="color: #000000;">Destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">FUNCTION</span> LoadImg<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> !FILE<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> UPPER<span style="color: #000000;">&#40;</span> CFILEEXT<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"BMP"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> READBITMAP<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, cFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">Return</span> GDIP_IMAGEFROMFILE<span style="color: #000000;">&#40;</span> cFile, .T., UPPER<span style="color: #000000;">&#40;</span> CFILEEXT<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"GIF"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:1tdcmeip]
Bug in HasAlpha()
What is the official way to load an image and to check for alpha channel without using classes? EMG
Bug in HasAlpha()
This is an interesting reading and this code may be the simplest way to do it: [url:11aviyjd]https&#58;//www&#46;gamedev&#46;net/topic/607214-get-alpha-channel-from-32bit-bmp/[/url:11aviyjd] [code=fw:11aviyjd]<div class="fw" id="{CB}" style="font-family: monospace;">struct ABGRStruct <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; BYTE a,b,g,r;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span>;<br /><br />&nbsp; &nbsp; FILE *f = fopen<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"the_file_name.bmp"</span>, <span style="color: #ff0000;">"rb"</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>f<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; int w, h;<br />&nbsp; &nbsp; &nbsp; &nbsp; fseek<span style="color: #000000;">&#40;</span>f, 0x12, SEEK_SET<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; fread<span style="color: #000000;">&#40;</span>&w, <span style="color: #000000;">1</span>, sizeof<span style="color: #000000;">&#40;</span>int<span style="color: #000000;">&#41;</span>, f<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; fread<span style="color: #000000;">&#40;</span>&h, <span style="color: #000000;">1</span>, sizeof<span style="color: #000000;">&#40;</span>int<span style="color: #000000;">&#41;</span>, f<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; fseek<span style="color: #000000;">&#40;</span>f, <span style="color: #000000;">54</span>, SEEK_SET<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; int NumPixels = w * h;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span><span style="color: #000000;">&#40;</span>int i = <span style="color: #000000;">0</span>; i < NumPixels; i++<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ABGRStruct <span style="color: #0000ff;">Pixel</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fread<span style="color: #000000;">&#40;</span>&Pixel, <span style="color: #000000;">1</span>, <span style="color: #000000;">4</span>, f<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// do something with alpha</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; fclose<span style="color: #000000;">&#40;</span>f<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>[/code:11aviyjd]
Bug in HasAlpha()
Thank you. I will wait for something faster. I'm going to drop alpha channel support in my application, for the moment. EMG
Bug in HasAlpha()
BitBlt() is the fastest way to manage bitmaps Not sure if there is a flag we could used for Alpha channel detection
Bug in HasAlpha()
Enrico, Windows function AlphaBlend() returns a logical value once it tries to paint a bitmap that have transparent or semitransparent pixels: [url:37745f30]https&#58;//msdn&#46;microsoft&#46;com/en-us/library/windows/desktop/dd183351(v=vs&#46;85)&#46;aspx[/url:37745f30] Thus, we could modify FWH function ABPaint() to return the return value of the AlphaBlend() call there
Bug in HasAlpha()
Ok, let's try it. EMG
Bug in HasAlpha()
Please try it using this function: You have to provide it a hDC and later on call DeleteDC() [code=fw:17ako2qs]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> ABPAINT <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;#ifdef _WIN64<br />&nbsp; &nbsp; &nbsp;HDC hDC = <span style="color: #000000;">&#40;</span> HDC <span style="color: #000000;">&#41;</span> hb_parnll<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;#else<br />&nbsp; &nbsp; &nbsp;HDC hDC = <span style="color: #000000;">&#40;</span> HDC <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;#endif<br /><br />&nbsp; &nbsp;HDC hDCComp = CreateCompatibleDC<span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;BITMAP bm;<br />&nbsp; &nbsp;HGDIOBJ hOldBmp = SelectObject<span style="color: #000000;">&#40;</span> hDCComp, <span style="color: #000000;">&#40;</span> HBITMAP <span style="color: #000000;">&#41;</span> fw_parH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;BLENDFUNCTION blend;<br />&nbsp; &nbsp;int wDest, hDest;<br /><br />&nbsp; &nbsp;blend.BlendOp = AC_SRC_OVER;<br />&nbsp; &nbsp;blend.BlendFlags = <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp;blend.SourceConstantAlpha = <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">220</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;blend.AlphaFormat = AC_SRC_ALPHA;<br /><br />&nbsp; &nbsp;#ifdef _WIN64<br />&nbsp; &nbsp; &nbsp; GetObject<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HBITMAP <span style="color: #000000;">&#41;</span> hb_parnll<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>, sizeof<span style="color: #000000;">&#40;</span> BITMAP <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> LPSTR <span style="color: #000000;">&#41;</span> &bm <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;#else<br />&nbsp; &nbsp; &nbsp; GetObject<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HBITMAP <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>, sizeof<span style="color: #000000;">&#40;</span> BITMAP <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> LPSTR <span style="color: #000000;">&#41;</span> &bm <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;#endif<br /><br />&nbsp; &nbsp;wDest = bm.bmWidth;<br />&nbsp; &nbsp;hDest = bm.bmHeight;<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hb_pcount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; wDest = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; hDest = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;hb_retl<span style="color: #000000;">&#40;</span> AlphaBlend<span style="color: #000000;">&#40;</span> hDC, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, wDest, hDest, hDCComp,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, bm.bmWidth, bm.bmHeight, blend <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;SelectObject<span style="color: #000000;">&#40;</span> hDCComp, hOldBmp <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;DeleteDC<span style="color: #000000;">&#40;</span> hDCComp <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:17ako2qs]
Bug in HasAlpha()
I don't understand. I have to select the correct painting function to use after checking for alpha channel. Ie: IF HASALPHA() use ABPAINT() ELSE use something else ENDIF EMG
Bug in HasAlpha()
The idea is: lHasAlpha = ABPaint( hDC, nX, nY, hBitmap, nAlphaLevel )
Bug in HasAlpha()
Yes, but then the image is already printed with the right or wrong function. We need of a checking function that doesn't print the image, I think. EMG
Bug in HasAlpha()
If we paint it into a memory hDC then we will just check if it works or not Nothing will be seen
Bug in HasAlpha()
So, why not to make a function HasAlpha( hBmp ) using ABPaint() inside it? EMG
Bug in HasAlpha()
Enrico, Lets check if it works. I have modified FWH function ABPaint() to return the result of the call to AlphaBlend() [code=fw:2thob5i8]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> HasAlpha<span style="color: #000000;">&#40;</span> hBitmap <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hDC := CreateDC<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DISPLAY"</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lHasAlpha := ABPaint<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, hBitmap <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;DeleteDC<span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> lHasAlpha</div>[/code:2thob5i8] I am emailing you the modified FWH library. I appreciate if you can test it
Bug in HasAlpha()
I get this: [code=fw:2w56lajc]<div class="fw" id="{CB}" style="font-family: monospace;">Harbour <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r1605041350<span style="color: #000000;">&#41;</span><br />Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1999</span><span style="color: #000000;">-2016</span>, http:<span style="color: #B900B9;">//harbour-project.org/</span><br />Embarcadero C++ <span style="color: #000000;">7.20</span> <span style="color: #00C800;">for</span> Win32 Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1993</span><span style="color: #000000;">-2016</span> Embarcadero Technologies, Inc.<br />ALPHA.c:<br /><span style="color: #000000;">Turbo</span> Incremental Link <span style="color: #000000;">6.75</span> Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1997</span><span style="color: #000000;">-2016</span> Embarcadero Technologies, Inc.<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_pcre_config'</span> referenced <span style="color: #0000ff;">from</span> E:\HARBOUR\LIB\HBRTL.LIB|hbregex<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_pcre_stack_malloc'</span> referenced <span style="color: #0000ff;">from</span> E:\HARBOUR\LIB\HBRTL.LIB|hbregex<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_pcre_stack_free'</span> referenced <span style="color: #0000ff;">from</span> E:\HARBOUR\LIB\HBRTL.LIB|hbregex<br />Error: <span style="color: #000000;">Unable</span> <span style="color: #0000ff;">to</span> perform link</div>[/code:2w56lajc] Can you send me the libs for xHarbour, please? EMG
Bug in HasAlpha()
Are you linking hbpcre.lib ?
Bug in HasAlpha()
Function HasAlpha() has never been changed and works the same way it was working all the time. [code=fw:3kll3vt1]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cFile := <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\o</span>lga1.jpg"</span><br />hBmp := FILOADIMG<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Source of function image.prg. Requires Freeimage.dll</span><br />? HasAlpha<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// --> .F.</span><br /> </div>[/code:3kll3vt1] In the first post in this thread, hBmp is read wth the function GDIP_IMAGEFROMFILE(). This function uses GDI+. This does not require freeimage.dll, but the side-effect is this function converts even jpeg image as an alpha image and returns hBmp which has Alpha. Naturally HasAlpha( hBmp ) returns .T., because this hBitmap has Alpha channel. Even if the alpha channel is added ( 32-bit bitmap instead of 24-bit bitmap) there is no change in the content or rendering when painted with abpaint(). We knew this behavior from the time we started using GDI+.
Bug in HasAlpha()
[quote="nageswaragunupudi":3ay3a3ib]Function HasAlpha() has never been changed and works the same way it was working all the time. [code=fw:3ay3a3ib]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cFile := <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\o</span>lga1.jpg"</span><br />hBmp := FILOADIMG<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Source of function image.prg. Requires Freeimage.dll</span><br />? HasAlpha<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// --> .F.</span><br /> </div>[/code:3ay3a3ib] In the first post in this thread, hBmp is read wth the function GDIP_IMAGEFROMFILE(). This function uses GDI+. This does not require freeimage.dll, but the side-effect is this function converts even jpeg image as an alpha image and returns hBmp which has Alpha. Naturally HasAlpha( hBmp ) returns .T., because this hBitmap has Alpha channel. Even if the alpha channel is added ( 32-bit bitmap instead of 24-bit bitmap) there is no change in the content or rendering when painted with abpaint(). We knew this behavior from the time we started using GDI+.[/quote:3ay3a3ib] Thank you. This could explain why HasAlpha() is not working fine. Unfortunately there is another problem: images loaded with GDIP_IMAGEFROMFILE() seems to not paint correctly using ABPAINT(), at least with TPrinter's hDCOut. EMG
Bug in INDEX command
This is the sample: [code:384kxwjd]#include "Fwce&#46;ch" FUNCTION MAIN&#40;&#41; DBCREATE&#40; CURDIR&#40;&#41; + "\TMPTEST", &#123; &#123; "TEST", "C", 10, 0 &#125; &#125; &#41; USE &#40; CURDIR&#40;&#41; + "\TMPTEST" &#41; APPEND BLANK REPLACE FIELD -> test WITH "Test 1" APPEND BLANK REPLACE FIELD -> test WITH "Test 2" INDEX ON FIELD -> test TO &#40; CURDIR&#40;&#41; + "\TMPTEST" &#41; CLOSE MSGINFO&#40; "Done!" &#41; RETURN NIL[/code:384kxwjd] It gives "Corruption detected" error. EMG
Bug in INDEX command
This sample works fine in MyDevice. EMG
Bug in INDEX command
Enrico, It looks as the same behavior. Applications should be tested on the Pocket PC memory, not on the memory card
Bug in INDEX command
The problem is that apparently the memory card can't be mapped to a directory of the PC and this forces to do a manual copy/paste on the device at each execution. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> Are there other solutions? EMG
Bug in INDEX command
Enrico, You can use Microsoft's device emulator manager: <!-- m --><a class="postlink" href="http://rapidshare.com/files/32491820/dvcemumanager.zip.html">http://rapidshare.com/files/32491820/dv ... r.zip.html</a><!-- m --> to manage the emulator from your PC and then move the files to the desired location
Bug in INDEX command
Thank you, but all I get is "Cannot start the emulator" error message. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> EMG
Bug in INDEX command
Enrico, You need to have the emulator running before using it
Bug in INDEX command
Just tried. Same result. Perhaps some other components is required? Or my emulator is not the right one? It already has a device manager but I get nothing when I run it. EMG
Bug in INDEX command
Enrico, Do you have ActiveSync installed on your computer ? It is required for the dvcemumanager.exe to properly work
Bug in INDEX command
No, from where can I download it? Thank you! EMG
Bug in INDEX command
Enrico, Google for it. Its a Microsoft download If you are using Windows Vista then it is no longer needed, as it is part of Vista
Bug in INDEX command
Ok, I already downloaded and installed ActiveSync 4.5 but it won't connect to my device emulator. Any hint? EMG
Bug in INDEX command
Enrico, Once the emulator is running, then you execute dvcemumanager.exe and what screen do you get ?
Bug in INDEX command
As previously: nothing at all with the version provided with the emulator and "Cannot start the emulator" with the version you sent me. EMG
Bug in INDEX command
Enrico, Are you using XP ?
Bug in INDEX command
Yes. Anyway, now the Device Manager starts (it was not registered). I already get the emulator connected with ActiveSync and I can use Explorer on the PC to see My Device. But what I would want to find is a way to automatically copy updated files from mapped storage card to My Device. Is it possible? EMG
Bug in INDEX command
Enrico, We could use FWPPC to build an application that does it (using a timer) <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in INDEX command
I just need to automatically copy a file from Storage Card to My Device but I don't know how to access to My Device from a copy command or similar. EMG
Bug in INDEX command
Enrico, My Device is the root path "\"
Bug in INDEX command
Sorry, I meant to do a copy from the PC to My Device. I think it is not possible, right? EMG
Bug in INDEX command
I rethink to the subject. What makes PACK or INDEX ON command so special that they can't execute in Storage Card while, as an example, REPLACE command or DBCREATE() function aren't? EMG
Bug in INDEX command
And why the following sample works? [code:1v8djvn5]#include "Fwce&#46;ch" FUNCTION MAIN&#40;&#41; SET DELETED ON DBCREATE&#40; CURDIR&#40;&#41; + "\TMPTEST", &#123; &#123; "TEST", "C", 10, 0 &#125; &#125; &#41; USE &#40; CURDIR&#40;&#41; + "\TMPTEST" &#41; APPEND BLANK REPLACE FIELD -> test WITH "Test 1" APPEND BLANK REPLACE FIELD -> test WITH "Test 2" DELETE // PACK CLOSE MYPACK&#40; CURDIR&#40;&#41; + "\TMPTEST&#46;DBF" &#41; USE &#40; CURDIR&#40;&#41; + "\TMPTEST" &#41; MSGINFO&#40; RECCOUNT&#40;&#41; &#41; CLOSE RETURN NIL STATIC FUNCTION MYPACK&#40; cDbf &#41; LOCAL cTmp &#58;= &#40; CURDIR&#40;&#41; + "\TMPTEST_&#46;DBF" &#41; USE &#40; cDbf &#41; COPY TO &#40; cTmp &#41; CLOSE FERASE&#40; cDbf &#41; COPY FILE &#40; cTmp &#41; TO &#40; cDbf &#41; FERASE &#40; cTmp &#41; RETURN NIL[/code:1v8djvn5] EMG
Bug in INDEX command
And why this other works too (please note that I only add REQUEST DBFNTX)? [code:3b7y3wqi]#include "Fwce&#46;ch" REQUEST DBFNTX FUNCTION MAIN&#40;&#41; DBCREATE&#40; CURDIR&#40;&#41; + "\TMPTEST", &#123; &#123; "TEST", "C", 10, 0 &#125; &#125; &#41; USE &#40; CURDIR&#40;&#41; + "\TMPTEST" &#41; APPEND BLANK REPLACE FIELD -> test WITH "Test 1" APPEND BLANK REPLACE FIELD -> test WITH "Test 2" INDEX ON FIELD -> test TO &#40; CURDIR&#40;&#41; + "\TMPTEST" &#41; CLOSE MSGINFO&#40; "Done!" &#41; RETURN NIL[/code:3b7y3wqi]
Bug in INDEX command
Enrico, > Sorry, I meant to do a copy from the PC to My Device. I think it is not possible, right? Total Commander allows to map a Pocket PC path
Bug in INDEX command
Enrico, Harbour is the one that manages the files, so I can't tell what the difference may it be. The curious thing is that they work fine on the My Device path. We have faced similar situations when using SHARED. It works on My Device or subdirs, but not on the memory card
Bug in IsOem()/IsAnsi() function
The following sample shows .T. and .F. instead of .F. and .T. (CHR( 128 ) is the Euro symbol and is an ANSI code): [code:3i2gztm8]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; ? ISOEM&#40; CHR&#40; 128 &#41; &#41; ? ISANSI&#40; CHR&#40; 128 &#41; &#41; RETURN NIL[/code:3i2gztm8] EMG
Bug in IsOem()/IsAnsi() function
Enrico, In source\winapi\oemansi.c please implement these changes: [code:1mxtxylc] CLIPPER ISANSI&#40; PARAMS &#41; // cString --> lAnsi &#123; LPBYTE pString = &#40; LPBYTE &#41; _parc&#40; 1 &#41;; WORD w = 0, wLen = _parclen&#40; 1 &#41;; BOOL bAnsi = FALSE; while&#40; w < wLen && ! bAnsi &#41; &#123; bAnsi = &#40; pString&#91; w &#93; >= 224 && pString&#91; w &#93; <= 255 &#41; || pString&#91; w &#93; == 128; w++; &#125; _retl&#40; bAnsi &#41;; &#125; //----------------------------------------------------------------------------// CLIPPER ISOEM&#40; PARAMS &#41; // cString --> lOem &#123; LPBYTE pString = &#40; LPBYTE &#41; _parc&#40; 1 &#41;; WORD w = 0, wLen = _parclen&#40; 1 &#41;; BOOL bOem = FALSE; while&#40; w < wLen && ! bOem &#41; &#123; bOem = pString&#91; w &#93; > 128 && pString&#91; w &#93; <= 168; w++; &#125; _retl&#40; bOem &#41;; &#125; [/code:1mxtxylc]