topic
stringlengths
1
63
text
stringlengths
1
577k
Bug in TSay
This looks as a right fix for rpreview.prg: [code:29dtlwhn] if ! IsAppThemed() oPage:VarPut( TXT_PAGENUM + LTrim( Str( nPage, 4, 0 ) ) + " / " + ; LTrim( Str( Len( aFiles ) ) ) ) else oPage:SetText( TXT_PAGENUM + LTrim( Str( nPage, 4, 0 ) ) + " / " + ; LTrim( Str( Len( aFiles ) ) ) ) endif [/code:29dtlwhn] In all places where oPage:SetText() was called.
Bug in TSay
Or just remove [code:olfi74d6]oBar:Refresh()[/code:olfi74d6] EMG
Bug in TSay
Enrico, But if a window is moved over the preview, then it will have the same effect as calling :Refresh()
Bug in TSay
[quote="Antonio Linares":fqzbybyx]Enrico, But if a window is moved over the preview, then it will have the same effect as calling :Refresh()[/quote:fqzbybyx] You are right. Instead try to replace [code:fqzbybyx]@ 7, 370 SAY oPAGE PROMPT cPageNum ;[/code:fqzbybyx] with [code:fqzbybyx]@ 7, 370 SAY oPAGE PROMPT TXT_PAGENUM+ltrim(str(nPage,4,0)) + " / " + ltrim(str(len(aFiles))) ;[/code:fqzbybyx] EMG
Bug in TSay
Enrico, Yes, thats a better solution. Thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in TScrollBar
This is a sample of the problem. Please drag the scrollbar thumb to the middle of the scrollbar itself. Then look at the number in the DIALOG title (it is the scrollbar position). Then click below the thumb to step one page down and look at the number again. It is unchanged while it should be +10. If you click again then the number is increased. [code:2j9te57g]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oDlg, oScr DEFINE DIALOG oDlg oScr = TScrollBar&#40;&#41;&#58;New&#40; 0, 0, 0, 255, 10, &#46;T&#46;, oDlg, 10, 50,; &#123; || oDlg&#58;cTitle &#58;= LTrim&#40; Str&#40; oScr&#58;GetPos&#40;&#41; &#41; &#41; &#125;,; &#123; || oDlg&#58;cTitle &#58;= LTrim&#40; Str&#40; oScr&#58;GetPos&#40;&#41; &#41; &#41; &#125;,; &#123; || oDlg&#58;cTitle &#58;= LTrim&#40; Str&#40; oScr&#58;GetPos&#40;&#41; &#41; &#41; &#125;,; &#123; || oDlg&#58;cTitle &#58;= LTrim&#40; Str&#40; oScr&#58;GetPos&#40;&#41; &#41; &#41; &#125; &#41; oScr&#58;bTrack = &#123; | nPos | oScr&#58;SetPos&#40; nPos &#41;,; oDlg&#58;cTitle &#58;= LTrim&#40; Str&#40; oScr&#58;GetPos&#40;&#41; &#41; &#41; &#125; ACTIVATE DIALOG oDlg; CENTER RETURN NIL[/code:2j9te57g] EMG
Bug in TScrollBar
Enrico, This code looks equivalent and seems to work ok: [code:24wdt9u2] @ 0, 0 SCROLLBAR oScr ; VERTICAL ; RANGE 0, 255 ; PAGESTEP 10 ; SIZE 10, 50 ; ON UP oDlg&#58;cTitle &#58;= LTrim&#40; Str&#40; oScr&#58;GetPos&#40;&#41; &#41; &#41; ; ON DOWN oDlg&#58;cTitle &#58;= LTrim&#40; Str&#40; oScr&#58;GetPos&#40;&#41; &#41; &#41; ; ON PAGEUP oDlg&#58;cTitle &#58;= LTrim&#40; Str&#40; oScr&#58;GetPos&#40;&#41; &#41; &#41; ; ON PAGEDOWN oDlg&#58;cTitle &#58;= LTrim&#40; Str&#40; oScr&#58;GetPos&#40;&#41; &#41; &#41; ; ON THUMBPOS &#40; oScr&#58;SetPos&#40; nPos &#41;, oDlg&#58;cTitle &#58;= LTrim&#40; Str&#40; oScr&#58;GetPos&#40;&#41; &#41; &#41; &#41; [/code:24wdt9u2]
Bug in TScrollBar
Enrico, Do you mean that the first pagedown click after the drag & drop, does not respond ?
Bug in TScrollBar
Exactly. EMG
Bug in TScrollBar [Solved]
The following methods of TScrollBar should modified as below: [code=fw:1hfwqp7u]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #00C800;">METHOD</span> PageUp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span>  ::<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - ::<span style="color: #000000;">nPgStep</span> <span style="color: #000000;">&#41;</span>,;<br />                           <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bPageUp</span> != <span style="color: #00C800;">nil</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bPageUp</span> <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> PageDown<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span>  ::<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + ::<span style="color: #000000;">nPgStep</span> <span style="color: #000000;">&#41;</span>,;<br />                             <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bPageDown</span> != <span style="color: #00C800;">nil</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bPageDown</span> <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span></div>[/code:1hfwqp7u] The reason is that they are currently different from the other similar method: they set the new position [b:1hfwqp7u]after[/b:1hfwqp7u] evaluating the codeblock. With my change they act as the other methods (GoUp(), etc.). EMG
Bug in TScrollBar [Solved]
Enrico, I wonder if we will break backwards compatibility with such change. Also, if the scrollbar position is changed from those codeblocks, then the scrollbar will not be updated. I am not against such change. Just thinking about possible side effects...
Bug in TScrollBar [Solved]
Yes, but the other codeblocks are already reversed, If I'm not wrong. EMG
Bug in TTray
In testtray.prg, try to run it and hit ALT-F4. You will end up with a running app that can only be terminated using Task Manager. EMG
Bug in TTray.prg
Antonio, at a certain point, between 7.09 and 9.05 (probably here <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=12421">viewtopic.php?f=3&t=12421</a><!-- l -->) you commented out WS_DISABLED [code=fw:2htui016]<div class="fw" id="{CB}" style="font-family: monospace;">  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> ::<span style="color: #000000;">oWnd</span> <span style="color: #0000ff;">STYLE</span> NOR<span style="color: #000000;">&#40;</span> WS_POPUP <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #B900B9;">// , WS_DISABLED</span><br />  <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> ::<span style="color: #000000;">oWnd</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:2htui016] This makes the trayed program appearing in the list of opened programs (ALT+TAB) while nothing happens if you select it. Also, this makes "screen readers" used by blind persons detecting an empty window (and the program is no more accessible for them) Hi, Davide
Bug in TTray.prg
Davide, Style restored for next FWH 9.10 build, thanks for your feedback <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in TTrayIcon (64bit)
The sample testtray.prg doesn't show any icons in the tray area (FWH 64bit). Any ideas? EMG
Bug in TTrayIcon (64bit)
Up. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
Bug in TTrayIcon (64bit)
Any news? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
Bug in TTrayIcon (64bit)
testing it... Sorry for the delay my friend <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in TTrayIcon (64bit)
Thank you! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
Bug in TTrayIcon (64bit)
As a reminder... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
Bug in TTrayIcon (64bit)
Dear Enrico, We have implemented some changes in Class TTrayIcon and in Class TStruct for 64 bits, but still we are unable to get it working on 64 bits... [code=fw:2hj482ub]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp;<span style="color: #00C800;">if</span> ! IsExe64<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;STRUCT oTray<br />&nbsp; &nbsp; &nbsp; MEMBER cbSize &nbsp; &nbsp; AS LONG<br />&nbsp; &nbsp; &nbsp; MEMBER hWnd &nbsp; &nbsp; &nbsp; AS LONG<br />&nbsp; &nbsp; &nbsp; MEMBER uID &nbsp; &nbsp; &nbsp; &nbsp;AS LONG<br />&nbsp; &nbsp; &nbsp; MEMBER uFlags &nbsp; &nbsp; AS LONG<br />&nbsp; &nbsp; &nbsp; MEMBER uCallMsg &nbsp; AS LONG<br />&nbsp; &nbsp; &nbsp; MEMBER hIcon &nbsp; &nbsp; &nbsp;AS LONG<br />&nbsp; &nbsp; &nbsp; MEMBER cTip &nbsp; &nbsp; &nbsp; AS STRING LEN <span style="color: #000000;">64</span><br />&nbsp; &nbsp;ENDSTRUCT<br />&nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp;STRUCT oTray<br />&nbsp; &nbsp; &nbsp; MEMBER cbSize &nbsp; &nbsp; AS LONG<br />&nbsp; &nbsp; &nbsp; MEMBER hWnd &nbsp; &nbsp; &nbsp; AS LONGLONG<br />&nbsp; &nbsp; &nbsp; MEMBER uID &nbsp; &nbsp; &nbsp; &nbsp;AS LONG<br />&nbsp; &nbsp; &nbsp; MEMBER uFlags &nbsp; &nbsp; AS LONG<br />&nbsp; &nbsp; &nbsp; MEMBER uCallMsg &nbsp; AS LONG<br />&nbsp; &nbsp; &nbsp; MEMBER hIcon &nbsp; &nbsp; &nbsp;AS LONGLONG<br />&nbsp; &nbsp; &nbsp; MEMBER cTip &nbsp; &nbsp; &nbsp; AS STRING LEN <span style="color: #000000;">64</span><br />&nbsp; &nbsp;ENDSTRUCT<br />&nbsp; <span style="color: #00C800;">endif</span></div>[/code:2hj482ub] [code=fw:2hj482ub]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nType == LONGLONG<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> cType == <span style="color: #ff0000;">"N"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uData = PadR<span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> uData <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, nLen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endcase</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cBuffer</span> = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nOffset > <span style="color: #000000;">0</span>, <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cBuffer</span>, <span style="color: #000000;">1</span>, nOffset <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uData + <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cBuffer</span>, nOffset + nLen + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span></div>[/code:2hj482ub]
Bug in TTrayIcon (64bit)
Thank you anyway. EMG
Bug in TWBrowse
[code:3j14sqfk]// Headers are white #include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oDlg, oBrw USE TEST DEFINE DIALOG oDlg @ 0, 0 LISTBOX oBrw FIELDS ACTIVATE DIALOG oDlg; ON INIT oDlg&#58;SetControl&#40; oBrw &#41;; CENTER CLOSE RETURN NIL[/code:3j14sqfk]EMG
Bug in TWBrowse
Enrico,are you using VISTA ?Regards,Otto<!-- m --><a class="postlink" href="http://forums.fivetechsoft.com/viewtopic.php?t=9990&highlight=vista">http://forums.fivetechsoft.com/viewtopi ... ight=vista</a><!-- m -->
Bug in TWBrowse
No, XP SP3.EMG
Bug in TWBrowse
Enrico, ave you read the thread.James reported also have seen this in XP.In VISTA 8.o3 or 8.o4 (can't remember exactlly) resolved the problem.Regards,Otto
Bug in TWBrowse
The problem started with this month FWH release.EMG
Bug in TWBrowse
Enrico,Please try this change in source\classes\wbrowse line 2248:[code:36il9ra7] if nRowPos == 0 SetBkColor&#40; hDC, If&#40; ValType&#40; nClrPane &#41; == "B",; nClrPane &#58;= Eval&#40; nClrPane &#41;, nClrPane &#41; &#41; endif [/code:36il9ra7]
Bug in TWBrowse
It seems to work fine, thank you.EMG
Bug in TWBrowse - nClrPane
Just move the cursor on the second column and you will see the first column becoming green:[code:1t6wsoxi]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oDlg, oBrw USE TEST DEFINE DIALOG oDlg; SIZE 400, 400 @ 0, 0 LISTBOX oBrw FIELDS TEST -> last,; TEST -> first oBrw&#58;bLogicLen = &#123; || LastRec&#40;&#41; &#125; oBrw&#58;lCellStyle = &#46;T&#46; oBrw&#58;nClrPane = &#123; | nCol | If&#40; nCol = 1, CLR_HRED, CLR_HGREEN &#41; &#125; ACTIVATE DIALOG oDlg; ON INIT oDlg&#58;SetControl&#40; oBrw &#41;; CENTER CLOSE RETURN NIL[/code:1t6wsoxi]EMG
Bug in TWBrowse - nClrPane
Enrico,Have you tested it with previous versions of FWH 8.05 ? thanks,I mean 8.04, 8.03, ...
Bug in TWBrowse - nClrPane
nClrPane is a codeblock starting from the current 8.05.EMG
Bug in TWBrowse - nClrPane
Enrico,Yes, you are right, thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in TWBrowse - nClrPane
It seems related to oBrw:lCellStyle = .T. without it, it works fineI keep searching...
Bug in TWBrowse - nClrPane
Enrico,Fixed! This is the right code for Class TWBrowse line 2282-2284 (a n was missing):[code:vxtod8tp] SetBkColor&#40; hDC, If&#40; nColAct != nil, If&#40; ValType&#40; nClrBack &#41; == "B",; Eval&#40; nClrBack, n &#41;, nClrBack &#41;,; If&#40; ValType&#40; nClrPane &#41; == "B", Eval&#40; nClrPane, n &#41;, nClrPane &#41; &#41; &#41; [/code:vxtod8tp]Thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in TWBrowse - nClrPane
Thank you!EMG
Bug in TWBrowse - nClrPane
Where can I find TWBrowse.Prg to make the updation.I expected TWBrowse.Prg in the folder \FWH\Source\Classes but I could not find the same anywhere in the FWH FolderRegardsAnserFWH 8.06[quote="Antonio Linares":bezz6g40]Enrico, Fixed! This is the right code for Class TWBrowse line 2282-2284 (a n was missing): [code:bezz6g40] SetBkColor&#40; hDC, If&#40; nColAct != nil, If&#40; ValType&#40; nClrBack &#41; == "B",; Eval&#40; nClrBack, n &#41;, nClrBack &#41;,; If&#40; ValType&#40; nClrPane &#41; == "B", Eval&#40; nClrPane, n &#41;, nClrPane &#41; &#41; &#41; [/code:bezz6g40] Thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:bezz6g40]
Bug in TWBrowse - nClrPane
\FWH\source\classes\wbrowse.prg
Bug in TWBrowse - nClrPane
AnserYou have to ( also ) make the same edit just above those lines and add the ,n to nClrTextRick
Bug in TWBrowse - nClrPane
Thank you,Mr.Nageswaragunupudi and Mr.Rick Lipkin.As per your advice I updated \FWH\source\classes\wbrowse.prgRegardsAnser
Bug in TWBrowse - nClrPane
Hello,This topic is about the background color of columns in a listbox.But how do I define the background color of a row ?Thanks.
Bug in TWBrowse - nClrPane
[quote="driessen":2665cwvx]Hello, This topic is about the background color of columns in a listbox. But how do I define the background color of a row ? Thanks.[/quote:2665cwvx][code:2665cwvx]oBrw&#58;nClrPane = &#123; | nCol | If&#40; YourCondition, CLR_HRED, CLR_HGREEN &#41; &#125;[/code:2665cwvx]EMG
Bug in TWBrowse - nClrPane
Enrico,Isn't your example to define the color of a column ? I want to change the background color of a row.Thanks.
Bug in TWBrowse - nClrPane
Please try. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->EMG
Bug in TWBrowse - nClrPane
Enrico,If I replace "nCol" by "nRow", it works OK.Thanks.
Bug in TWBrowse - nClrPane
It shouldn't make any difference as nCol is not used in the codeblock.EMG
Bug in TWBrowse scrollbar
This is the sample: [code:3a34qsnm]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oDlg, oBrw USE TEST DEFINE DIALOG oDlg @ 0, 0 LISTBOX oBrw FIELDS ACTIVATE DIALOG oDlg; ON INIT oDlg&#58;SetControl&#40; oBrw &#41;; CENTER CLOSE RETURN NIL[/code:3a34qsnm] Try to press CTRL-C or CTRL-R and you will see that the scrollbar thumb will move, respectively, down and up (while the highlight bar keep holding on the first record). EMG
Bug in TWBrowse scrollbar
Solved! Replace [code:hoa8sz54]METHOD KeyChar&#40; nKey, nFlags &#41; CLASS TWBrowse do case case nKey == K_PGUP &#58;&#58;oVScroll&#58;PageUp&#40;&#41; case nKey == K_PGDN &#58;&#58;oVScroll&#58;PageDown&#40;&#41; otherwise return Super&#58;KeyChar&#40; nKey, nFlags &#41; endcase return 0[/code:hoa8sz54] with [code:hoa8sz54]METHOD KeyChar&#40; nKey, nFlags &#41; CLASS TWBrowse do case case nKey == VK_PRIOR &#58;&#58;oVScroll&#58;PageUp&#40;&#41; case nKey == VK_NEXT &#58;&#58;oVScroll&#58;PageDown&#40;&#41; otherwise return Super&#58;KeyChar&#40; nKey, nFlags &#41; endcase return 0[/code:hoa8sz54] EMG
Bug in TWBrowse scrollbar
Or, even better, just remove KeyChar method from TWBrowse class. It seems not needed. EMG
Bug in TWBrowse scrollbar
Enrico, > Try to press CTRL-C or CTRL-R and you will see that the scrollbar thumb will move, respectively, down and up (while the highlight bar keep holding on the first record). > We have removed Class TWBrowse Method KeyChar() following your advise, thanks. Tested in Vista but when Ctrl+C or Ctrl+R are pressed nothing happens (edited: same behavior in XP). Maybe that behavior is not implemented in Vista.
Bug in TWBrowse scrollbar
I don't know why you can't replicate the problem but try this: [code:3tq4gf2h]METHOD KeyChar&#40; nKey, nFlags &#41; CLASS TWBrowse do case case nKey == K_PGUP &#58;&#58;oVScroll&#58;PageUp&#40;&#41; ? nKey, K_PGUP case nKey == K_PGDN &#58;&#58;oVScroll&#58;PageDown&#40;&#41; ? nKey, K_PGDN otherwise return Super&#58;KeyChar&#40; nKey, nFlags &#41; endcase return 0[/code:3tq4gf2h] Don't you see the same value for nKey and for K_PGUP or K_PGDN? Try with few records. EMG
Bug in TWBrowse scrollbar
Enrico, We removed Method KeyChar() following your advise and everything seems to work fine. Anyhow Ctrl+C and Ctrl+R do nothing here. What are those keystrokes intended for ?
Bug in TWBrowse scrollbar
Are you saying that the KeyChar method is not invoked when you press CTRL-C or CTRL-R? It is invoked here. Anyway, CTRL-C and CTRL-R is not intended for anything. Just they caused the scrollbar to move due to the typo K_PGUP/K_PGDN (Clipper keys) instead of VK_PRIOR/VK_NEXT (Windows keys). That's all. EMG
Bug in TWBrowse scrollbar
Enrico, I see. Well as we have removed Method KeyChar() then it should be fine now <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in TWBrowse scrollbar
Yes, thank you. EMG
Bug in TWBrowse:nClrPane
This is the sample (you will see that all the not focused cells of the current row are black): [code:3l6h7khv]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oDlg, oBrw USE TEST DEFINE DIALOG oDlg @ 0, 0 LISTBOX oBrw FIELDS oBrw&#58;lCellStyle = &#46;T&#46; oBrw&#58;nClrPane &#58;= &#123; || CLR_HGREEN &#125; ACTIVATE DIALOG oDlg; ON INIT oDlg&#58;SetControl&#40; oBrw &#41;; CENTER CLOSE RETURN NIL[/code:3l6h7khv] EMG
Bug in TWBrowse:nClrPane
Enrico, I confirm the problem--with the Aug 2006/xHarbour build. James
Bug in TWBrowse:nClrPane
Enrico, James, This change is required at source\classes\wbrowse.prg line 2268: [code:1b92n1kc] if nRowPos != 0 SetTextColor&#40; hDC, If&#40; nColAct != nil, If&#40; ValType&#40; nClrTxt &#41; == "B",; Eval&#40; nClrTxt &#41;, nClrTxt &#41;, nClrText &#41; &#41; SetBkColor&#40; hDC, If&#40; nRowPos == 0, GetSysColor&#40; COLOR_BTNFACE &#41;,; If&#40; nColAct == nil, nClrPane,; If&#40; ValType&#40; nClrBack &#41; == "B", Eval&#40; nClrBack &#41;, nClrBack &#41; &#41; &#41; &#41; endif [/code:1b92n1kc]
Bug in TWBrowse:nClrPane
A better version: [code:3tcc8qpe] if nRowPos != 0 SetTextColor&#40; hDC, If&#40; nColAct != nil, If&#40; ValType&#40; nClrTxt &#41; == "B",; Eval&#40; nClrTxt &#41;, nClrTxt &#41;, nClrText &#41; &#41; SetBkColor&#40; hDC, If&#40; nColAct != nil, If&#40; ValType&#40; nClrBack &#41; == "B",; Eval&#40; nClrBack &#41;, nClrBack &#41;, nClrPane &#41; &#41; endif [/code:3tcc8qpe]
Bug in TWBrowse:nClrPane
Thank you. EMG
Bug in TWindow
Try to run the following sample: [code:2mdywgh1]#include "Fwce&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oWnd LOCAL oGet, cVar &#58;= SPACE&#40; 30 &#41; DEFINE WINDOW oWnd @ 1, 1 GET oGet VAR cVar OF oWnd; SIZE 100, 20 // oGet&#58;SetFocus&#40;&#41; ACTIVATE WINDOW oWnd RETURN NIL[/code:2mdywgh1] If you press Tab you will get the following error: Class: NIL has no exported method GONEXTCTRL Uncommenting oGet:SetFocus() the error goes away. EMG
Bug in TWindow
Enrico, With the latest FWPPC build published yesterday (yesterday two new builds were published) there is no error.
Bug in TWindow
Confirmed! Thank you! EMG
Bug in TXBrowse?
Please look at these two samples. PRG 1: [code=fw:15g50ea1]<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<br /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />           <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"TEST"</span><br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span>;<br />             <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oDlg<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:15g50ea1] RC 1: [code=fw:15g50ea1]<div class="fw" id="{CB}" style="font-family: monospace;">TEST <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span><br /><span style="color: #0000ff;">STYLE</span> DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"Test"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">12</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br />LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL<br /><span style="color: #000000;">&#123;</span><br /> CONTROL <span style="color: #ff0000;">"Test"</span>, <span style="color: #000000;">201</span>, <span style="color: #ff0000;">"BUTTON"</span>, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, <span style="color: #000000;">20</span>, <span style="color: #000000;">265</span>, <span style="color: #000000;">41</span>, <span style="color: #000000;">16</span><br /><span style="color: #000000;">&#125;</span></div>[/code:15g50ea1] PRG 2: [code=fw:15g50ea1]<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<br /><br />    <span style="color: #00C800;">LOCAL</span> oBrw<br /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />           <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"TEST"</span><br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw;<br />             <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />    <span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span>;<br />             <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oDlg<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:15g50ea1] RC 2: [code=fw:15g50ea1]<div class="fw" id="{CB}" style="font-family: monospace;">TEST <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span><br /><span style="color: #0000ff;">STYLE</span> DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"Test"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">12</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br />LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL<br /><span style="color: #000000;">&#123;</span><br /> CONTROL <span style="color: #ff0000;">"Test"</span>, <span style="color: #000000;">201</span>, <span style="color: #ff0000;">"BUTTON"</span>, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, <span style="color: #000000;">20</span>, <span style="color: #000000;">265</span>, <span style="color: #000000;">41</span>, <span style="color: #000000;">16</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"TXBrowse"</span>, WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">275</span>, <span style="color: #000000;">245</span><br /><span style="color: #000000;">&#125;</span></div>[/code:15g50ea1] The second sample doesn't honour the font size defined in the RC file. It looks like the presence of TXBrowse prevents it. Any workaround? EMG
Bug in TXBrowse?
Just to further explain the problem, this sample using TWBrowse works fine instead: [code=fw:3auem5qr]<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> oDlg<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> oBrw<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"TEST"</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">LISTBOX</span> oBrw FIELDS;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; <span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">CENTER</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3auem5qr] [code=fw:3auem5qr]<div class="fw" id="{CB}" style="font-family: monospace;">TEST <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span><br /><span style="color: #0000ff;">STYLE</span> DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"Test"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">12</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br />LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL<br /><span style="color: #000000;">&#123;</span><br />&nbsp;CONTROL <span style="color: #ff0000;">"Test"</span>, <span style="color: #000000;">201</span>, <span style="color: #ff0000;">"BUTTON"</span>, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, <span style="color: #000000;">20</span>, <span style="color: #000000;">265</span>, <span style="color: #000000;">41</span>, <span style="color: #000000;">16</span><br />&nbsp;CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"TWBrowse"</span>, WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">275</span>, <span style="color: #000000;">245</span><br /><span style="color: #000000;">&#125;</span></div>[/code:3auem5qr] EMG
Bug in TXBrowse?
Any news? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
Bug in TXBrowse?
I think it need oBrw:CreateFromCode() or CreateFromResource( nId )
Bug in TXBrowse?
With oBrw:CreateFromCode() I get the following error: [code=fw:209lhlio]<div class="fw" id="{CB}" style="font-family: monospace;">Error description: <span style="color: #000000;">Error</span> FiveWin/<span style="color: #000000;">2</span> &nbsp;Duplicated <span style="color: #0000ff;">Id</span>: <span style="color: #000000;">No</span>: &nbsp; &nbsp;<span style="color: #000000;">101</span></div>[/code:209lhlio] EMG
Bug in TXBrowse?
[img:jqqm168l]http&#58;//www&#46;eoeo&#46;it/wp-content/uploads/2016/07/nn&#46;jpg[/img:jqqm168l] here run ok wich is the problem ?
Bug in TXBrowse?
CreateFromResource( 101 ) run also without I tried also with CONTROL "", 200, "TxBrowse", WS_TABSTOP|0x00a00000, 12, 8, 178, 96
Bug in TXBrowse?
Please look at the font of the button. It should be size 12. EMG
Bug in TXBrowse?
Mr Enrico We shall look into this and get back to you. At the same I am surprised that you even touched XBrowse. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in TXBrowse?
[quote="nageswaragunupudi":g9mwy7cf]Mr Enrico We shall look into this and get back to you.[/quote:g9mwy7cf] Thank you. [quote="nageswaragunupudi":g9mwy7cf]At the same I am surprised that you even touched XBrowse. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:g9mwy7cf] Why? EMG
Bug in TXBrowse?
And while you are looking at it, what is that "A" on the header? EMG
Bug in TXBrowse?
it create an array init from A as default
Bug in TXBrowse?
Any news? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
Bug in TXBrowse?
Still waiting... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
Bug in TXBrowse?
Rao, please, I need a workaround to this problem. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
Bug in TXBrowse?
TXBrowse when created, calls ::GetFont() method for the purpose of assigning itself the same font as the containing window. Calling GetFont() is the standard method for this. GetFont() method is in TWindow class. If the container window does not have a font already assigned, this in turn executes that window's GetFont() method. In case of a dialog created from resource, it tries to create and assign a font object to it on the basis of font metrics of the dialog. Theoretically this assigned font object should be identical to the hFont of the dialog when created from resource. The relevant part of the code is this: [code=fw:1nrk39cn]<div class="fw" id="{CB}" style="font-family: monospace;">  <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;">&#40;</span> hFont := ::<span style="color: #000000;">SendMsg</span><span style="color: #000000;">&#40;</span> WM_GETFONT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span><br />         aInfo = GetFontInfo<span style="color: #000000;">&#40;</span> hFont <span style="color: #000000;">&#41;</span><br />         oFont = TFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         oFont:<span style="color: #000000;">hFont</span>     = hFont<br />         oFont:<span style="color: #000000;">nCount</span>    = <span style="color: #000000;">1</span><br />         oFont:<span style="color: #000000;">nHeight</span>   = aInfo<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />         oFont:<span style="color: #000000;">nWeight</span>   = aInfo<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />         oFont:<span style="color: #000000;">lBold</span>     = aInfo<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br />         oFont:<span style="color: #000000;">cFaceName</span> = aInfo<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span><br />         oFont:<span style="color: #000000;">lDestroy</span>  = .f.<br />         ::<span style="color: #000000;">oFont</span> = oFont<br /> </div>[/code:1nrk39cn] I do not know for what reason the oDlg:oFont is different from the hFont queried with WM_GETFONT. This problem is the same as the selfont() or choosefont() function's problem. Even there the oFont created from the fontmetrics differ from the selected font. I could not yet find a solution for this. Greatly appreciate any help from you. So the real issue is here to fix. Meanwhile the one workaround is to assign a font object to the Dialog() as close to the font definition of the Dialog in resources.
Bug in TXBrowse?
[quote="nageswaragunupudi":283jvihn]I could not yet find a solution for this. Greatly appreciate any help from you.[/quote:283jvihn] Sorry, I can't understand the problem. Can you show a little self-contained sample demonstrating it? [quote="nageswaragunupudi":283jvihn]Meanwhile the one workaround is to assign a font object to the Dialog() as close to the font definition of the Dialog in resources.[/quote:283jvihn] Great! It's what I needed, thank you! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
Bug in Tbrush
In brush.prg there is the following line: [code=fw:2g8hkjge]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nAt := AScan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aBrushes</span>, <span style="color: #000000;">&#123;</span>|oBrush| <span style="color: #00C800;">Self</span> == oBrush <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span></div>[/code:2g8hkjge] But we can't compare brushes at this point because some of the properties of the current brush have not been assigned yet (ie. ::aGrad). One of the results is that the new GRADIENT clause doesn't work if there are brushes already defined. EMG
Bug in Tbrush
Thanks for pointing out the bug.
Bug in Tbrush
[quote:xt52xars] One of the results is that the new GRADIENT clause doesn't work if there are brushes already defined. [/quote:xt52xars] There seems to be no problem in creating any number of gradient brushes. [code=fw:xt52xars]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">static</span> aGrad1 &nbsp;:= <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> .<span style="color: #000000;">4</span>, CLR_BLUE, CLR_WHITE <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> .<span style="color: #000000;">6</span>, CLR_WHITE, CLR_BLUE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">static</span> aGrad2 &nbsp;:= <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.50</span>, <span style="color: #000000;">14853684</span>, <span style="color: #000000;">16314573</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.50</span>, <span style="color: #000000;">16314573</span>, <span style="color: #000000;">14853684</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">static</span> aGrad3 &nbsp;:= <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.25</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">219</span>, <span style="color: #000000;">230</span>, <span style="color: #000000;">244</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">207</span>, <span style="color: #000000;">221</span>, <span style="color: #000000;">239</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.75</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">201</span>, <span style="color: #000000;">217</span>, <span style="color: #000000;">237</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">231</span>, <span style="color: #000000;">242</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">static</span> aGrad4 &nbsp;:= <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.25</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">253</span>, <span style="color: #000000;">222</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">231</span>, <span style="color: #000000;">151</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.75</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">215</span>, &nbsp;<span style="color: #000000;">84</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">233</span>, <span style="color: #000000;">162</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">static</span> aGrdBrush<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</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> oWnd, oBar<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> aGrdBrush<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> GRADIENT aGrad1<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> aGrdBrush<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> GRADIENT aGrad2<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> aGrdBrush<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> GRADIENT aGrad3<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> aGrdBrush<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> GRADIENT aGrad4<br /><br />&nbsp; &nbsp;? Len<span style="color: #000000;">&#40;</span> TBrush<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">aBrushes</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">BRUSH</span> aGrdBrush<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">MDI</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Gradient Brushes"</span><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: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">32</span> <span style="color: #000000;">2007</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Child"</span> <span style="color: #0000ff;">ACTION</span> NewChild<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">''</span> <span style="color: #000000;">2007</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br />&nbsp; &nbsp;? Len<span style="color: #000000;">&#40;</span> TBrush<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">aBrushes</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> aGrdBrush, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;? Len<span style="color: #000000;">&#40;</span> TBrush<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">aBrushes</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> NewChild<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">static</span> nBrush &nbsp;:= <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd<br /><br />&nbsp; &nbsp;nBrush &nbsp; := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nBrush == <span style="color: #000000;">4</span>, <span style="color: #000000;">1</span>, ++nBrush <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> WndMain<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">BRUSH</span> aGrdBrush<span style="color: #000000;">&#91;</span> nBrush <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;<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><br />&nbsp;</div>[/code:xt52xars] Four gradient brushes are created and can be used and reused in any manner. But the problem arises when new brushes are created with the same image with different resize modes, after creating a non-resizble brush with that image. This will be fixed.
Bug in Tbrush
Please try: [code=fw:39b7yrxf]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> aGrdBrush<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #B900B9;">//GRADIENT aGrad1</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> aGrdBrush<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> GRADIENT aGrad2<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> aGrdBrush<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> GRADIENT aGrad3<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> aGrdBrush<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> GRADIENT aGrad4</div>[/code:39b7yrxf] EMG
Bug in Tbrush
Thanks, Yes. I noticed this too. Fixed now.
Bug in Tbrush
Thank you. One more problem: ::nResizeMode is 0 by default. It should be 1. EMG
Bug in Tbrush
This is the logic adopted: nResizeMode is not relevant for solid and style brushes, but only to those which depend on bitmaps, including gradients. Default mode for all bitmap brushes, except gradients, is TILED mode. nResizeMode = 0 is the default tiled mode. This is the traditional way. nResizeMode = 1 means STRETCH and nResizeMode = 2 means RESIZE. Optionally, one of these two modes can be selected in case of Images, at the time of creation of the brush. RESIZE mode retains the aspect ratio, while STRETCH does not. In case of RESIZE, one of the dimensions fits the window client size while the other may exceed. Gradient brushes are always to be stretched, i.e., the entire window client area is to be filled. Size of the bitmap created is exactly the same as the client area of the window. By default the gradient type is Vertical, which is represented by nResizeMode = 1 and optional HORIZONTAL mode is represented by 2. When a brush is created for gradient, we are setting the default to 1 ( vertical ) in the New() method, unless HORIZ clause is specified. Hope this explains. Welcome your suggestions.
Bug in Tbrush
No, what I'm trying to say is that the default for gradient brushes is currently 0 that means != 1 and therefore horizontal. Please test. EMG
Bug in TerminateProcess() and/or GetWndTask() function(s) ?
I'm trying to close a FiveWin application (caption = 6.0) from another but it's not working.[color=red:1bhq5i7y] TerminateProcess( GetWndTask( FindWindow ( , "6.0" ) ), 1 ) [/color:1bhq5i7y][color=blue:1bhq5i7y]OR[/color:1bhq5i7y][color=red:1bhq5i7y] hWnd := FindWindow(, "6.0" ) [/color:1bhq5i7y][color=blue:1bhq5i7y]<--- this gets the correct window handle[/color:1bhq5i7y][color=red:1bhq5i7y] hTask := GetWndTask( hWnd ) [/color:1bhq5i7y][color=blue:1bhq5i7y]<--- this fails, getting the wrong number[/color:1bhq5i7y] [color=blue:1bhq5i7y] Isn't GetWndTask( hWnd) supposed to get the process id ?[/color:1bhq5i7y][color=red:1bhq5i7y] TerminateProcess( hTask , 1 ) [/color:1bhq5i7y][color=blue:1bhq5i7y]<--- this fails because of the wrong hTask[/color:1bhq5i7y]Any clues ?
Bug in TerminateProcess() and/or GetWndTask() function(s) ?
Gustavo,Here you have a working example, implemented in a different way:[code:1yrc7dqm] #include "FiveWin&#46;ch" function Main&#40;&#41; local oDlg DEFINE DIALOG oDlg TITLE "Test" @ 1, 1 BUTTON "Calculator" OF oDlg SIZE 50, 13 ACTION WinExec&#40; "calc" &#41; @ 1, 12 BUTTON "Close" OF oDlg ; ACTION SendMessage&#40; FindWindow&#40; 0, "Calculator" &#41;, WM_CLOSE &#41; ACTIVATE DIALOG oDlg CENTERED return nil [/code:1yrc7dqm]
Bug in TerminateProcess() and/or GetWndTask() function(s) ?
Antonio:This: [color=blue:2w6jjm1n]hWnd := FindWindow( "6.0" )[/color:2w6jjm1n] returns 0This: [color=blue:2w6jjm1n]hWnd := FindWindow(, "6.0" )[/color:2w6jjm1n] returns 265412Now, this: [color=blue:2w6jjm1n]MsgInfo( GetWndTask( hWnd ) )[/color:2w6jjm1n] returns 3760 that does not shows up in Windows' Task Manager's Processes.Thank you for your help.
Bug in TerminateProcess() and/or GetWndTask() function(s) ?
Antonio:Thank you very much, with the SendMessage() function worked perfectly ! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Bug in Transparent Group
This is the sample showing the problem [code=fw:1ulcfqrt]<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> oWnd<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">COLOR</span> CLR_WHITE,CLR_BLUE<br />   @ <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd TRANSPARENT<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><br /> </div>[/code:1ulcfqrt] This is the result: [url=http&#58;//img198&#46;imageshack&#46;us/my&#46;php?image=bugcu&#46;jpg:1ulcfqrt][img:1ulcfqrt]http&#58;//img198&#46;imageshack&#46;us/img198/4041/bugcu&#46;jpg[/img:1ulcfqrt][/url:1ulcfqrt] Background of the DestkTop is visible through the Group. Is this a bug or am I doing something wrong?
Bug in Transparent Group
Rao, Class TGroup uses a NULL brush for TRANSPARENT mode and the NULL brush does not work fine under all circunstances. Please use this workaround which works better: [code=fw:1pd8pv4v]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><br /><span style="color: #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, oGrp<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">COLOR</span> CLR_WHITE, CLR_BLUE<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span> GROUP oGrp <span style="color: #0000ff;">TO</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #B900B9;">// TRANSPARENT</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oGrp:<span style="color: #000000;">SetBrush</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">oBrush</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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><br />&nbsp;</div>[/code:1pd8pv4v]
Bug in Transparent Group
Mr. Antonio Thanks. But when we use image or gradient brush for the window, the background inside the group does not match the background of the window. The following solution appears to be working ( for windows ), both when resized and brush is changed at runtime. [code=fw:3jzkvh8q]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; oGrp:<span style="color: #000000;">bEraseBkGnd</span> := <span style="color: #000000;">&#123;</span> |hDC| SetBrushOrgEx<span style="color: #000000;">&#40;</span> hDC, -oGrp:<span style="color: #000000;">nLeft</span>, -oGrp:<span style="color: #000000;">nTop</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; FillRect<span style="color: #000000;">&#40;</span> hDC, GetClientRect<span style="color: #000000;">&#40;</span> oGrp:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, oGrp:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:3jzkvh8q] Can TGroup include similar code?
Bug in Transparent Group
Rao, Included in FWH 9.12 this way: [code=fw:unfnpn80]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><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 />&nbsp; &nbsp;<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 />&nbsp; &nbsp; &nbsp; <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 />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />  <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lTransparent</span><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 />     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;">return</span> <span style="color: #000000;">0</span>  <br /> </div>[/code:unfnpn80] Thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Bug in Transparent Group
Antonio, Can you try this sample using DIALOG with new EraseBkGnd and without. Thanks, [code=fw:3uqql5em]<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> oWnd, cGet := SPACE<span style="color: #000000;">&#40;</span><span style="color: #000000;">15</span><span style="color: #000000;">&#41;</span><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:3uqql5em]
Bug in Transparent Group
Hi, If I change the method like below it works in dialogs like windows. I don't know it is exactly true. [code=fw:3lp4mvie]<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> ! 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 />     <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 />     <span style="color: #00C800;">if</span> UPPER<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>=<span style="color: #ff0000;">"TWINDOW"</span>     <span style="color: #B900B9;">//added</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;">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;">endif</span> <span style="color: #B900B9;">//added</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;">return</span> <span style="color: #000000;">0</span></div>[/code:3lp4mvie]
Bug in Transparent Group
Hakan, Your example works fine here on Windows 7 with the new EraseBkGnd() code: [img:2ldbxmyn]http&#58;//img704&#46;imageshack&#46;us/img704/2238/groupsc&#46;png[/img:2ldbxmyn]