topic
stringlengths
1
63
text
stringlengths
1
577k
Bug in Transparent Group
Antonio, You mean it works without any modification. I also use W7. When my example run it show like below. [img:2wvegxwf]http://www.objekt.com.tr/fwh_test/test.png[/img:2wvegxwf] When my sample lost focus, it is ok.
Bug in Transparent Group
On dialogs the previous code also works. As I said earlier, the modification was necessary only for groups on windows.
Bug in Transparent Group
Hi, I have no problem with fwh 9.11's TGroup class in dialogs or my modified 9.12 TGroup Class. Thanks,
Bug in Transparent Group
Antonio ?
Bug in Transparent Group
Hakan, With FWH 9.12 and the posted example, here it works fine on Windows 7. Please post an example if you have a wrong behavior, thanks
Bug in Transparent Group
Hi Antonio, Unfortunately, my previous example has the same error in my computer. I have the latest fwh 9.12 (I think). I don't want to change TGroup class everytime that I downloaded fwh. How Can I solve my problem.
Bug in Transparent Group
Hakan, There is a FWH 9.12 31 December build. Please download it and test it. If there is something wrong, please provide an example to reproduce it, thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in Transparent Group
Antonio, Result is the same. my sample is below. [code=fw:21j6f7ni]<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 />   <span style="color: #00C800;">local</span> oWnd<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oWnd <span style="color: #0000ff;">COLOR</span> CLR_WHITE,CLR_BLUE <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">400</span><br />   <br />   @ <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd TRANSPARENT<br />      <br />   @ <span style="color: #000000;">60</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd TRANSPARENT<br />      <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWnd <span style="color: #0000ff;">CENTER</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:21j6f7ni] First run of app, it has the same error, but when i click outside of the dialog it is OK.
Bug in Transparent Group
Hakan, You can do it this way: [code=fw:u4rmqdvi]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oGrp<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_WHITE, CLR_BLUE <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">400</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg TRANSPARENT<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;@ <span style="color: #000000;">60</span>, <span style="color: #000000;">20</span> GROUP oGrp <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg TRANSPARENT<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;oGrp:<span style="color: #000000;">bEraseBkGnd</span> = <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:u4rmqdvi]
Bug in Transparent Group
May I propose the following change to the EraseBkgnd method of TGroup? [code=fw:3jf7wya1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> EraseBkGnd<span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TGroup<br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'TDIALOG'</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">return</span> <span style="color: #00C800;">Super</span>:<span style="color: #000000;">EraseBkGnd</span><span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">else</span><br /><br />      <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bEraseBkGnd</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">return</span> Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bEraseBkGnd</span>, hDC <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br /><br />      <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lTransparent</span><br /><br />         <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span><br />            SetBrushOrgEx<span style="color: #000000;">&#40;</span> hDC, nBmpWidth<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span> - ::<span style="color: #000000;">nLeft</span>, nBmpHeight<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span> - ::<span style="color: #000000;">nTop</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br /><br />         FillRect<span style="color: #000000;">&#40;</span> hDC, GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">else</span><br />         FillRect<span style="color: #000000;">&#40;</span> hDC, GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:3jf7wya1] With this change, the earlier behavior for dialogs is retained and transparency on windows is improved. This does not break earlier code for transparent groups on dialogs. I have also found by experimentation that this code [code=fw:3jf7wya1]<div class="fw" id="{CB}" style="font-family: monospace;">         SetBrushOrgEx<span style="color: #000000;">&#40;</span> hDC, -::<span style="color: #000000;">nLeft</span>, -::<span style="color: #000000;">nTop</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:3jf7wya1] works exactly the same way as the following code. [code=fw:3jf7wya1]<div class="fw" id="{CB}" style="font-family: monospace;">         <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span><br />            SetBrushOrgEx<span style="color: #000000;">&#40;</span> hDC, nBmpWidth<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span> - ::<span style="color: #000000;">nLeft</span>, nBmpHeight<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span> - ::<span style="color: #000000;">nTop</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br /> </div>[/code:3jf7wya1] This can be tested and seen to produce the same results on bitmapped and non-bitmapped brushes. Why can't we adopt the former simpler code? Still there were some other issues with transparent painting earlier and now, which I shall express in another post.
Bug in Transparent Group
Rao, If we do: [code=fw:l0o18geq]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'TDIALOG'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">Super</span>:<span style="color: #000000;">EraseBkGnd</span><span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span><br />&nbsp; ...<br />&nbsp;</div>[/code:l0o18geq] then we are calling Class TControl Method EraseBkGnd() which does nothing for DATA lTransparent. No transparency is managed from there, unless I miss something... Very nice finding for: [code=fw:l0o18geq]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SetBrushOrgEx<span style="color: #000000;">&#40;</span> hDC, -::<span style="color: #000000;">nLeft</span>, -::<span style="color: #000000;">nTop</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:l0o18geq] thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in Transparent Group
Thanks Antonio, But I have lots of groups in my app. It will takes lots of time for me. [quote="Antonio Linares":2cdl70s1]Hakan, You can do it this way: [code=fw:2cdl70s1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oGrp<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_WHITE, CLR_BLUE <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">400</span><br />   <br />   @ <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg TRANSPARENT<br />      <br />   @ <span style="color: #000000;">60</span>, <span style="color: #000000;">20</span> GROUP oGrp <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg TRANSPARENT<br />      <br />   oGrp:<span style="color: #000000;">bEraseBkGnd</span> = <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span>   <br />      <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2cdl70s1][/quote:2cdl70s1]
Bug in Transparent Group
>> But I have lots of groups in my app. It will takes lots of time for me. >> Better to modify the TGroup class. Not your program code.
Bug in Transparent Group
Hi Rao, I have done it since it was changed. But I regularly update fwh every month. I don't want to check it that it was changed or not in every download. I prefer to use unchanged class files from original lib files. thank anyway.
Bug in WriteComm() [Fixed]
The following sample freezes if you change 32767 to 32768. Any ideas? [code=fw:2pm07gjp]<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 />    <span style="color: #00C800;">LOCAL</span> nCom := OPENCOMM<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"COM1"</span>, <span style="color: #000000;">16384</span>, <span style="color: #000000;">16384</span> <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">LOCAL</span> cDcb<br /><br />    BUILDCOMMDCB<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"COM1:57600,N,8,1"</span>, @cDcb <span style="color: #000000;">&#41;</span><br /><br />    SETCOMMSTATE<span style="color: #000000;">&#40;</span> nCom, cDcb <span style="color: #000000;">&#41;</span><br /><br />    ? WRITECOMM<span style="color: #000000;">&#40;</span> nCom, SPACE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">32767</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />    CLOSECOMM<span style="color: #000000;">&#40;</span> nCom <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:2pm07gjp] EMG
Bug in WriteComm() [Fixed]
Enrico Look <!-- m --><a class="postlink" href="https://books.google.es/books?id=kjyIOLYr7yMC&pg=PA299&lpg=PA299&dq=WRITECOMM&source=bl&ots=CNt5P_wPRV&sig=-blZ-EdPdD7OMMJG2nf8c9WsBAc&hl=es&sa=X&ei=yEYxVfPPO8Pj7QaoroDYDg&ved=0CE0Q6AEwCQ#v=onepage&q=WRITECOMM&f=false">https://books.google.es/books?id=kjyIOL ... MM&f=false</a><!-- m --> At end of Page 299
Bug in WriteComm() [Fixed]
Cristobal, thank you. EMG
Bug in bMMoved
In the following sample, nCol is correctly updated while moving the WINDOW but nRow is always zero:[code:1o5m8rxm]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oWnd DEFINE WINDOW oWnd; FROM 10,10 TO 20,70 SET MESSAGE OF oWnd oWnd&#58;bMoved = &#123; | nRow, nCol | oWnd&#58;SetMsg&#40; LTrim&#40; Str&#40; nRow &#41; &#41; + ", " + LTrim&#40; Str&#40; nCol &#41; &#41; &#41; &#125; ACTIVATE WINDOW oWnd RETURN NIL[/code:1o5m8rxm]EMG
Bug in bMMoved
you write oWnd:bMoved =... my by oWnd:bMMoved
Bug in bMMoved
bMoved is evaluated when the window is moving while bMMoved is evaluated when the mouse is moving. They are two different events.EMG
Bug in bMMoved
Enrico,You are right, nRow shows as zero. But curiously FWH source code seems to be fine. From the Windows API docs:WM_MOVE xPos = (int) LOWORD(lParam); // horizontal position yPos = (int) HIWORD(lParam); // vertical position And this is the FWH code:[code:19h3pm5m] case nMsg == WM_MOVE return &#58;&#58;Moved&#40; nLoWord&#40; nLParam &#41;, nHiWord&#40; nLParam &#41; &#41; [/code:19h3pm5m]Lets double check nLoWord() source code...
Bug in bMMoved
And nLoWord() source code seems to be fine.We have a mistery <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in bMMoved
Enrico,Fixed. It was a little bug in the low level source code. I email you the fixed lib, thanks
Bug in bMMoved
It seems that the code you cited is for XPP only, if I'm not wrong:[code:1m68lt1g]#ifdef __XPP__ METHOD HandleEvent&#40; nMsg, nWParam, nLParam &#41; CLASS TWindow[/code:1m68lt1g]EMG
Bug in bMMoved
[quote="Antonio Linares":3683wphd]Enrico, Fixed. It was a little bug in the low level source code. I email you the fixed lib, thanks[/quote:3683wphd]Thank you!EMG
Bug in bMMoved
[quote="Antonio Linares":4ia2vlv1]Enrico, Fixed. It was a little bug in the low level source code. I email you the fixed lib, thanks[/quote:4ia2vlv1]It works fine! Many thanks.EMG
Bug in bMMoved
This was already reported 9 october 2005 , also a error in fivewin.chON MOVE from dialog or window Hello, Trying to use ON MOVE , you can try Code: # include "fivewin.ch" FUNC MAIN LOCAL oWnd DEFINE WINDOW oWnd FROM 10,10 TO 20,70 SET MESSAGE OF oWnd TO "TEST ON MOVE" CLOCK DATE KEYBOARD NOINSET oWnd:bMoved := {|nRow,nCol|oWnd:setMsg(LTRIM(STR(nRow)) + " , " + LTRIM(STR(nCol)))} ACTIVATE DIALOG oWnd RETURN Notes : 1) The result is WRONG , nRow is always 0 2) Trying to use the ON MOVE clause can never do the same , nRow or nCol can't be used. It is only possible when fivewin.ch and dialog.ch are changed : <oWnd>:bMoved [ := \{ | nRow,nCol | <uMove> \} ], ; 3) I am convinced that this behaviour is a ERROR , i reported it already a few days ago . Why no response ???????? FrankEnrico Maria GiordanoI confirm the problem. Patricio Avalos Aguirre I confirm the problem. FWH 2.6, xHarbour 0.99.5, Borland 5.5 Saludos Patricio
Bug in brush gradient?
Another erratic problem: sometimes the dialog with the gradient suddenly becomes transparent (never saw under XP, only under Vista and Win7). Any ideas? EMG
Bug in brush gradient?
Can you make it more clear please? Does the dialog suddenly behave like a transparent dialog? Or the entire dialog becomes transparent showing the background behind the dialog like when using null brush? Can you post a sample code?
Bug in brush gradient?
[quote="nageswaragunupudi":ob5iwxg5]Can you make it more clear please? Does the dialog suddenly behave like a transparent dialog? Or the entire dialog becomes transparent showing the background behind the dialog like when using null brush?[/quote:ob5iwxg5] Yes, like null brush. [quote="nageswaragunupudi":ob5iwxg5]Can you post a sample code?[/quote:ob5iwxg5] Sorry, no. The problem is erratic. I can't reproduce it consistently in a sample. EMG
Bug in brush gradient?
Enrico, I'm using VISTA. I changed my Background-function and it works on Windows and Dialogs without Problem. As well it works perfect together with TFolderex-tabs. Maybe have a look at it ( extra Gradient-function ). [code=fw:2kbhn1ag]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//--------- Backgrounds ------------------------ </span><br /><br /><span style="color: #B900B9;">// c_path := CURDRIVE() + ":\" + GETCURDIR() </span><br /><br /><span style="color: #B900B9;">// Samples :</span><br /><br /><span style="color: #B900B9;">// ACTIVATE WINDOW oWnd MAXIMIZED ;</span><br /><span style="color: #B900B9;">// ON INIT WND_BRUSH( oWnd, ; // Object to fill</span><br /><span style="color: #B900B9;">// nWStyle, ; // 1=Color, 2=Gradient, 3=Brush, 4=Image, 5-7= Pred.-styles </span><br /><span style="color: #B900B9;">// lWGrad, ; // .T. = vertical, .F. = horizontal</span><br /><span style="color: #B900B9;">// nWColorF, ; // 1.Gradient- or plain Color with Style = 1</span><br /><span style="color: #B900B9;">// nWColorB, ; // 2. Gradient-color</span><br /><span style="color: #B900B9;">// nWGradPos, ; // Color-position 0 - 1</span><br /><span style="color: #B900B9;">// cWBrush, ; // Brush</span><br /><span style="color: #B900B9;">// cWImage ) // Image</span><br /><br /><span style="color: #B900B9;">// Embedded inside the Dialog, can be changed at Runtime</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">// DEFINE DIALOG oDlg SIZE 950, 600 OF oWnd PIXEL TRANSPARENT ;</span><br /><span style="color: #B900B9;">// FONT oFont1 TITLE 'Title / xBrowse and Border'</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">// for Brush and Image only Filename, no Path</span><br /><span style="color: #B900B9;">// WND_BRUSH( oDlg, nDStyle, lDGrad, nDColorF, nDColorB, nDPos, cDBrush, cDImage )</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">// ACTIVATE DIALOG oDlg CENTERED NOWAIT ;</span><br /><br /><span style="color: #00C800;">FUNCTION</span> WND_BRUSH<span style="color: #000000;">&#40;</span> cControl, nStyle, lDirect, nVColor, nBColor, nMove, cBrush, cImage <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">LOCAL</span> hDC, oBrush, oTmp<br /><span style="color: #00C800;">LOCAL</span> aRect := GETCLIENTRECT<span style="color: #000000;">&#40;</span> cControl <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> aGrad := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> nMove, nVColor, nBColor <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> nMove, nBColor, nVColor <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">IF</span> nStyle = <span style="color: #000000;">1</span> <span style="color: #B900B9;">// Color</span><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #0000ff;">COLOR</span> nVColor<br />    SET <span style="color: #0000ff;">BRUSH</span> <span style="color: #0000ff;">OF</span> cControl <span style="color: #0000ff;">TO</span> oBrush<br />    <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">BRUSH</span> oBrush<br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> nStyle = <span style="color: #000000;">2</span> <span style="color: #B900B9;">// Gradient</span><br />    hDC = CreateCompatibleDC<span style="color: #000000;">&#40;</span> cControl:<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />    hBmp = CreateCompatibleBitMap<span style="color: #000000;">&#40;</span> cControl:<span style="color: #000000;">hDC</span>, cControl:<span style="color: #000000;">nWidth</span>, cControl:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span><br />    hBmpOld = SelectObject<span style="color: #000000;">&#40;</span> hDC, hBmp <span style="color: #000000;">&#41;</span><br />    GradientFill<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, cControl:<span style="color: #000000;">nHeight</span>, cControl:<span style="color: #000000;">nWidth</span>, aGrad, lDirect <span style="color: #000000;">&#41;</span><br />    DeleteObject<span style="color: #000000;">&#40;</span> cControl:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">&#41;</span><br />    oBrush := TBrush<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> ,,,, hBmp <span style="color: #000000;">&#41;</span><br />    oBrush:<span style="color: #000000;">Cargo</span>  := aGrad<br />    SelectObject<span style="color: #000000;">&#40;</span> hDC, hBmpOld <span style="color: #000000;">&#41;</span><br />    cControl:<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    cControl:<span style="color: #000000;">SetBrush</span><span style="color: #000000;">&#40;</span> oBrush <span style="color: #000000;">&#41;</span><br />    <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">BRUSH</span> oBrush<br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> nStyle = <span style="color: #000000;">3</span> <span style="color: #B900B9;">// BMP-Brush</span><br />    <span style="color: #00C800;">IF</span> File<span style="color: #000000;">&#40;</span> c_path + <span style="color: #ff0000;">"<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\"</span> + cBrush )<br />        DEFINE BRUSH oBrush FILE c_path + "</span>\<span style="color: #0000ff;">Bitmaps</span>\<span style="color: #ff0000;">" + cBrush<br />        SET BRUSH OF cControl TO oBrush<br />        RELEASE BRUSH oBrush<br />    ELSE<br />        MsgAlert( "</span>Cannot load : <span style="color: #ff0000;">" + CRLF + ;<br />                 c_path + "</span>\<span style="color: #0000ff;">bitmaps</span>\<span style="color: #ff0000;">" + cDBrush, "</span>Error<span style="color: #ff0000;">" )   <br />    ENDIF<br />ENDIF<br />IF nStyle = 4 // Image<br />    IF File( c_path + "</span>\<span style="color: #0000ff;">bitmaps</span>\<span style="color: #ff0000;">" + cImage )<br />        DEFINE BRUSH oBrush FILE c_path + "</span>\<span style="color: #0000ff;">Bitmaps</span>\<span style="color: #ff0000;">" + cImage<br />        SET BRUSH OF cControl TO oBrush<br />        RELEASE BRUSH oBrush<br />    ELSE<br />        MsgAlert( "</span>Cannot load : <span style="color: #ff0000;">" + CRLF + ;<br />                 c_path + "</span>\<span style="color: #0000ff;">bitmaps</span>\<span style="color: #ff0000;">" + cDImage, "</span>Error<span style="color: #ff0000;">" )   <br />    ENDIF<br />ENDIF<br />IF nStyle = 5   // Style 1<br />    DEFINE BRUSH oBrush STYLE BORLAND <br />    SET BRUSH OF cControl TO oBrush<br />        RELEASE BRUSH oBrush<br />ENDIF<br />IF nStyle = 6   // Style 2<br />    DEFINE BRUSH oBrush STYLE BRICKS<br />    SET BRUSH OF cControl TO oBrush<br />        RELEASE BRUSH oBrush<br />ENDIF<br />IF nStyle = 7   // Style 3<br />    DEFINE BRUSH oBrush STYLE TILED<br />    SET BRUSH OF cControl TO oBrush<br />        RELEASE BRUSH oBrush<br />ENDIF<br /><br />RETURN NIL<br /></span></div>[/code:2kbhn1ag] Best Regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
Bug in brush gradient?
[quote="ukoenig":3fo7vusn]Enrico, I'm using VISTA. I changed my Background-function and it works on Windows and Dialogs without Problem.[/quote:3fo7vusn] Yes, I know. I'm unable to reproduce the problem too. But my clients do and they sent me a screenshot of the problem. EMG
Bug in brush gradient?
Enrico, Please post the screenshot if possible, thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in brush gradient?
Here it is: [img:3v8k13vu]http&#58;//www&#46;emagsoftware&#46;it/Transparent&#46;jpg[/img:3v8k13vu] EMG
Bug in brush gradient?
Mr. EMG Can we also know the FWH version used to build the application? I expect that the brush was created in the ON INIT clause using the logic that was popular till gradient brushes were introduced. I have a feeling that the way the gradient brushes were created in the init clause and the way the TBrush class compares a new brush with earlier brushes sometimes could result in destruction of the previous gradient brush. Can we also see a sample that shows your usual way of creating the gradient brush in the init clause? I *think* the present implementation of gradient/image brushes would not have such a problem.
Bug in brush gradient?
No, I'm using the present implementation as available in latest FWH release. EMG
Bug in brush gradient?
[quote="Enrico Maria Giordano":3itnxq10]No, I'm using the present implementation as available in latest FWH release. EMG[/quote:3itnxq10] Then we need to do more extensive tests with a number of gradient dialogs in one application. I suggest let us give ourselves some time for this.
Bug in brush gradient?
Ok, no problems. EMG
Bug in brush gradient?
I do not know if you need to help I use a gradient (first attempts), and sometimes I was going ... Then I removed the "IF" and now all ok STATIC FUNCTION GradBrush( oDlgK,difc,colfinA,colfinB,tgr ) local hDC, hBmp, hBmpOld,obrush * if Empty( oDlgK:oBrush:hBitmap ) hDC = CreateCompatibleDC( oDlgK:GetDC() ) hBmp = CreateCompatibleBitMap( oDlgK:hDC, oDlgK:nWidth, oDlgK:nHeight ) hBmpOld = SelectObject( hDC, hBmp ) GradColor( hDC, {0, 0, oDlgK:nHeight, oDlgK:nWidth-difc }, colfinA, colfinB,tgr ) // da TSBUTTON * Gradient( hDC, {0, 0, oDlgK:nHeight, oDlgK:nWidth }, rgb(250, 255, 255),colfinB ,.T. ) DeleteObject( oDlgK:oBrush:hBrush ) oDlgK:oBrush:hBitmap = hBmp oDlgK:oBrush:hBrush = CreatePatternBrush( hBmp ) SelectObject( hDC, hBmpOld ) oDlgK:ReleaseDC() * endif RETURN NIL Saluti Stefano
Bug in brush gradient?
Any news? EMG
Bug in buttonbar
In the following sample please try to move the mouse over the button and you will see that the text will move down (and also the bitmap, if present): [code=fw:2u29w1hk]<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> oWnd, oBar<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #000000;">2007</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">70</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Close"</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:2u29w1hk] EMG
Bug in buttonbar
Enrico, I tested Buttonbar, because of the new Font-changes. I couldn't notice this effect. The effect of Your specification is included in VTitle using > ANIMATE < on Mouse-Caption. Best Regards Uwe <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->
Bug in buttonbar
You have to use the latest FWH release (9.09) in order to see the problem. It wasn't there in the previous releases. EMG
Bug in buttonbar
Enrico, I found the Reason for it. With the new FWH 9.09, You can define [color=#FF0000:r19etpmu]Fonts for each Button [/color:r19etpmu]of a Buttonbar. It happens only with a not defined Button-Font once on Mouse-Caption. [img:r19etpmu]http&#58;//www&#46;pflegeplus&#46;com/pictures/Buttonb1&#46;jpg[/img:r19etpmu] That works now : DEFINE BUTTON oBtn1 OF oBar FILE c_path + "\system\format.bmp" MESSAGE "Test" ; ACTION ( oWnd:End() ) ; PROMPT "Test" [color=#FF0000:r19etpmu]FONT oBtnFont[/color:r19etpmu] oBtn1:SetColor( 0 ) // Black oBtn1:cToolTip := { " " + CRLF + ; "Test 1" + CRLF + ; "Test 2", "T E S T", 1, 0, 128 } Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Bug in buttonbar
This seems a possible fix (in paint method of TBtnBmp): [code=fw:1qb8wl0z]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lBarBtn</span><br />      ::<span style="color: #000000;">l2007</span> = ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">l2007</span><br />      <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oFont</span> == <span style="color: #00C800;">NIL</span><br />         <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oFont</span> != <span style="color: #00C800;">nil</span><br />            <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">cFaceName</span> != <span style="color: #ff0000;">"Tahoma"</span><br />               <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Tahoma"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-11</span><br />            <span style="color: #00C800;">endif</span><br />         <span style="color: #00C800;">else</span><br />             <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Tahoma"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-11</span><br />         <span style="color: #00C800;">endif</span><br />         ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// EMG</span><br />      <span style="color: #00C800;">else</span><br />         ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oFont</span> <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oFont</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// EMG</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">else</span></div>[/code:1qb8wl0z] EMG
Bug in buttonbar
I can confirm this exact same problem. I am using default fonts, and I notice that not all buttons change position. If you move the cursor across the full button bar, all icons will then line up properly. Pehaps this can be resolved in 9.10 ?
Bug in cGetFile()
This is a sample (try to select text.txt): [code:3mn2i1xt]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL cDir &#58;= REPLICATE&#40; "X", 128 &#41; LMKDIR&#40; cDir &#41; MEMOWRIT&#40; cDir + "\" + "test&#46;txt", "This is a test" &#41; ? CGETFILE32&#40; "All files &#40;*&#46;*&#41;|*&#46;*", "Select a file", , CURDRIVE&#40;&#41; + "&#58;\" + CURDIR&#40;&#41; + "\" + cDir &#41; RETURN NIL[/code:3mn2i1xt] The problem seems to be that the memory allocated for the selected path+filename is limited to 128 bytes while the maximum length allowed by the file system is 256. EMG
Bug in cGetFile()
I confirm: <!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=1843&highlight=cgetfile">http://fivetechsoft.com/forums/viewtopi ... t=cgetfile</a><!-- m --> BTW, in your source you use cGetFile32. Roman
Bug in cGetFile()
Ops, sorry. Anyway, same behaviour. EMG
Bug in cGetFile()
Hello! [quote:3dyd4cu3]... while the maximum length allowed by the file system is 256.[/quote:3dyd4cu3] "How can I use path names longer than 255 characters?" <!-- m --><a class="postlink" href="http://www.windowsitpro.com/Article/ArticleID/14607/14607.html">http://www.windowsitpro.com/Article/Art ... 14607.html</a><!-- m --> [quote:3dyd4cu3]A. Windows NT has a maximum path size defined as MAX_PATH which is 255 characters. It is possible to use more characters by calling the wide (W) version of CreateFile and prefixing "\\?\" to the path. The "\\?\" tells the function to turn off path parsing. This lets you use paths that are nearly 32,000 Unicode characters long. You must use fully-qualified paths with this technique. This also works with UNC names. The "\\?\" is ignored as part of the path. For example, "\\?\D:\documents\faq.txt" is seen as "D:\documents\faq.txt". Programs expecting to find legal file lengths may fall over attempting to open a file with a long path. If, for example the buffer they are putting the path into expects a legal file length.[/quote:3dyd4cu3] <!-- m --><a class="postlink" href="http://www.osronline.com/showThread.CFM?link=91868">http://www.osronline.com/showThread.CFM?link=91868</a><!-- m --> [quote:3dyd4cu3]The maximum length of a file/folder is a problem. Almost everything in Windows uses a MAXIMUM_FILENAME_LENGTH of 256 and MAX_PATH of 260. But there is also a MAXPATHLEN parameter which is 1024. Any single element of the path is limited to 255 characters. But the Unicode versions of several functions permit a maximum path length of 32,767 characters, composed of components up to 255 characters in length. To specify such a path, use the "\\?\" prefix. For example, "\\?\D:\<path>". But many functions don't handle this. So 260 *usually* works, but 32K is guaranteed to work. (Note that this is characters, not bytes -- each Unicode character is 2 bytes.)[/quote:3dyd4cu3] <!-- m --><a class="postlink" href="http://www.cygwin.com/ml/cygwin/2004-10/msg01330.html">http://www.cygwin.com/ml/cygwin/2004-10/msg01330.html</a><!-- m --> [quote:3dyd4cu3]CreateFileA on an nt-based system just converts all strings from MBCS to Unicode via the current locale's code page, and then calls CreateFileW. CreateFileA is always limited to MAX_PATH. On Win98/WinME, it works differently. There is no routine called NtCreateFile. CreateFileW is a dummy routine that always returns an error, unless you link with the Microsoft Layer for Unicode (Unicows.dll). Unicows.dll translates all UNICODE argument strings to the current code page, and calls CreateFileA. So you can always link with CreateFileW, since it always exists, but it may not be functional. The special \\?\ prefix doesn't do what you want on Win9x systems, as you always go through CreateFileA, so paths are always limited to MAX_PATH.[/quote:3dyd4cu3] <!-- m --><a class="postlink" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp">http://msdn.microsoft.com/library/defau ... a_file.asp</a><!-- m --> Roman
Bug in cGetFile()
[quote="EnricoMaria":2mvwg39g]The problem seems to be that the memory allocated for the selected path+filename is limited to 128 bytes while the maximum length allowed by the file system is 256.[/quote:2mvwg39g] Replacing all 128 to 256 and all 127 to 255 in getfile.c solves the problem. EMG
Bug in cGetFile()
Enrico, Thanks! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Bug in cGetFile()
The maximum number of characters in a full path, including the drive letter, colon, leading backslash, file name, and terminating null character, is 260.
Bug in cGetFile()
I confirm, you are right. EMG
Bug in cGetFile()
In the following sample, if you select a file in another directory, the next time you run the sample, the other directory is shown instead of the current directory. Any workaround? [code=fw:17ivujbn]<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; CGETFILE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"All files (*.*)|*.*"</span>, <span style="color: #ff0000;">"Select a file"</span>, , CURDRIVE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">":<span style="color: #000000;">\"</span> + CURDIR() )<br /><br />&nbsp; &nbsp; RETURN NIL</span></div>[/code:17ivujbn] EMG
Bug in cGetFile()
Enrico, We are using the flag OFN_NOCHANGEDIR: [url:oxuobs33]https&#58;//msdn&#46;microsoft&#46;com/en-us/library/windows/desktop/ms646839(v=vs&#46;85)&#46;aspx[/url:oxuobs33] [quote:oxuobs33]Restores the current directory to its original value if the user changed the directory while searching for files. This flag is ineffective for GetOpenFileName[/quote:oxuobs33] so it seems as it is a GetOpenFileName() bug
Bug in cGetFile()
Most likely. EMG
Bug in cGetFile()
Is there any fix for this? I want a certain default directory but I can't rely on it. I created an Outlook signature program and I expect it to default to the correct user profile area. If user changes drive/folder then the next time the user cannot updated or add signature correctly. Try telling user to change c:\Users\+[ProfileName]+\AppData\Roaming\Microsoft\Signatures\ if Windows 7 or c:\Users\+[ProfileName]+\Application Data\Microsoft\Signatures\ if Windows 8/10.
Bug in cGetFile()
I followed the link to openfilename in msdn and I read that OFN_NOCHANGEDIR does not work for GetOpenFIlename see quote below. Is there another way? [quote:1v6t7quk]Restores the current directory to its original value if the user changed the directory while searching for files. This flag is ineffective for GetOpenFileName.[/quote:1v6t7quk]
Bug in cGetFile()
A possible solution is to save the current directory using GetCurDir() before calling cGetFile() and restore it later using SetCurDir()
Bug in cGetFile()
This would not solve the problem. cGetFile() would continue to show the changed directory. Is not the current directory of the application that changes, is the directory shown by cGetFile(). Anyway, I just tried your suggestion and it doesn't work. EMG
Bug in cGetFile()
I saw the solution googling for info about it but I had not tried it, so many thanks Enrico for your feedback Stackoverflow seems the right way to look into for a possible solution
Bug in cGetFile32() (no bug)
I have try to use the cGetfile32() Function and it will not work. The Function cGetfile() Works but not the 32 bit Version. When I call the cGetfile32() Function it will display the Dialog Screen and the Screen works and Displays, but when you try to pick a file it will not return to the calling program leaveing the function running along with the calling program. Now the cGetFile() file work's. I am using Fivewin 2.7 the November Build xHarbour Builder from xHarbour.com the October Build. Have try the xHarbour version that came with Fivewin. Thank you Jim Bohanan <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Bug in cGetFile32() (no bug)
Jim, cGetfile32() is just for FiveWin 16 bits. For FWH 32 bits you have to use cGetFile().
Bug in checkbox in folder (dot border) with themes (fixed)
Hola Antonio, este codigo muestra un error que tiene hace tiempo fwh con los checkbox cuando estan contenidos en folder, si empiezas a presionar la tecla tab para moverte entre los controls del dialogo miraras que la primera vez quel el chekbox obtenga foco no mostrara el tipico borde punteado, la siguiente ves lo tomara pero al perder el foco mantiene el borde. esto no ocurre cuando no aplicas el tema de winxp. [code:158exehw] //win32&#46;prg #include "fivewin&#46;ch" PROCEDURE Main&#40;&#41; LOCAL oDlg, oFolder LOCAL cVar0, cVar1, cVar2, lVar1, lVar2 cVar0 &#58;= space&#40;10&#41; cVar1 &#58;= space&#40;20&#41; cVar2 &#58;= space&#40;20&#41; lVar1 &#58;= &#46;t&#46; lVar2 &#58;= &#46;t&#46; DEFINE DIALOG oDlg NAME "Main" REDEFINE GET cVar0 ID 101 OF oDlg REDEFINE FOLDER oFolder ID 102 OF oDlg ; PROMPT "&Uno", "&Dos" ; DIALOGS "Page1", "Page2" REDEFINE GET cVar1 ID 101 OF oFolder&#58;aDialogs&#91;1&#93; REDEFINE CHECKBOX lVar1 ID 102 OF oFolder&#58;aDialogs&#91;1&#93; REDEFINE GET cVar2 ID 101 OF oFolder&#58;aDialogs&#91;2&#93; REDEFINE CHECKBOX lVar2 ID 102 OF oFolder&#58;aDialogs&#91;2&#93; REDEFINE BUTTON ID 103 OF oDlg ACTION oDlg&#58;end&#40;&#41; ACTIVATE DIALOG oDlg CENTERED RETURN NIL [/code:158exehw] [code:158exehw] //win32&#46;rc 1 24 "winxp&#46;man" main DIALOG 8, 53, 262, 200 STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Error de Checkbox en folder" FONT 8, "MS Sans Serif" &#123; LTEXT "Codigo", -1, 9, 8, 32, 8 EDITTEXT 101, 43, 8, 53, 12 CONTROL "", 102, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 4, 27, 256, 151 PUSHBUTTON "Cerrar", 103, 210, 182, 50, 14 &#125; Page1 DIALOG 6, 15, 161, 114 STYLE 0x4L | WS_CHILD | WS_VISIBLE FONT 8, "MS Sans Serif" &#123; LTEXT "Codigo", -1, 9, 9, 30, 8 EDITTEXT 101, 36, 9, 51, 12 CHECKBOX "Casado", 102, 37, 24, 49, 12, BS_AUTOCHECKBOX | WS_TABSTOP &#125; Page2 DIALOG 6, 15, 161, 114 STYLE 0x4L | WS_CHILD | WS_VISIBLE FONT 8, "MS Sans Serif" &#123; LTEXT "Codigo", -1, 9, 9, 30, 8 EDITTEXT 101, 36, 9, 51, 12 CHECKBOX "Casado", 102, 37, 24, 49, 12, BS_AUTOCHECKBOX | WS_TABSTOP &#125; [/code:158exehw]
Bug in checkbox in folder (dot border) with themes (fixed)
caba aclarar con fwh 2.6, xharbour y harbour, bcc55. una imagen del problema [url=http&#58;//img274&#46;imageshack&#46;us/my&#46;php?image=bug5ur&#46;jpg:3kkvow0i][img:3kkvow0i]http&#58;//img274&#46;imageshack&#46;us/img274/4716/bug5ur&#46;th&#46;jpg[/img:3kkvow0i][/url:3kkvow0i] salu2 carlos vargas[/url]
Bug in checkbox in folder (dot border) with themes (fixed)
Carlos, El build de Febrero de FWH soluciona este problema. Hemos tardado en cazarlo, pero al final lo hemos conseguido <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Bug in checkbox in folder (dot border) with themes (fixed)
Gracias Antonio, <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> ya empezaba a temer que lo hubieras olvidado, o que estuviera dificil la cosa <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->, no es posible modificar los fuentes ? salu2 gracias carlos vargas
Bug in checkbox in folder (dot border) with themes (fixed)
Carlos, En FWH 2.7 Febrero se han implementado muchos cambios, sin embargo esto puede solucionarlo, En el método Colors( hDC ) de checkbox y radio, hay que implementar este cambio: [code:3ni5wgpo] METHOD Colors&#40; hDC &#41; CLASS &#46;&#46;&#46; &#46;&#46;&#46; if IsAppThemed&#40;&#41; DrawPBack&#40; &#58;&#58;hWnd, hDC &#41; endif return &#58;&#58;oBrush&#58;hBrush [/code:3ni5wgpo]
Bug in checkbox in folder (dot border) with themes (fixed)
gracias antonio, funciono de esta forma (solo en xharbour) [code:pscbmbt1] &#46;&#46;&#46; /*al inicio de la aplicación*/ EXTEND CLASS TRADIO WITH METHOD Colors EXTEND CLASS TCHECKBOX WITH METHOD Colors &#46;&#46;&#46; [/code:pscbmbt1] [code:pscbmbt1] /*en cualquier parte &#58;-&#41;*/ STATIC FUNCTION Colors&#40; hDC &#41; LOCAL SELF &#58;= HB_QSelf&#40;&#41; IF IsAppThemed&#40;&#41; DrawPBack&#40; &#58;&#58;hWnd, hDC &#41; ENDIF RETURN &#58;&#58;oBrush&#58;hBrush [/code:pscbmbt1] salu2 carlos vargas
Bug in checkbox in folder (dot border) with themes (fixed)
Antonio, si bien se corrigio el problema de borde puntedo en el checkbox cuando tienes temas aplicados en winxp, cuando no tiene tema aparece dentro de la region del borde un color blanco de fondo. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> salu2 carlos vargas
Bug in checkbox in folder (dot border) with themes (fixed)
Carlos, Hemos probado el ejemplo samples\TestFold.prg con y sin temas y está bien. De todas formas hemos implementado una serie de cambios que publicaremos en el build de Marzo.
Bug in clausula WHEN
Miren te comportamiento: DEFINE DIALOG oWnd SIZE 300,300 @1,1 BUTTON oBtn ACTION "HOLA" OF oDlg oBtn:Disable() ACTIVATE DIALOG oDlg Se puede observar que el boton es desactivado. Ahora, si le añadimos la clausula WHEN al boton, ya NO ESTA DISABLE() No me digas que lo meta en el ACTIVATE , porque es ya ilegible de la cantidad de cosas que hay que hacer antes del activate... ¿ Alguna solución ?
Bug in clausula WHEN
Rafa, Antes del ACTIVATE el botón no tiene un handle válido de control, por lo que no se puede disable
Bug in clausula WHEN
[quote="Antonio Linares":20t4xyw4]Rafa, Antes del ACTIVATE el botón no tiene un handle válido de control, por lo que no se puede disable[/quote:20t4xyw4] Antonio, no te has percatado que si no tienes la clausula WHEN SI QUE FUNCIONA!!! Si le pones la clausula NO FUNCIONA... ¿ capichi.... ? jejeje
Bug in clausula WHEN
Rafa, Al enviarle el mensaje Disable() desde PRG se le está enviando un mensaje a bajo nivel con SendMessage() de Windows, que entrá en la cola de mensajes de Windows. Depende de los mensajes pendientes que llegue ó no a procesarse, pues antes tiene que tener un handle valido No es fácil de explicar <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in clausula WHEN
[quote="Antonio Linares":2wbfomtu]Rafa, Al enviarle el mensaje Disable() desde PRG se le está enviando un mensaje a bajo nivel con SendMessage() de Windows, que entrá en la cola de mensajes de Windows. Depende de los mensajes pendientes que llegue ó no a procesarse, pues antes tiene que tener un handle valido No es fácil de explicar <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:2wbfomtu] Osease, que me estas diciendo, que ahora, depende de los eventos del sistema operativo, puede que NO ME FUNCIONE SIN LA CLAUSULA WHEN ? Vaya hombre, ahora me va a tocar deshacer lo hecho....
Bug in clausula WHEN
Si haces el <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->isable() desde el ON INIT te aseguras de que tiene un handle válido y que el mensaje le va a llegar al control
Bug in clausule COLORLEFT
At moment for new implementation of your code and only if you use clausule COLORLEFT <color> If you use COLORLEFT <color1>, <color2>, not change Please, change in MENU.CH [quote:2rr7lotn] [ <oObjMenu> := ] MenuBegin( <.popup.>,, <oCtrl>, <.l2007.>, <.l2010.>,,; //<.lUnicode.> <nClrMenu>, <nClrMenutxt>, ; [b:2rr7lotn]<nClrBkBa>, <nClrToBa>[/b:2rr7lotn], <nClrHiLi>, <nClrHiLf>, ; <nClrHitx>, <nClrHiBr>, <.lMenuBar.>, <oFont>, ; <.lColors.>, <.lVert.>, <.l2013.>, <.l2015.>, ; [!<.lNoBorder.>], <nClrToBr> ,<nClrBkBr>, <nRightSp>,; <nFactor>, <nHeight>, [!<.lInherit.>], <.lInvert.>,; <nRound>, <.lUpper.> ) // lUpper is implemented in next version [/quote:2rr7lotn]
Bug in combobox
In the following sample it's impossible to move the focus from the combobox using TAB o ENTER: [code:16a0553n]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oDlg LOCAL cVar &#58;= SPACE&#40; 20 &#41; DEFINE DIALOG oDlg @ 1, 1 COMBOBOX cVar; ITEMS &#123; "First", "Second", "Third" &#125;; STYLE CBS_DROPDOWN @ 3, 1 BUTTON "&Close" ACTION oDlg&#58;End&#40;&#41; ACTIVATE DIALOG oDlg; CENTER RETURN NIL[/code:16a0553n] EMG
Bug in combobox
Enrico, Indeed, and it is not the only one. In the FWH version prior to 7.09, one could choose an item in a combobox, using the first character. In your example, choosing used to be possible by typing a "F", "S" or "T". Since FWH version 7.09, that isn't possible anymore. Therefor I still use the combobox class of FWH 7.04. Maybe Antonio can use both our problems. Thanks.
Bug in combobox
Enrico, Fixed, several changes are required: Class TGet Method KeyChar: [code:28689k8j] if &#58;&#58;bKeyChar != nil if Eval&#40; &#58;&#58;bKeyChar, nKey, nFlags, Self &#41; == 0 return 0 endif endif [/code:28689k8j] Class TComboBox: [code:28689k8j] &#58;&#58;oGet&#58;bKeyChar = &#123; | nKey | If&#40; nKey == VK_TAB &#46;or&#46; nKey == VK_RETURN,; &#40; &#58;&#58;oWnd&#58;GoNextCtrl&#40; &#58;&#58;hWnd &#41;, 0 &#41;, &#41; &#125; [/code:28689k8j]
Bug in combobox
Michel, The problem is that following the advise of a FW user, incremental search was implemented on comboboxes and that browse backwards compatibility. Should we avoid the incremental search feature and restore Windows default behavior there ? Or allow the incremental search as an optional clause ? <!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=6882&start=0&postdays=0&postorder=asc&highlight=incremental">http://fivetechsoft.com/forums/viewtopi ... ncremental</a><!-- m -->
Bug in combobox
My personal opinion is that by default we should provide Windows default behavior. That is how generally users expect any windows software to behave. Incremental search has its own benefits and can be offered as an option. For consideration
Bug in combobox
Antonio, I agree with nageswaragunupudi, windows standard behavior should be the standard of fivewin. Enhanced incremental search should be optional, it can be a very useful feature. In TCombobox, where must the patch be inserted ?
Bug in combobox
Stefan, Lines 247 and 320
Bug in combobox
Ok, thanks
Bug in comm.c
The following sample freezes with the latest FWH (it worked ok with a previous FWH release): [code:nsmajxg0]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oDlg LOCAL oGet, cTxt &#58;= "" LOCAL nCom DEFINE DIALOG oDlg; SIZE 500, 500; TITLE "Terminal" @ 0, 0 GET oGet VAR cTxt MEMO oGet&#58;bKeyDown = &#123; | nKey | Tasti&#40; nCom, nKey &#41; &#125; oGet&#58;bKeyChar = &#123; | nKey | 0 &#125; ACTIVATE DIALOG oDlg; ON INIT &#40; oGet&#58;Move&#40; 0, 0, 500, 500 &#41;,; nCom &#58;= APRICOM&#40; oDlg, oGet &#41;,; IF&#40; nCom < 0, oDlg&#58;End&#40;&#41;, &#41; &#41;; CENTER IF nCom >= 0; CLOSECOMM&#40; nCom &#41;; ENDIF RETURN NIL STATIC FUNCTION TASTI&#40; nCom, nKey &#41; SENDSTR&#40; nCom, CHR&#40; nKey &#41; &#41; RETURN NIL STATIC FUNCTION APRICOM&#40; oDlg, oGet &#41; LOCAL nCom, cDcb BEGIN SEQUENCE nCom = OPENCOMM&#40; "COM1", 16384, 16384 &#41; IF nCom < 0 ? "Errore di apertura della porta di comunicazione&#46;" BREAK ENDIF BUILDCOMMDCB&#40; "COM1&#58;115200,N,8,1", @cDcb &#41; IF !SETCOMMSTATE&#40; cDcb &#41; ? "Errore di impostazione della porta di comunicazione&#46;" BREAK ENDIF oDlg&#58;bCommNotify = &#123; | nCom | Connect&#40; nCom, oGet &#41;,; EnableCommNotification&#40; nCom, oDlg&#58;hWnd, 1, -1 &#41; &#125; IF !ENABLECOMMNOTIFICATION&#40; nCom, oDlg&#58;hWnd, 1, -1 &#41; ? "Errore di abilitazione della notifica&#46;" BREAK ENDIF RECOVER nCom = -1 END SEQUENCE RETURN nCom STATIC FUNCTION CONNECT&#40; nCom, oGet &#41; ENABLECOMMNOTIFICATION&#40; nCom, 0, 1, -1 &#41; oGet&#58;Append&#40; RECEIVESTR&#40; nCom &#41; &#41; RETURN NIL STATIC FUNCTION SENDSTR&#40; nCom, cString &#41; LOCAL nBytes &#58;= WRITECOMM&#40; nCom, cString &#41; RETURN nBytes = 0 &#46;OR&#46; nBytes = LEN&#40; cString &#41; STATIC FUNCTION RECEIVESTR&#40; nCom &#41; LOCAL cBuf &#58;= SPACE&#40; 1000 &#41; RETURN LEFT&#40; cBuf, READCOMM&#40; nCom, @cBuf &#41; &#41;[/code:nsmajxg0] EMG
Bug in comm.c
Enrico, FWH COMM functions are still buggy. They should not be used <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Bug in comm.c
It maybe but it seems to be worst in the latest release. I can send you the latest working comm.c if you want. EMG
Bug in comm.c
Enrico, Yes, please email me the comm.c that was working for you. Thanks.
Bug in comm.c
Enrico, Yes, please replace the actual comm.c with the previous one. We thought it was going to provide a better functionality, but no, things get worse. I don't want to blame MS but I can't understand how they don't provide this functionality built-in as it was on 16 bits, same as there is no a DrawBitmap() for a GUI since the early days of Windows... Thats why we were doing some research on mscomm32.ocx
Bug in comm.c
[quote="Antonio Linares":10dgvm95]Enrico, Yes, please replace the actual comm.c with the previous one. We thought it was going to provide a better functionality, but no, things get worse.[/quote:10dgvm95] I already done so. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [quote:10dgvm95]I don't want to blame MS but I can't understand how they don't provide this functionality built-in as it was on 16 bits, same as there is no a DrawBitmap() for a GUI since the early days of Windows...[/quote:10dgvm95] I agree. The MS guy who designed the API layer did not make a good work for me. [quote:10dgvm95]Thats why we were doing some research on mscomm32.ocx[/quote:10dgvm95] I would prefer the current APIs that don't need any additional component. EMG
Bug in comm.c
Enrico, > I would prefer the current APIs that don't need any additional component. Me too. Anyhow, lets work to properly implement COMM support for 32 bits.
Bug in filename.prg
The functions cFileNoPath() and cFileSubDir() have been changed so now they don't return uppercase string anymore. Can I revert that changes? EMG
Bug in folder
When I delete a page from the folder the groupbox in one of the reamaining pages bug's Before delete = Right <!-- m --><a class="postlink" href="http://www.imagebam.com/image/37952535768261">http://www.imagebam.com/image/37952535768261</a><!-- m --> After delete = Wrong <!-- m --><a class="postlink" href="http://www.imagebam.com/image/7ddd8b35768265">http://www.imagebam.com/image/7ddd8b35768265</a><!-- m --> Other "bug" is that the folder class don't have a visual effect to show if a page is enabled or not. Edited: changed the link to the images, the other "bug" has been explained.
Bug in folder
Sambomb, Your posted pictures are not visible. Please repost them, thanks > Other "bug" is that the folder class don't have a visual effect to show if a page is enabled or not. > It is not a bug. The Windows API does not provide it.
Bug in font management? [Solved]
In the sample below, uncommenting the first PROMPT clause the font is reverted to the default one: [code=fw:1gqduvoh]<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 />    <span style="color: #00C800;">LOCAL</span> oDlg, oFnt<br /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFnt <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-9</span><br /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<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;">INIT</span> TOOLBAR<span style="color: #000000;">&#40;</span> oDlg, oFnt <span style="color: #000000;">&#41;</span>;<br />             <span style="color: #0000ff;">CENTER</span><br /><br />    <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFnt<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> TOOLBAR<span style="color: #000000;">&#40;</span> oDlg, oFnt <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #000000;">2007</span><br /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oDlg:<span style="color: #000000;">oBar</span>;<br /><span style="color: #B900B9;">//           PROMPT "Test"</span><br /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oDlg:<span style="color: #000000;">oBar</span>;<br />           <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Test"</span>;<br />           <span style="color: #0000ff;">FONT</span> oFnt<br /><br />    <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:1gqduvoh] EMG
Bug in font management? [Solved]
Enrico, I think it is not a font bug but a TbtnBmp bug. As there is a prompt in the first button, a default font is created, and then on the next button the new used font is not taken into account. I need to finish the new Class TBtnBmp Method Paint (I am reorganizing it) and it will be much easier to solve it.
Bug in font management? [Solved]
Enrico, Please look for hOldFont in Class TBtnBmp where it is assigned and change it this way: hOldFont = SelectObject( ::hDC, ::oFont:hFont ) That solves it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->