topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
Bug in IsOem()/IsAnsi() function
|
Thank you.
EMG
|
Bug in MENU 2007?
|
Hi!
With Wine I get this:
[img:2qo0yzyp]http://www.ibtc.biz/tmp/2011-02-04_14-56-10.png[/img:2qo0yzyp]
1: the colour of the text should be black
2: the background of the arrow should be transparent
and on Windows 7:
[img:2qo0yzyp]http://www.ibtc.biz/tmp/2011-02-04_14-58-55.png[/img:2qo0yzyp]
3: the arrow should be dark
How/where can I define the text colour of the highlighted item? And also the arrow image?
The code:
[code=fw:2qo0yzyp]<div class="fw" id="{CB}" style="font-family: monospace;"><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> oWnd<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">22</span>, <span style="color: #000000;">75</span> ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test Menu"</span> <span style="color: #0000ff;">MENU</span> BuildMenu<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">function</span> BuildMenu<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oMenu<br /><br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2007</span><br /><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Item 1"</span><br /><br /> <span style="color: #0000ff;">MENU</span><br /><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Item 1.1"</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Item 1.2"</span><br /><br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Item 1.2a"</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Item 1.2b"</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /><span style="color: #00C800;">return</span> oMenu<br /> </div>[/code:2qo0yzyp]
Thanks for help.
|
Bug in MENU 2007?
|
These problems still exists in FWH 11.01. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
It should be fixed, especially using Wine/WinBottler is recommended from Antonio for FWH Windows app on Linux/Mac (see e.g. [url=http://forums.fivetechsupport.com/viewtopic.php?f=3&t=19683&p=103836:37wpsmr7]From PC to MAC - Urgent[/url:37wpsmr7], [url=http://forums.fivetechsupport.com/viewtopic.php?f=6&t=19272&p=102005:37wpsmr7]compatibilidad FWH con FiveMac y FiveLinux[/url:37wpsmr7]). So we have more modern locking Windows apps also on Linux/Mac.
I would try to fix it on my own, but MENU 2007 use functions which are not available for FWH users, like MITEMS2007(). I fear that the fix had to made in one of these functions <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
|
Bug in MENU 2007?
|
Ruediger,
Those differences are based on existing differences between true Windows and Wine.
If you need some code for testing on Wine we can help you with modifications, etc
Have you considered not to use the 2007 style on the menu on Wine ?
|
Bug in MENU 2007?
|
Hi Antonio,
[quote="Antonio Linares":dvwk7bnt]
If you need some code for testing on Wine we can help you with modifications, etc
[/quote:dvwk7bnt]
This would be great. Thanks!
[quote="Antonio Linares":dvwk7bnt]
Have you considered not to use the 2007 style on the menu on Wine ?
[/quote:dvwk7bnt]
We want to use the 2007 style because than the app looks much better on Wine than without.
|
Bug in MENU 2007?
|
BTW... If you use a FWH 12.05 app under wine 1.2.3 and want to open a menu without 2007 clause the app crashes without any notice. The problem is at these lines at menus.c:
[code=fw:3tinzpfc]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> lpdis->itemState & ODS_GRAYED <span style="color: #000000;">)</span><br /> RectDisable<span style="color: #000000;">(</span> lpdis->hDC, &lpdis->rcItem <span style="color: #000000;">)</span>;<br /> </div>[/code:3tinzpfc]
If I disable this it works under wine 1.2.3.
|
Bug in MENU 2007?
|
[quote="Antonio Linares":2p05nopk]
If you need some code for testing on Wine we can help you with modifications, etc
[/quote:2p05nopk]
The solution is insert in MENUDRAW2007() following lines:
[code=fw:2p05nopk]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> ... <br /> <span style="color: #00C800;">else</span><br /> uFormat = DT_CENTER; <br /><br /> <span style="color: #B900B9;">// New:</span><br /> SetBkColor<span style="color: #000000;">(</span> lpdis->hDC, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">250</span>, <span style="color: #000000;">250</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> SetTextColor<span style="color: #000000;">(</span> lpdis->hDC, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><br /> SetBkMode<span style="color: #000000;">(</span> lpdis->hDC, TRANSPARENT <span style="color: #000000;">)</span>;<br /> <br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> lpdis->itemState & ODS_GRAYED <span style="color: #000000;">)</span><br /> SetTextColor<span style="color: #000000;">(</span> lpdis->hDC, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #B900B9;">// New:</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> lpdis->itemState & ODS_SELECTED <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> ! <span style="color: #000000;">(</span> lpdis->itemState & ODS_GRAYED <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> SetBkColor<span style="color: #000000;">(</span> lpdis->hDC, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">233</span>, <span style="color: #000000;">162</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> ! bTab <span style="color: #000000;">)</span><br /> ...<br /> </div>[/code:2p05nopk]
|
Bug in Menu [Solved]
|
The horizontal menu size ("This is a test" item) is too much for the string it contains. I remember it was right in the far past. This is a sample:
[code=fw:2wtanwid]<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;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oWnd, oMenu<br /><br /> <span style="color: #0000ff;">MENU</span> oMenu<br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /><br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"This is a test"</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd;<br /> <span style="color: #0000ff;">MENU</span> oMenu<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:2wtanwid]
EMG
|
Bug in Menu [Solved]
|
Enrico,
It seems fine to me.
When you say "in the far past" which FWH version do you mean ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
I mean, how far is that far past ?
|
Bug in Menu [Solved]
|
Antonio,
sorry, I don't remember. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
Anyway, don't you see the extra space between the end of the string and the end of menu? It looks a bit... excessive. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in Menu [Solved]
|
Enrico,
If we use an accelerator on the menuitem such space will be used, so it does not look wrong to me <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in Menu [Solved]
|
Antonio,
please try this. The menu item has been enlarged to accomodate the accelerator.
[code=fw:s3jx14tc]<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;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oWnd, oMenu<br /><br /> <span style="color: #0000ff;">MENU</span> oMenu<br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /><br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"This is a test"</span> + CHR<span style="color: #000000;">(</span> <span style="color: #000000;">9</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">"CTRL-X"</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd;<br /> <span style="color: #0000ff;">MENU</span> oMenu<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:s3jx14tc]
EMG
|
Bug in Menu [Solved]
|
Enrico,
This is the menu image without accelerators:
[img:3l1u8so0]https://bitbucket.org/fivetech/screenshots/downloads/menu1.jpg[/img:3l1u8so0]
And this is your seocnd example with accelerator:
[img:3l1u8so0]https://bitbucket.org/fivetech/screenshots/downloads/menu2.jpg[/img:3l1u8so0]
If you think that they are too large, we could try to implement a MENU ... SIZE clause
|
Bug in Menu [Solved]
|
Antonio,
the current size is double of the item string lenght and this is too much. Please try to right click on the desktop or on any other place and you'll see that the standard menu width is smaller than the FWH menu one.
EMG
|
Bug in Menu [Solved]
|
Enrico,
I am going to review its source and find a way to reduce its length <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in Menu [Solved]
|
Antonio,
thank you! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in Menu [Solved]
|
Enrico,
After answering you, I realized that that menu is not ownerdraw so we don't control at all its painting. Unless we are adding somewhere some spaces, I don't see how we could change its width.
|
Bug in Menu [Solved]
|
Antonio,
so let's find those extra spaces! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in Menu [Solved]
|
Enrico,
Problem found <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
In Class TWindow lines 1403 please use this code:
[code=fw:1y2mefai]<div class="fw" id="{CB}" style="font-family: monospace;"> MenuMeasureItem<span style="color: #000000;">(</span> pMitStruct,;<br /> <span style="color: #000000;">0.9</span> * GetTextWidth<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ! Empty<span style="color: #000000;">(</span> oItem:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">)</span>,;<br /> StrTran<span style="color: #000000;">(</span> oItem:<span style="color: #000000;">cPrompt</span>, <span style="color: #ff0000;">"&"</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oItem:<span style="color: #000000;">oMenu</span>:<span style="color: #000000;">hMenu</span> != <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">oMenu</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oMenu</span>:<span style="color: #000000;">hMenu</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>, ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ValType<span style="color: #000000;">(</span> oItem:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>,;<br /> Empty<span style="color: #000000;">(</span> oItem:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:1y2mefai]
Simply replace that 50 with different values until you find the right size for you. I guess we could set this as a DATA of Class TMenu.
|
Bug in Menu [Solved]
|
Antonio,
great! I'm going to make some test. Anyway, I think you can simply check the context menu (right click) of the desktop or other Windows items. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in Menu [Solved]
|
Enrico,
As we don't have time to implement a new clause as FWH 14.07 is almost ready and it is not the time to make deep changes, if you suggest me the right size, then I will include it in FWH 14.07 <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in Menu [Solved]
|
Antonio,
I just tested your change and it's fine for me. Many thanks. By the way, I found this comment in window.prg that explains all:
[code=fw:2zj7mj9n]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// + 20 introduced due Error on NT on width calculation 1999/05/19</span></div>[/code:2zj7mj9n]
<!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in Menu [Solved]
|
Enrico,
yes, I saw it too, but that couldn't be a recent change.
Anyhow, its solved <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
many thanks for your feedback
|
Bug in Menu [Solved]
|
Antonio,
[quote="Antonio Linares":13xibg5d]Enrico,
yes, I saw it too, but that couldn't be a recent change.[/quote:13xibg5d]
That's why I said "in the far past". <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
[quote="Antonio Linares":13xibg5d]Anyhow, its solved <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
many thanks for your feedback[/quote:13xibg5d]
You're welcome, my friend! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in Menu [Solved]
|
I did report this behavior in May 2008 [url:3prfo902]http://forums.fivetechsupport.com/viewtopic.php?f=6&t=11165&hilit=menu+ancho[/url:3prfo902] and, as suggested per Antonio I did some testing, working better changing the value from 100 to 55.
[code=fw:3prfo902]<div class="fw" id="{CB}" style="font-family: monospace;"><br />f oItem != <span style="color: #00C800;">nil</span><br /> MenuMeasureItem<span style="color: #000000;">(</span> pMitStruct,;<br /> <span style="color: #000000;">0.9</span> * GetTextWidth<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ! Empty<span style="color: #000000;">(</span> oItem:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">)</span>,;<br /> StrTran<span style="color: #000000;">(</span> oItem:<span style="color: #000000;">cPrompt</span>, <span style="color: #ff0000;">"&"</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oItem:<span style="color: #000000;">oMenu</span>:<span style="color: #000000;">hMenu</span> != <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">oMenu</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oMenu</span>:<span style="color: #000000;">hMenu</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>, ;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> ValType<span style="color: #000000;">(</span> oItem:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"C"</span>, <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> chr<span style="color: #000000;">(</span> <span style="color: #000000;">9</span> <span style="color: #000000;">)</span>$oItem:<span style="color: #000000;">cPrompt</span>, <span style="color: #000000;">55</span>, <span style="color: #000000;">55</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> ,; <span style="color: #B900B9;">// Changed to 55 from 100 </span><br /> Empty<span style="color: #000000;">(</span> oItem:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span> <span style="color: #B900B9;">// + 20 introduced due Error on NT on width calculation 1999/05/19</span><br /> <span style="color: #00C800;">if</span> IsMenuItem<span style="color: #000000;">(</span> pMitStruct <span style="color: #000000;">)</span><br /> MenuMeasureItem<span style="color: #000000;">(</span> pMitStruct,, IsMISeparator<span style="color: #000000;">(</span> pMitStruct <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">return</span> .f. <span style="color: #B900B9;">// default behavior</span><br /> <span style="color: #00C800;">endif</span><br /> </div>[/code:3prfo902]
Regards,
George
|
Bug in Menu [Solved]
|
Time flies <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
I really forgot about that one <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in PACK command
|
This is the sample:
[code:2l2r2rep]#include "Fwce.ch"
FUNCTION MAIN()
DBCREATE( CURDIR() + "\TMPTEST", { { "TEST", "C", 10, 0 } } )
USE ( CURDIR() + "\TMPTEST" )
APPEND BLANK
REPLACE FIELD -> test WITH "Test 1"
APPEND BLANK
REPLACE FIELD -> test WITH "Test 2"
DELETE
PACK
CLOSE
MSGINFO( "Done!" )
RETURN NIL[/code:2l2r2rep]
It seems that PACK recovers deleted flag instead of to remove the deleted record.
Probably it is a bug in Harbour_CE. It is working fine with current Harbour from CVS.
EMG
|
Bug in PACK command
|
Enrico
Pack works OK you have to add
SET DELETE ON
Regards
Richard <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
|
Bug in PACK command
|
No, SET DELETED ON is not required for PACK to work. Anyway, I just tried with SET DELETED ON and found the same result.
I'm using FWPPC 7.02.
EMG
|
Bug in PACK command
|
Enrico,
Changing your code this way:
PACK
MsgInfo( RecCount() )
It shows 1, which it seems correct
|
Bug in PACK command
|
Yes, but now try to open TMPTEST.DBF and you will see that there are two records.
EMG
|
Bug in PACK command
|
This is the modified sample showing that the record is not removed:
[code:3qgt03dr]#include "Fwce.ch"
FUNCTION MAIN()
SET DELETED ON
DBCREATE( CURDIR() + "\TMPTEST", { { "TEST", "C", 10, 0 } } )
USE ( CURDIR() + "\TMPTEST" )
APPEND BLANK
REPLACE FIELD -> test WITH "Test 1"
APPEND BLANK
REPLACE FIELD -> test WITH "Test 2"
DELETE
PACK
CLOSE
USE ( CURDIR() + "\TMPTEST" )
MSGINFO( RECCOUNT() )
CLOSE
MSGINFO( "Done!" )
RETURN NIL[/code:3qgt03dr]
EMG
|
Bug in PACK command
|
Enrico,
It is related to the SD memory card. Copy the EXE to the Pocket PC root path and it works fine there
|
Bug in PACK command
|
Sorry, I haven't a pocket PC. How can I do the same using the emulator?
EMG
|
Bug in PACK command
|
Enrico,
Keep the mouse pressed on top of the EXE until a popup is shown, then select copy. Then select "My Device" from the top menu of the file explorer and right click and select paste. Then run it there.
[url=http://imageshack.us:2nakd7nh][img:2nakd7nh]http://img399.imageshack.us/img399/6691/copydm3.png[/img:2nakd7nh][/url:2nakd7nh]
[url=http://imageshack.us:2nakd7nh][img:2nakd7nh]http://img399.imageshack.us/img399/4901/pastekh9.png[/img:2nakd7nh][/url:2nakd7nh]
|
Bug in PACK command
|
Yes, this way it works. Unfortunately, this makes the emulator much less useful. I wonder if there is a way to get the program to run correctly on the storage card...
EMG
|
Bug in PACK command
|
Enrico,
Harbour uses the same functions to manage files when it runs on the memory card, so its a difference on the Windows Mobile OS
|
Bug in REDEFINE SAY?
|
Hello!
If I use TRANSPARENT with DIALOG the displayed text of REDEFINED SAY is cutted:
[img:31xk6v29]http://www.ibtc.biz/tmp/2011-02-12_19-39-14.png[/img:31xk6v29]
[code=fw:31xk6v29]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> DialogFromResource1<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg<br /> <span style="color: #00C800;">LOCAL</span> cText<br /><br /> cText := <span style="color: #ff0000;">"*** Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ***"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"DIALOG1"</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #00C800;">NIL</span>,RGB<span style="color: #000000;">(</span><span style="color: #000000;">239</span>,<span style="color: #000000;">239</span>,<span style="color: #000000;">231</span><span style="color: #000000;">)</span> TRANSPARENT<br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> <span style="color: #0000ff;">PROMPT</span> cText <span style="color: #0000ff;">ID</span> <span style="color: #000000;">500</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:31xk6v29]
without TRANSPARENT the whole text is displayed:
[img:31xk6v29]http://www.ibtc.biz/tmp/2011-02-12_19-39-54.png[/img:31xk6v29]
[code=fw:31xk6v29]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> DialogFromResource2<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg<br /> <span style="color: #00C800;">LOCAL</span> cText<br /><br /> cText := <span style="color: #ff0000;">"*** Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ***"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"DIALOG1"</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #00C800;">NIL</span>,RGB<span style="color: #000000;">(</span><span style="color: #000000;">239</span>,<span style="color: #000000;">239</span>,<span style="color: #000000;">231</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> <span style="color: #0000ff;">PROMPT</span> cText <span style="color: #0000ff;">ID</span> <span style="color: #000000;">500</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:31xk6v29]
The resource file:
[code=fw:31xk6v29]<div class="fw" id="{CB}" style="font-family: monospace;">DIALOG1 DIALOGEX DISCARDABLE <span style="color: #000000;">44</span>, <span style="color: #000000;">23</span>, <span style="color: #000000;">400</span>, <span style="color: #000000;">107</span><br /><span style="color: #0000ff;">STYLE</span> WS_POPUP|DS_MODALFRAME|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">{</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">500</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">8</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">388</span>, <span style="color: #000000;">68</span><br /><span style="color: #000000;">}</span></div>[/code:31xk6v29]
How can this bug fixed?
|
Bug in REDEFINE SAY?
|
This problem still exists in FWH 11.01. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
And now I also found a (new?) Memory leak:
[code=fw:m88w20sf]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #000000;">02</span>/<span style="color: #000000;">15</span>/<span style="color: #000000;">11</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">37</span>:<span style="color: #000000;">12</span>: <span style="color: #0000ff;">BRUSH</span>,<span style="color: #000000;">3048</span>,TDIALOG:<span style="color: #000000;">SETCOLOR</span><span style="color: #000000;">(</span><span style="color: #000000;">2477</span><span style="color: #000000;">)</span>->TDIALOG:<span style="color: #00C800;">NEW</span><span style="color: #000000;">(</span><span style="color: #000000;">196</span><span style="color: #000000;">)</span>->DIALOGFROMRESOURCE1<span style="color: #000000;">(</span><span style="color: #000000;">39</span><span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>MAIN<span style="color: #000000;">(</span><span style="color: #000000;">19</span><span style="color: #000000;">)</span>->TBTNBMP:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">(</span><span style="color: #000000;">466</span><span style="color: #000000;">)</span>->TBTNBMP:<span style="color: #000000;">LBUTTONUP</span><span style="color: #000000;">(</span><span style="color: #000000;">661</span><span style="color: #000000;">)</span>->TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span><span style="color: #000000;">1489</span><span style="color: #000000;">)</span>->TBTNBMP:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span><span style="color: #000000;">1453</span><span style="color: #000000;">)</span>->_FWH<span style="color: #000000;">(</span><span style="color: #000000;">3408</span><span style="color: #000000;">)</span>->WINRUN<span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span>->TWINDOW:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">(</span><span style="color: #000000;">992</span><span style="color: #000000;">)</span>->MAIN<span style="color: #000000;">(</span><span style="color: #000000;">22</span><span style="color: #000000;">)</span></div>[/code:m88w20sf]
The code:
[code=fw:m88w20sf]<div class="fw" id="{CB}" style="font-family: monospace;"><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> oWnd<br /><br /> SetResDebug<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">40</span> ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span><br /><br /> @ <span style="color: #000000;">15</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">140</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Dialog from Resource"</span> <span style="color: #000000;">2007</span> <span style="color: #0000ff;">ACTION</span> DialogFromResource1<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">140</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Dialog from Resource"</span> <span style="color: #000000;">2007</span> <span style="color: #0000ff;">ACTION</span> DialogFromResource2<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /> FERASE<span style="color: #000000;">(</span><span style="color: #ff0000;">"CHECKRES.TXT"</span><span style="color: #000000;">)</span><br /> CHECKRES<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> winExec<span style="color: #000000;">(</span><span style="color: #ff0000;">"notepad .<span style="color: #000000;">\c</span>heckres.txt"</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /> </div>[/code:m88w20sf]
Rest of the code see above, also the rc file.
|
Bug in REDEFINE SAY?
|
Hi Ruediger
Re: text display ........................reprehend <end>
It looks like you have reached the limit of a character field. 255 happends to be the mac character field in clipper/dbase file.
Maybe it is the version of harbour that has changed to enforce the limit?
Try using MsgInfo() to disply 'cText' to see whats there. MsgInfo() is a windows display function.
You would normally use LTEXT in your resources to display static text.
Have you tried to use memo resources to display it. An example is the way I use an RC to capture text as a memo.
EDITTEXT 110, 16, 46, 342, 128, ES_MULTILINE | ES_WANTRETURN | WS_BORDER | WS_VSCROLL | WS_TABSTOP
The 'Say' class does not have a MEMO multi line option but 'get' class does.
I have never used 'Say' for such long text!
I'm interested in your solution to this.
|
Bug in REDEFINE SAY?
|
Hi Jonathan,
[quote="Jonathan Hodder":9kdph653]It looks like you have reached the limit of a character field. 255 happends to be the mac character field in clipper/dbase file.
Maybe it is the version of harbour that has changed to enforce the limit?
[/quote:9kdph653]
Everything work well without TRANSPARENT, only if I add TRANSPARENT (with the same Harbour version, the same FWH version, the same rest of source code etc.) the whole text isn't displayed. So, for me, it seems that there must be a bug in FWH. If I reached a limit of a character field with SAY, why did the problem didn't exists without TRANSPARENT, only with TRANSPARENT?
[quote="Jonathan Hodder":9kdph653]Have you tried to use memo resources to display it.[/quote:9kdph653]
Thanks for this idea. I will try it ASAP.
|
Bug in REDEFINE SAY?
|
Hi Ruediger
already fixed...
you can use momentarily this patch...
[url:3oua1rqb]http://www.sitasoft.net/fivewin/files/patch.obj[/url:3oua1rqb]
link before fivewin lib
this a sample working, thanks for the samples posted... was very useful help to solve the problem
[url:3oua1rqb]http://www.sitasoft.net/fivewin/samples/ibtc.zip[/url:3oua1rqb]
|
Bug in REDEFINE SAY?
|
Hi Daniel,
[quote="Daniel Garcia-Gil":ccr16yiz]
already fixed...
you can use momentarily this patch...
[/quote:ccr16yiz]
Thanks. It works. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Bug in REDEFINE SAY?
|
[quote="Daniel Garcia-Gil":1h3fxgv6][url:1h3fxgv6]http://www.sitasoft.net/fivewin/samples/ibtc.zip[/url:1h3fxgv6][/quote:1h3fxgv6]
Unfortunately, your sample doesn't work correctly in the new FWH release. One star at the end of the phrase is missing.
EMG
|
Bug in REDEFINE SAY?
|
Daniel, Antonio
podrian, poner el patch.obj para microsoft o pelles c compiler.
gracias.
salu2
carlos vargas
|
Bug in REDEFINE SAY?
|
Carlos...
que version de fivewin usas?
|
Bug in REDEFINE SAY?
|
10.07
salu2
carlos vargas
|
Bug in REDEFINE SAY?
|
Unfortunately this bug is back in latest FWH:
[code=fw:3gdtfhqj]<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;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> TRANSPARENT<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"This is a test"</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3gdtfhqj]
<!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG
|
Bug in REDEFINE SAY?
|
Enrico,
Fixed <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
We are going to publish a revised FWH 11.05
|
Bug in REDEFINE SAY?
|
Many thanks, Master! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in ResizeImg()
|
The result of ResizeImg() is slightly different in width and height if compared with ResizeBmp() and PalBmpDraw().
EMG
|
Bug in ResizeImg()
|
Is it related to last FWH build 4 ?
|
Bug in ResizeImg()
|
Marco,
no, it was there in the previous builds too.
EMG
|
Bug in ResizeImg()
|
Unfortunately, there is no source code for ResizeImg() so I can't try to fix the problem. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG
|
Bug in ResizeImg()
|
Enrico,
I send you its source code by email, thanks
|
Bug in ResizeImg()
|
Antonio,
thank you. I'll do some experiment with it.
EMG
|
Bug in ResizeImg()
|
Antonio,
found! Replace
[code=fw:215wzw38]<div class="fw" id="{CB}" style="font-family: monospace;"> iRateW = <span style="color: #000000;">(</span> DOUBLE <span style="color: #000000;">)</span> iNewWidth / <span style="color: #000000;">(</span> DOUBLE <span style="color: #000000;">)</span> bm.bmWidth * <span style="color: #000000;">100</span> + <span style="color: #000000;">1</span>;<br /> iRateH = <span style="color: #000000;">(</span> DOUBLE <span style="color: #000000;">)</span> iNewHeight / <span style="color: #000000;">(</span> DOUBLE <span style="color: #000000;">)</span> bm.bmHeight * <span style="color: #000000;">100</span> + <span style="color: #000000;">1</span>;<br /> </div>[/code:215wzw38]
with
[code=fw:215wzw38]<div class="fw" id="{CB}" style="font-family: monospace;"> iRateW = <span style="color: #000000;">(</span> DOUBLE <span style="color: #000000;">)</span> iNewWidth / <span style="color: #000000;">(</span> DOUBLE <span style="color: #000000;">)</span> bm.bmWidth * <span style="color: #000000;">100</span>;<br /> iRateH = <span style="color: #000000;">(</span> DOUBLE <span style="color: #000000;">)</span> iNewHeight / <span style="color: #000000;">(</span> DOUBLE <span style="color: #000000;">)</span> bm.bmHeight * <span style="color: #000000;">100</span>;</div>[/code:215wzw38]
EMG
|
Bug in ResizeImg()
|
I spoke too fast. It GPFs, I don't know why. I continue to experiment...
EMG
|
Bug in ResizeImg()
|
It seems to work in this form:
[code=fw:qofa2y71]<div class="fw" id="{CB}" style="font-family: monospace;"> iRateW = <span style="color: #000000;">(</span> DOUBLE <span style="color: #000000;">)</span> iNewWidth / <span style="color: #000000;">(</span> DOUBLE <span style="color: #000000;">)</span> bm.bmWidth * <span style="color: #000000;">100</span> + <span style="color: #000000;">0.9</span>;<br /> iRateH = <span style="color: #000000;">(</span> DOUBLE <span style="color: #000000;">)</span> iNewHeight / <span style="color: #000000;">(</span> DOUBLE <span style="color: #000000;">)</span> bm.bmHeight * <span style="color: #000000;">100</span> + <span style="color: #000000;">0.9</span>;</div>[/code:qofa2y71]
Please check.
EMG
|
Bug in ResizeImg()
|
Enrico,
Could you please provide an example to test it ? thanks
|
Bug in ResizeImg()
|
Here it is:
[code=fw:xmw1gp0w]<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;">(</span><span style="color: #000000;">)</span><br /><br /> TEST<span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /><br /> TEST<span style="color: #000000;">(</span> .F. <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> TEST<span style="color: #000000;">(</span> lImg <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">STYLE</span> NOR<span style="color: #000000;">(</span> WS_POPUP, WS_DLGFRAME, DS_MODALFRAME <span style="color: #000000;">)</span>;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">800</span>, <span style="color: #000000;">600</span><br /><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;">PAINT</span> DRAWIMG<span style="color: #000000;">(</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\m</span>agic.bmp"</span>, hDC, oDlg:<span style="color: #000000;">nWidth</span>, oDlg:<span style="color: #000000;">nHeight</span>, lImg <span style="color: #000000;">)</span>;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> DRAWIMG<span style="color: #000000;">(</span> cFile, hDC, nWidth, nHeight, lImg <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> hImg := LOADIMG<span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> hImg2<br /><br /> <span style="color: #00C800;">IF</span> lImg<br /> hImg2 = RESIZEIMG<span style="color: #000000;">(</span> hImg, nWidth, nHeight <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> hImg2 = RESIZEBMP<span style="color: #000000;">(</span> hImg, nWidth, nHeight <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> ABPAINT<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, hImg2, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /><br /> DELETEOBJECT<span style="color: #000000;">(</span> hImg2 <span style="color: #000000;">)</span><br /> DELETEOBJECT<span style="color: #000000;">(</span> hImg <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> LOADIMG<span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</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: #00C800;">RETURN</span> <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">RETURN</span> GDIP_IMAGEFROMFILE<span style="color: #000000;">(</span> cFile, .T. <span style="color: #000000;">)</span></div>[/code:xmw1gp0w]
EMG
|
Bug in ResizeImg()
|
Another request. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
ResizeImg() is a bit slower, probably due to the two nested loops involved. How to speed it up?
EMG
|
Bug in ResizeImg()
|
Enrico,
Do you need to resize the bitmap or simply paint it larger ?
|
Bug in ResizeImg()
|
Antonio,
yes, paint it larger (or smaller). But ABPaint() doesn't support resize.
EMG
|
Bug in ResizeImg()
|
Enrico,
Not sure if we can speed up the loop
|
Bug in ResizeImg()
|
Antonio,
how can we paint faster an alpha-channel image with resize?
EMG
|
Bug in ResizeImg()
|
Enrico,
I am afraid that we can't (maybe using GDI+?) as FWH function ABPaint() just calls Windows API function AlphaBlend()
|
Bug in ResizeImg()
|
Antonio,
I tried GDIPLUSIMAGERESIZE( hBmp, nWidth, nHeight ) but it GPFs. What am I doing wrong?
EMG
|
Bug in ResizeImg()
|
Antonio,
[quote="Antonio Linares":1k3i0pmb]FWH function ABPaint() just calls Windows API function AlphaBlend()[/quote:1k3i0pmb]
It seems that AlphaBlend() can resize the image:
[url:1k3i0pmb]https://msdn.microsoft.com/it-it/library/windows/desktop/dd183351(v=vs.85).aspx[/url:1k3i0pmb]
Can you add two parameters with nWidth and nHeight (or can send me the source code to experiment)?
EMG
|
Bug in ResizeImg()
|
Alternatively, I found that ResizeBmp() works very well and fast if SetStretchBltMode() is set to COLORONCOLOR:
[code=fw:3s11i903]<div class="fw" id="{CB}" style="font-family: monospace;">SetStretchBltMode <span style="color: #000000;">(</span>hdcDest, COLORONCOLOR<span style="color: #000000;">)</span>;</div>[/code:3s11i903]
What do you think about it?
EMG
|
Bug in ResizeImg()
|
If you go to call gdi + pictures, you redimensionaleas also from GDI + ...
[code=fw:1kfjdd0c]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> DRAWIMG<span style="color: #000000;">(</span> cFile, hDC, nWidth, nHeight, lImg <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> hImg := LoadresizedImage<span style="color: #000000;">(</span> cFile ,nWith, nHeight<span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// LOCAL hImg2</span><br /><br /> <span style="color: #B900B9;">// IF lImg</span><br /> <span style="color: #B900B9;">// hImg2 = RESIZEIMG( hImg, nWidth, nHeight )</span><br /> <span style="color: #B900B9;">// ELSE</span><br /> <span style="color: #B900B9;">// hImg2 = RESIZEBMP( hImg, nWidth, nHeight )</span><br /> <span style="color: #B900B9;">// ENDIF</span><br /><br /> ABPAINT<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, hImg, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// DELETEOBJECT( hImg2 )</span><br /> DELETEOBJECT<span style="color: #000000;">(</span> hImg <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">function</span> LoadresizedImage<span style="color: #000000;">(</span> cFile ,nWith, nHeight<span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> hbitmap<br /><span style="color: #00C800;">local</span> ogdi:=gdibmp<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</span><br /> ogdi:<span style="color: #000000;">resize</span><span style="color: #000000;">(</span> nWith, nHeight <span style="color: #000000;">)</span><br /> hbitmap := ogdi:<span style="color: #000000;">GetGDIHbitmap</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> ogdi:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> hbitmap<br /><br /> </div>[/code:1kfjdd0c]
or
[code=fw:1kfjdd0c]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> DRAWIMG<span style="color: #000000;">(</span> cFile, hDC, nWidth, nHeight, lImg <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> hgdiImg := GdiPlusImageLoadCachedFile<span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> gdinewhBmp := GdiPlusImageResize<span style="color: #000000;">(</span>hgdiImg , nWidth, nHeight <span style="color: #000000;">)</span> <br /> <span style="color: #00C800;">LOCAL</span> hImg2 := GdiPlusCreateHBitmapImage<span style="color: #000000;">(</span> gdinewhBmp <span style="color: #000000;">)</span><br /><br /> ABPAINT<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, hImg2, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /><br /> DELETEOBJECT<span style="color: #000000;">(</span> hImg2 <span style="color: #000000;">)</span><br /> GdiPlusImageDispose<span style="color: #000000;">(</span> gdinewhBmp <span style="color: #000000;">)</span><br /> gdinewhBmp = <span style="color: #00C800;">nil</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> <br /><br /> </div>[/code:1kfjdd0c]
|
Bug in ResizeImg()
|
Enrico,
I already sent you function ABPaint() source code by email
|
Bug in ResizeImg()
|
[quote="mastintin":3i8uunya]If you go to call gdi + pictures, you redimensionaleas also from GDI + ...[/quote:3i8uunya]
Thank you, but doing so the file must be reloaded. I would want to resize an already loaded hBmp. Is it possible?
EMG
|
Bug in ResizeImg()
|
Antonio,
[quote="Antonio Linares":9pdn7oxt]Enrico,
I already sent you function ABPaint() source code by email[/quote:9pdn7oxt]
Thank you. I'll study it.
EMG
|
Bug in ResizeImg()
|
ok. From hbitmap
[code=fw:hp30jmch]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> GdiResizeImage<span style="color: #000000;">(</span> hImg , nwidth, nHeight<span style="color: #000000;">)</span> <br /><span style="color: #00C800;">local</span> hGdiBmp:= GdiPlusCreateImageFrom32hBitmap<span style="color: #000000;">(</span> hImg <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> gdinewhBmp := GdiPlusImageResize<span style="color: #000000;">(</span>hgdibmp, nWidth, nHeight <span style="color: #000000;">)</span> <br /> <span style="color: #00C800;">LOCAL</span> hImg2 := GdiPlusCreateHBitmapImage<span style="color: #000000;">(</span> gdinewhBmp <span style="color: #000000;">)</span><br /> GdiPlusImageDispose<span style="color: #000000;">(</span> hGdiBmp <span style="color: #000000;">)</span><br /> GdiPlusImageDispose<span style="color: #000000;">(</span> gdinewhBmp <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Return</span> hImg2<br /><br /> </div>[/code:hp30jmch]
|
Bug in ResizeImg()
|
Thank you. But I think that using AlphaBlend() features would be much more efficient. I'm implementing the required changes.
EMG
|
Bug in RibbonBar?
|
Hi!
If I press on the first button:
[img:g5me738g]http://www.ibtc.biz/tmp/2011-02-04_15-43-48.png[/img:g5me738g]
I get this:
[img:g5me738g]http://www.ibtc.biz/tmp/2011-02-04_15-44-22.png[/img:g5me738g]
Only the text oft the buttons of the same group get gray, not the others:
[img:g5me738g]http://www.ibtc.biz/tmp/2011-02-04_15-45-06.png[/img:g5me738g]
I tried already a lot with different refresh etc., but nothing worked. How can this problem solved?
The code:
[code=fw:g5me738g]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ribbon.ch"</span><br /><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> oWnd<br /><br /> <span style="color: #00C800;">LOCAL</span> oRibbon, oGr<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>, oBtn<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span><br /> <span style="color: #00C800;">LOCAL</span> lValid := .T.<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">22</span>, <span style="color: #000000;">75</span> ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test Ribbon"</span><br /><br /> oRibbon := TRibbonBar<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span>oWnd, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Item 1"</span>,<span style="color: #ff0000;">"Item 2"</span> <span style="color: #000000;">}</span>, ,, oWnd:<span style="color: #000000;">nWidth</span>, <span style="color: #000000;">132</span>, <span style="color: #000000;">26</span> <span style="color: #000000;">)</span><br /><br /> ADD GROUP oGr<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> RIBBON oRibbon <span style="color: #0000ff;">TO</span> OPTION <span style="color: #000000;">1</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">""</span> WIDTH <span style="color: #000000;">173</span><br /><br /> @ <span style="color: #000000;">5</span>,<span style="color: #000000;">5</span> ADD <span style="color: #0000ff;">BUTTON</span> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Press to Change"</span> BITMAP <span style="color: #ff0000;">""</span> <span style="color: #0000ff;">CENTER</span> GROUP oGr<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ROUND</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">83</span>,<span style="color: #000000;">75</span>;<br /> <span style="color: #0000ff;">ACTION</span> lValid := !lValid<br /><br /> @ <span style="color: #000000;">5</span>,<span style="color: #000000;">88</span> ADD <span style="color: #0000ff;">BUTTON</span> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Button 1"</span> BITMAP <span style="color: #ff0000;">""</span> <span style="color: #0000ff;">CENTER</span> GROUP oGr<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ROUND</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">83</span>,<span style="color: #000000;">75</span>;<br /> <span style="color: #0000ff;">WHEN</span> lValid <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Button 1"</span><span style="color: #000000;">)</span><br /><br /> ADD GROUP oGr<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> RIBBON oRibbon <span style="color: #0000ff;">TO</span> OPTION <span style="color: #000000;">1</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">""</span> WIDTH <span style="color: #000000;">90</span><br /><br /> @ <span style="color: #000000;">5</span>,<span style="color: #000000;">5</span> ADD <span style="color: #0000ff;">BUTTON</span> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Button 2"</span> BITMAP <span style="color: #ff0000;">""</span> <span style="color: #0000ff;">CENTER</span> GROUP oGr<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ROUND</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">83</span>,<span style="color: #000000;">75</span>;<br /> <span style="color: #0000ff;">WHEN</span> lValid <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Button 2"</span><span style="color: #000000;">)</span><br /><br /> ADD GROUP oGr<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> RIBBON oRibbon <span style="color: #0000ff;">TO</span> OPTION <span style="color: #000000;">2</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">""</span> WIDTH <span style="color: #000000;">90</span><br /><br /> @ <span style="color: #000000;">5</span>,<span style="color: #000000;">5</span> ADD <span style="color: #0000ff;">BUTTON</span> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Button 3"</span> BITMAP <span style="color: #ff0000;">""</span> <span style="color: #0000ff;">CENTER</span> GROUP oGr<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ROUND</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">83</span>,<span style="color: #000000;">75</span>;<br /> <span style="color: #0000ff;">WHEN</span> lValid <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Button 3"</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /> </div>[/code:g5me738g]
Thanks for help.
|
Bug in RibbonBar?
|
This problem still exists in FWH 11.01. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
|
Bug in RibbonBar?
|
Hi Silvio,
[quote="Silvio":3gvlp5eb]if you press a button on a group this button became gray no the others ...
or I not understood your problem
ribbon run ok here[/quote:3gvlp5eb]
Please have a closer look to the source code. All buttons except the first one have this:
[code=fw:3gvlp5eb]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">WHEN</span> lValid</div>[/code:3gvlp5eb]
If you press the first button, lValid changed and all other buttons are invalid. That means when you click on all other buttons (except the first one) nothing happens. But only the buttons in the first group (except the first) get gray. Why not "Button 2" and "Button 3"?
I advice to compile the sample code and make your own test:
- First click on "Button 1", "Button 2", "Button 3".
- Than click on "Press to change". Now you see "Button 1" get gray.
- Now press on "Button 1", "Button 2", "Button 3" and you will (hopefully) see what I mean, what is the bug...
|
Bug in RibbonBar?
|
sorry but I not understand the problem
if you press a button on a group this button became gray no the others ...
or I not understood your problem
ribbon run ok here
|
Bug in RibbonBar?
|
Also, when you click several times on the buttons, somethimes the bitmaps just disappear!!!.
|
Bug in SetCommState()
|
It seems that SetCommState() is not able to change the serial communication port baud rate.
Antonio, can you look at it? If you need a sample of the problem please let me know.
EMG
|
Bug in SetCommState()
|
Found! There are at least the following functions to fix:
[code:1663zlq9]#ifdef __HARBOUR__
CLIPPER BUILDCOMMDCB( PARAMS ) // () cInfoDef, @ cDeviceBlock --> lOk
#else
CLIPPER BUILDCOMMD( PARAMS ) // CB() cInfoDef, @ cDeviceBlock --> lOk
#endif
{
DCB dcb;
GetCommState( hCom, &dcb ); // EMG
#ifdef __FLAT__
if( BuildCommDCB( _parc( 1 ), &dcb ) ) // OK
#else
if( BuildCommDCB( _parc( 1 ), &dcb ) == 0 ) // OK
#endif
{
_storclen( ( char * ) &dcb, sizeof( dcb ), 2 );
_retl( TRUE );
}
else // Error
{
_storc( "", 2 );
_retl( FALSE );
}
}[/code:1663zlq9]
[code:1663zlq9]#ifdef __HARBOUR__
CLIPPER SETCOMMSTATE( PARAMS ) // ()
#else
CLIPPER SETCOMMSTA( PARAMS ) // TE()
#endif
{
#ifdef __FLAT__
_retl( SetCommState( hCom, ( DCB FAR * ) _parc( 2 ) ) != 0 ); // EMG
#else
_retl( SetCommState( ( DCB FAR * ) _parc( 1 ) ) == 0 );
#endif
}[/code:1663zlq9]
and obviously move up nCom definition.
EMG
|
Bug in SetCommState()
|
Enrico,
Thanks. I guess you declare hComm as static HANDLE hComm;
But the problem I see is that you can only manage one comm port at the same time, isn't it ?
|
Bug in SetCommState()
|
[quote="Antonio Linares":zdxnbp4x]Enrico,
Thanks. I guess you declare hComm as static HANDLE hComm;[/quote:zdxnbp4x]
No, you declared it that way. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
[quote="Antonio Linares":zdxnbp4x]But the problem I see is that you can only manage one comm port at the same time, isn't it ?[/quote:zdxnbp4x]
Yes, this is another problem. Why did you organize comm.c in such way?
EMG
|
Bug in SetCommState()
|
Enrico,
> No, you declared it that way.
You are totally right <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
> Why did you organize comm.c in such way?
It has been evolving since 16 bits days: Backwards compatibity, learning and improving, changes... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
|
Bug in SetCommState()
|
I know. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
There is one more problem: WriteComm() seems to [b:nfg0lvyw]not[/b:nfg0lvyw] stop the execution till the sending is completed. How to check if a sending is in progress or make WriteComm() to work sinchronously?
EMG
|
Bug in SetCommState()
|
Solved:
[code:49dsxbit]short int WriteComm( short int idComDev, void FAR * lpvBuf, short int cbWrite )
{
DWORD dwBytesWritten = cbWrite;
overlap.hEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); // EMG
dwEventsRead = WriteFile( hCom, lpvBuf, cbWrite, &dwBytesWritten, &overlap );
WaitForSingleObject( overlap.hEvent, INFINITE ); // EMG
GetOverlappedResult( hCom, &overlap, &dwBytesWritten, FALSE );
CloseHandle( overlap.hEvent ); // EMG
return ( ( short int ) dwBytesWritten );
}[/code:49dsxbit]
EMG
|
Bug in SetCommState()
|
Enrico,
I missed this one. Many thanks! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
|
Bug in SetCommState()
|
Thank you!
EMG
|
Bug in SetCommState()
|
I try to fix comm.c with the EMG code, but
i have compiling errors:
Progetto: WP32, Ambiente: BorlandWin:
[1]:Bcc32.Exe -M -c -O2 -tW -v- -X -DHB_FM_STATISTICS_OFF -DHB_NO_DEFAULT_API_MACROS -DHB_NO_DEFAULT_STACK_MACROS -DHB_OS_WIN_32 -Ic:\ut\fwh27\include -IC:\BCC55\Include;C:\xHxFw27\Include -nObj comm.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
comm.c:
Error E2451 comm.c 58: Undefined symbol 'hCom' in function BUILDCOMMD
Error E2451 comm.c 85: Undefined symbol 'hCom' in function SETCOMMSTA
*** 2 errors in Compile ***
I have FWH 2.7 December/2005
Directory di C:\ut\fwh27\source\winapi
16/05/2003 10.05 11.841 comm.c
|
Bug in SetCommState()
|
Put this just before OPENCOMM():
[code:3kdnqrxn]static HANDLE hCom = INVALID_HANDLE_VALUE;[/code:3kdnqrxn]
EMG
|
Bug in SetCommState()
|
Thanks, now works.
|
Bug in SetDate()
|
Hi Antônio,
SetDate(02,01,2006) returns 01/01/2006 why?
Fwh 2.7
Thanks.
|
Bug in SkinButtons()
|
This is the sample showing the problem. Pressing "Test" button the other one lost the skin effect:
[code=fw:3gobddgc]<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;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg, oBtn<br /><br /> SKINBUTTONS<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> @ <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Test"</span>;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oBtn:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBtn:<span style="color: #000000;">Enable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Close"</span>;<br /> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3gobddgc]
EMG
|
Bug in SkinButtons()
|
Enrico,
It seems as there is a painting state that we are not controlling yet.
As a workaround you can do:
[code=fw:39jdvf5p]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> @ <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Test"</span>;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oBtn:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBtn:<span style="color: #000000;">Enable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:39jdvf5p]
|
Bug in SkinButtons()
|
Antonio ,
there is another error
when I click on test button ( I click on many tries) the obtn is disable but then I CANNOT CLOSE THE DIALOG !!!!!
I try to click on "X" but it not run ok
the error not run when I click one on test button
to create the error you must click on test button many tries
then If you wait some seconds you can close the dialog
|
Bug in SkinButtons()
|
Any news?
EMG
|
Bug in SkinButtons()
|
Not yet <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
|
Bug in SkinButtons()
|
No problem, my friend. It's only a pity that such a wonderful option can't be used yet.
EMG
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.