topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
Bug in TMail [Fixed]
|
[quote="Rick Lipkin":20p8so43]Enrico
This code is not especially elegant .. and it assumes the .exe is located in the drive or unc you wish to resolve.
Rick Lipkin
[code=fw:20p8so43]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// where .exe started from is default directory //</span><br /><br />cFILE := GetModuleFileName<span style="color: #000000;">(</span> GetInstance<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br />nSTART := RAT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"<span style="color: #000000;">\"</span>, cFILE )<br />cDEFA := SUBSTR(cFILE,1,nSTART-1)<br /><br />SET DEFA to ( cDEFA )<br /></span></div>[/code:20p8so43][/quote:20p8so43]
Better fix TMail.
EMG
|
Bug in TMail [Fixed]
|
Enrico,
Here you have your changes, please try them <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Included for FWH 18.02
[code=fw:29obluey]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TMail<br /><br /> <span style="color: #00C800;">local</span> cCurPath<br /><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nRetCode</span> != <span style="color: #000000;">-1</span><br /> <span style="color: #00C800;">IF</span> CurDrive<span style="color: #000000;">(</span><span style="color: #000000;">)</span> = <span style="color: #ff0000;">"<span style="color: #000000;">\"</span><br /> cCurPath = CurDir()<br /> ELSE<br /> cCurPath = CurDrive() + "</span>:\<span style="color: #ff0000;">" + CurDir()<br /> ENDIF<br /><br /> ::nRetCode = MAPISendMail( ::cSubject, ::cNoteText, ::cMsgType,;<br /> DToS( ::dDate ) + "</span> <span style="color: #ff0000;">" + ::cTime,;<br /> ::cConversationID, ::lReceipt, ::lFromUser,;<br /> ::aOrigin, ::aRecipients, ::aFiles )<br /> lChDir( cCurPath )<br /> else<br /> MsgStop( "</span>Error initializing <span style="color: #0000ff;">mail</span><span style="color: #ff0000;">" )<br /> endif<br /><br />return nil<br /></span></div>[/code:29obluey]
|
Bug in TMail [Fixed]
|
It doesn't work. This is look as the right way:
[code=fw:2pdsq4fg]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TMail<br /><br /> <span style="color: #00C800;">local</span> cCurPath<br /><br /> <span style="color: #B900B9;">// ::nRetCode = MAPILogOn()</span><br /><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nRetCode</span> != <span style="color: #000000;">-1</span><br /> <span style="color: #00C800;">if</span> CurDrive<span style="color: #000000;">(</span><span style="color: #000000;">)</span> = <span style="color: #ff0000;">"<span style="color: #000000;">\"</span><br /> cCurPath = "</span>\<span style="color: #ff0000;">" + CurDir()<br /> else<br /> cCurPath = CurDrive() + "</span>:\<span style="color: #ff0000;">" + CurDir()<br /> endif<br /><br /> ::nRetCode = MAPISendMail( ::cSubject, ::cNoteText, ::cMsgType,;<br /> DToS( ::dDate ) + "</span> <span style="color: #ff0000;">" + ::cTime,;<br /> ::cConversationID, ::lReceipt, ::lFromUser,;<br /> ::aOrigin, ::aRecipients, ::aFiles )<br /> lChDir( cCurPath )<br /> else<br /> MsgStop( "</span>Error initializing <span style="color: #0000ff;">mail</span><span style="color: #ff0000;">" )<br /> endif<br /><br />return nil</span></div>[/code:2pdsq4fg]
EMG
|
Bug in TMail [Fixed]
|
many thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in TMenu
|
In the following sample, open the menu and wait for the timer to change the prompt. You will see that the menuitem temporary losts its 2007 style:
[code=fw:2qpbcmhk]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oWnd, oMenu, oTimer<br /><br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2007</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /><br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span> CHECKED<br /> <span style="color: #0000ff;">ENDMENU</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd;<br /> <span style="color: #0000ff;">MENU</span> oMenu<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">TIMER</span> oTimer <span style="color: #0000ff;">OF</span> oWnd;<br /> <span style="color: #0000ff;">INTERVAL</span> <span style="color: #000000;">3000</span>;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> TONE<span style="color: #000000;">(</span> <span style="color: #000000;">440</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>, oMenu:<span style="color: #000000;">aItems</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">bAction</span>:<span style="color: #000000;">aItems</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">SetPrompt</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Changed"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">TIMER</span> oTimer<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">TIMER</span> oTimer<br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:2qpbcmhk]
EMG
|
Bug in TMenu
|
Already fixed in the upcoming FWH release.
EMG
|
Bug in TMenu
|
Enrico,
Thanks for the fix <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
We appreciate if you post the fix here, so users can already apply it, thanks
|
Bug in TMenu
|
Here it is:
[code=fw:3dhbu3pe]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> MF_BYCOMMAND <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> MF_ENABLED <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> MF_UNCHECKED <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> MF_GRAYED <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> MF_DISABLED <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> MF_CHECKED <span style="color: #000000;">8</span><br /><span style="color: #00D7D7;">#define</span> MF_POPUP <span style="color: #000000;">16</span> <span style="color: #B900B9;">// 0x0010</span><br /><span style="color: #00D7D7;">#define</span> MF_BREAK <span style="color: #000000;">64</span><br /><span style="color: #00D7D7;">#define</span> MF_OWNERDRAW <span style="color: #000000;">256</span> <span style="color: #B900B9;">// 0x0100</span><br /><span style="color: #00D7D7;">#define</span> MF_HELP <span style="color: #000000;">16384</span> <span style="color: #B900B9;">// 0x4000</span></div>[/code:3dhbu3pe]
[code=fw:3dhbu3pe]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> SetPrompt<span style="color: #000000;">(</span> cPrompt <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TMenuItem<br /><br /> <span style="color: #00C800;">local</span> nNewId, nFlags<br /><br /> ::<span style="color: #000000;">cPrompt</span> = cPrompt<br /><br /> <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">(</span> ::<span style="color: #000000;">bAction</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"O"</span> .and. ;<br /> Upper<span style="color: #000000;">(</span> ::<span style="color: #000000;">bAction</span>:<span style="color: #000000;">ClassName</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"TMENU"</span><br /> nNewId := ::<span style="color: #000000;">bAction</span>:<span style="color: #000000;">hMenu</span><br /> nFlags := MF_POPUP<br /> <span style="color: #00C800;">else</span><br /> nNewId := ::<span style="color: #000000;">nId</span><br /> nFlags := nOR<span style="color: #000000;">(</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">lActive</span>, MF_ENABLED,;<br /> nOR<span style="color: #000000;">(</span> MF_DISABLED, MF_GRAYED <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>,;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">lChecked</span>, MF_CHECKED, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>,;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">lHelp</span>, MF_HELP, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>,;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">lBreak</span>, MF_BREAK, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>,;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">oMenu</span>:<span style="color: #000000;">l2007</span>, MF_OWNERDRAW, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oMenu</span> != <span style="color: #00C800;">nil</span><br /> ModifyMenu<span style="color: #000000;">(</span> ::<span style="color: #000000;">oMenu</span>:<span style="color: #000000;">hMenu</span>, ::<span style="color: #000000;">nId</span>, nFlags, nNewId, cPrompt <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oMenu</span>:<span style="color: #000000;">oWnd</span> != <span style="color: #00C800;">nil</span><br /> DrawMenuBar<span style="color: #000000;">(</span> ::<span style="color: #000000;">oMenu</span>:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3dhbu3pe]
EMG
|
Bug in TMenu
|
Enrico,
Many thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in TMenu
|
In the following sample, the automatic generated menuitem has not the right color:
[code=fw:zibn9lyu]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oWnd, oMenu<br /><br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2007</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Window"</span><br /><br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDI</span>;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"MDI Test"</span>;<br /> <span style="color: #0000ff;">MENU</span> oMenu;<br /> MENUINFO <span style="color: #000000;">1</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> CREATECHILD<span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> CREATECHILD<span style="color: #000000;">(</span> oMdi <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oWnd, oMenu<br /><br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2007</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Window"</span><br /><br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> oMdi;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"MDI Child Test"</span>;<br /> <span style="color: #0000ff;">MENU</span> oMenu<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd;<br /> <span style="color: #0000ff;">VALID</span> !GETKEYSTATE<span style="color: #000000;">(</span> VK_ESCAPE <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:zibn9lyu]
EMG
|
Bug in TMenu
|
Enrico
I will check and comment
Thanks
|
Bug in TMenu
|
Thank you Cristobal!
EMG
|
Bug in TMenu
|
Enrico, problem is in module Menudraw.c
Change this function and test
[code=fw:2an16278]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> MITEMSFW <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// hMenu, nIni, aHBmps, lSys</span><br /><span style="color: #000000;">{</span><br /> .../...<br /><br /> MENUITEMINFO mi;<br /><br /> <span style="color: #00C800;">for</span><span style="color: #000000;">(</span> w = nIni; w < GetMenuItemCount<span style="color: #000000;">(</span> hMenu <span style="color: #000000;">)</span>; w++ <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> memset<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> char * <span style="color: #000000;">)</span> &mi, <span style="color: #000000;">0</span>, sizeof<span style="color: #000000;">(</span> MENUITEMINFO <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> mi.cbSize = sizeof<span style="color: #000000;">(</span> MENUITEMINFO <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> bSys <span style="color: #000000;">)</span><br /> mi.fMask = MIIM_TYPE;<br /> <span style="color: #00C800;">else</span><br /> mi.fMask = MIIM_FTYPE;<br /> GetMenuItemInfo<span style="color: #000000;">(</span> hMenu, w, <span style="color: #00C800;">TRUE</span>, &mi <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span> mi.fType & MFT_OWNERDRAW <span style="color: #000000;">)</span> != MFT_OWNERDRAW <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> mi.cbSize = sizeof<span style="color: #000000;">(</span> MENUITEMINFO <span style="color: #000000;">)</span>;<br /> mi.fMask |= MIIM_DATA | MIIM_BITMAP ;<br /> mi.fType |= MFT_OWNERDRAW ;<br /> mi.dwItemData = <span style="color: #000000;">(</span> ULONG_PTR <span style="color: #000000;">)</span> hMenu;<br /> SetMenuItemInfo<span style="color: #000000;">(</span> hMenu, w, <span style="color: #00C800;">TRUE</span>, &mi <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /><span style="color: #000000;">}</span><br /><br /> </div>[/code:2an16278]
Please comment result
|
Bug in TMenu
|
Already tried your update lib. Still need to try that C function?
EMG
|
Bug in TMenu
|
Enrico
I published the problem
This function is included in the library that I sent you
|
Bug in TMenu
|
Ok. Thank you!
EMG
|
Bug in TMenu
|
I also tried the above changed C function and it worked fine!
EMG
|
Bug in TMenu
|
[quote="Enrico Maria Giordano":xbilz2ap]I also tried the above changed C function and it worked fine!
EMG[/quote:xbilz2ap]
Enrico, thanks for your test
|
Bug in TMenu
|
News features in next versions: LOGOMENU, IMGMENU, etc.
[img:2nvo2all]https://s32.postimg.org/i1mtlcf7p/Five_Menu.png[/img:2nvo2all]
|
Bug in TMenu
|
very nice!
|
Bug in TMenu [Fixed]
|
I just also noticed that, in the normal conditions, the menu items are vertically closer than in the previous release. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
This is not the first time that menu changes its look. Can we finally have a stable one, please?
EMG
|
Bug in TMenu [Fixed]
|
Please compare current menu items height with the one of other programs.
EMG
|
Bug in TMenu [Fixed]
|
Enrico,
It is fixed and it will be included in next FWH version
|
Bug in TMenu [Fixed]
|
Great! Can you send me the update libs, please?
EMG
|
Bug in TMenu [Fixed]
|
already sent
|
Bug in TMenu [Fixed]
|
Thank you! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TMenu [Fixed]
|
Occasionally, I get popup menus much higher than normal ones:
[url:3oc2nacx]http://www.emagsoftware.it/public/menubug.png[/url:3oc2nacx]
EMG
|
Bug in TMenu [Fixed]
|
Enrico,
We are checking it, thanks
|
Bug in TMenu [Fixed]
|
Another TMenu bug. In the following sample, please open Test menu and you will see that the mdichild window title is missing from the last menu item.
[code=fw:11jri8rz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oWnd, oMenu<br /><br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2007</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /><br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDI</span>;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"MDI Test"</span>;<br /> <span style="color: #0000ff;">MENU</span> oMenu<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> CREATECHILD<span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> CREATECHILD<span style="color: #000000;">(</span> oMdi <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oWnd, oMenu<br /><br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2007</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /><br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> oMdi;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"MDI Child Test"</span>;<br /> <span style="color: #0000ff;">MENU</span> oMenu<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd;<br /> <span style="color: #0000ff;">VALID</span> !GETKEYSTATE<span style="color: #000000;">(</span> VK_ESCAPE <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:11jri8rz]
EMG
|
Bug in TMenu [Fixed]
|
Any workaround?
EMG
|
Bug in TMenu [Fixed]
|
Enrico,
We are working to fix it. In the meantime try this:
[code=fw:171f684k]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> CREATECHILD<span style="color: #000000;">(</span> oMdi <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oWnd, oMenu<br /><br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2007</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /><br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test "</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /> <span style="color: #0000ff;">ENDMENU</span></div>[/code:171f684k]
Just increase the width of the first menuitem text
|
Bug in TMenu [Fixed]
|
Doesn't work for me... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG
|
Bug in TMenu [Fixed]
|
Use a dot at the end:
MENUITEM "Test ."
or another character
|
Bug in TMenu [Fixed]
|
Sorry, no change.
EMG
|
Bug in TMenu [Fixed]
|
A user reported this problem. Please open the tray menu and click on Show or on Hide. The logo will disappear.
[code=fw:39hbuayl]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"wcolors.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.CH"</span><br /><br /><span style="color: #00C800;">static</span> oWnd, oTray, oIcon<br /><br /><span style="color: #00C800;">function</span> TESTIT<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oIcon1<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">ICON</span> oIcon FILE <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\i</span>cons<span style="color: #000000;">\f</span>ivewin.ICO"</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">ICON</span> oIcon1 FILE <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\i</span>cons<span style="color: #000000;">\f</span>older.ico"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Icon Tray Class for FiveWin! from Jim Gale"</span> <span style="color: #0000ff;">ICON</span> oIcon<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oTray := TTrayIcon<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, oIcon, <span style="color: #ff0000;">"Testing tray ..."</span>,;<br /> <span style="color: #000000;">{</span> || <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Left CLick"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>,;<br /> <span style="color: #000000;">{</span> | nRow, nCol | MenuTray<span style="color: #000000;">(</span> nRow, nCol, oTray <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">VALID</span> oTray:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">CLICK</span> oTray:<span style="color: #000000;">SetIcon</span><span style="color: #000000;">(</span> oIcon1, <span style="color: #ff0000;">"Another"</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br /><br />***********************************************************<br /><br /><span style="color: #00C800;">FUNCTION</span> MenuTray<span style="color: #000000;">(</span> nRow, nCol <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oMenu<br /> <span style="color: #00C800;">LOCAL</span> cFontMenu := <span style="color: #ff0000;">"Verdana"</span><br /> <span style="color: #00C800;">LOCAL</span> nHFontMenu := <span style="color: #000000;">14</span><br /> <span style="color: #00C800;">LOCAL</span> oFontMenu<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontMenu <span style="color: #0000ff;">NAME</span> cFontMenu <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, -nHFontMenu<br /><br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span> <span style="color: #0000ff;">FONT</span> oFontMenu <span style="color: #000000;">2013</span> LOGOMENU <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\p</span>ngs<span style="color: #000000;">\i</span>mage1.png"</span><br /><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Show"</span> <span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">Show</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oWnd:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Hide"</span> <span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">Hide</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">SEPARATOR</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Close Application"</span> <span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">POPUP</span> oMenu <span style="color: #00C800;">AT</span> nRow, nCol <span style="color: #0000ff;">OF</span> oTray:<span style="color: #000000;">oWnd</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span></div>[/code:39hbuayl]
EMG
|
Bug in TMenu [Fixed]
|
Fixed, thanks
|
Bug in TMenu [Fixed]
|
Thank you! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TMenu [Fixed]
|
Any workaround for that user?
EMG
|
Bug in TMenu [Fixed]
|
The menuitems of the main menubar are too wide.
EMG
|
Bug in TMenu [Fixed]
|
This is a sample:
[code=fw:pwndupze]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oWnd, oMenu<br /><br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2015</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test1"</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test2"</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test3"</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test4"</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test5"</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd;<br /> <span style="color: #0000ff;">MENU</span> oMenu<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:pwndupze]
EMG
|
Bug in TMenu [Fixed]
|
Any quick and dirty workaround, please?
EMG
|
Bug in TMenu [Fixed]
|
This is what I get:
[img:2kmtr1bz]https://www.emagsoftware.it/public/menu.png[/img:2kmtr1bz]
EMG
|
Bug in TMenu [Fixed]
|
This not a bug
In menus with styles and not fonts or clause COLORS ( OWNERDRAW items ), you know solution for adjust width of items
[code=fw:3ihqfnok]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> GetnWidthItem<span style="color: #000000;">(</span> <span style="color: #000000;">0.5</span> <span style="color: #000000;">)</span><br /><br /> </div>[/code:3ihqfnok]
There are users who like the widest items to make the menus more readable
|
Bug in TMenu [Fixed]
|
With
[code=fw:1g53sf3u]<div class="fw" id="{CB}" style="font-family: monospace;">GetnWidthItem<span style="color: #000000;">(</span> <span style="color: #000000;">0.5</span> <span style="color: #000000;">)</span></div>[/code:1g53sf3u]
the dropdowns widths are changed too. How can I change the widths of the menuitems on the menubar withouth affecting the menuitems on the dropdowns?
EMG
|
Bug in TMenu [Fixed]
|
Enrico, your are right
I answered too fast
|
Bug in TMenu [Fixed]
|
No problem. Any workaround?
EMG
|
Bug in TMenu [Fixed]
|
Please, wait
|
Bug in TMenu [Fixed]
|
The 2015 clause of the MENU command breaks MENUINFO behaviour (the width of the menu is not enough for the MDICHILD window title).
This is a sample of the problem:
[code=fw:2dfr6ci0]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Working with MDI enviroments</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">static</span> oWnd<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWndEdit, oBar, oIcon<br /> <span style="color: #00C800;">local</span> cName := <span style="color: #ff0000;">"FiveWin power"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">ICON</span> oIcon <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"test"</span> <br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">70</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"I am the MDI Frame"</span> ;<br /> <span style="color: #0000ff;">MDI</span> ;<br /> <span style="color: #0000ff;">MENU</span> BuildMenu<span style="color: #000000;">(</span><span style="color: #000000;">)</span> ; <span style="color: #B900B9;">// COLOR "GR+*/RB" </span><br /> <span style="color: #0000ff;">ICON</span> oIcon<br /><br /> SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Main Window"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndEdit <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">50</span> ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"I am a MDI Child"</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"W+/R"</span><br /><br /> @ <span style="color: #000000;">4</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">GET</span> cName <span style="color: #0000ff;">OF</span> oWndEdit <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">170</span>, <span style="color: #000000;">25</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"BG+/B"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar _3D <span style="color: #0000ff;">OF</span> oWndEdit<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar<br /><br /> SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWndEdit <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Child Window"</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndEdit<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> ;<br /> <span style="color: #0000ff;">VALID</span> MsgYesNo<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Want to End ?"</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> BuildMenu<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oMenu<br /><br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2015</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Information"</span><br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&About..."</span> <span style="color: #0000ff;">ACTION</span> MsgAbout<span style="color: #000000;">(</span> <span style="color: #ff0000;">"FiveWin"</span>, <span style="color: #ff0000;">"FiveTech"</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">SEPARATOR</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&End..."</span> <span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Child Windows"</span><br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Tiled"</span> <span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">Tile</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Cascade"</span> <span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">Cascade</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /><span style="color: #00C800;">return</span> oMenu<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span></div>[/code:2dfr6ci0]
EMG
|
Bug in TMenu [Fixed]
|
Enrico,
Many thanks for the bug report and for the example.
We are going to review it asap
|
Bug in TMenu [Fixed]
|
Thank you, Antonio! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TMenu [Fixed]
|
I add that in some cases even the height of the menuitem is not enough for the menuitem text.
EMG
|
Bug in TMenu [Fixed]
|
All features fixed, solved
----------------------- SPANISH --------------------------
La creación de los items en los menús cuando una ventana hija es creada, no la realiza Fivewin, es realizada por el sistema automáticamente dependiendo del valor de nMenuInfo que pasamos a esa function.
Cuando el nuevo item es creado por el sistema ( ya saben que la característica MDI es manejada por el propio sistema y ya en desuso ), no disponemos del objeto TMenuItem para poder manejar sus propiedades, entre ellas el prompt del item, que en el mensaje WM_MEASUREITEM no es posible obtener, por lo que no es posible determinar su longitud y poder realizar el correspondiente ajuste del ancho del menú en el que se ubica. Sólo es posible determinar el prompt de un item, aunque el nuevo item sea generado por el sistema, en el mensaje WM_DRAWITEM, pero el mensaje WM_MEASUREITEM es ejecutado antes que el mensaje WM_DRAWITEM, por lo que sus dimensiones no han podido ser calculadas y es dibujado con el ancho que ya tuviera el menú en el que se va a ubicar.
Ahora he utilizado el caption de la nueva ventana hija creada para que pueda calcular las dimensiones del item.
Como pueden entender, no es una forma de solucionarlo relacionada con las estructuras y metodologías de los menús, pero ha sido la única forma que he encontrado de poder solucionarlo.
Si alguien encuentra la forma de poder encontrar el prompt de un item a partir del valor de la estructura
typedef struct tagMEASUREITEMSTRUCT {
UINT CtlType;
UINT CtlID;
UINT itemID;
UINT itemWidth;
UINT itemHeight;
ULONG_PTR itemData;
} MEASUREITEMSTRUCT, *PMEASUREITEMSTRUCT, *LPMEASUREITEMSTRUCT;
que es pasada como parámetro lParam en el mensaje WM_MEASUREITEM, por favor, comparta su solución, para poder implementarlo de una forma más "limpia"
------------------------------------- ENGLISH -------------------------------
The creation of the items in the menus when a child window is created, not done by Fivewin, is performed by the system automatically depending on the value of nMenuInfo that we pass to that function.
When the new item is created by the system (you already know that the MDI feature is managed by the system itself and already in disuse), we do not have the TMenuItem object to be able to manage its properties, including the item's prompt, which in the message WM_MEASUREITEM is not possible to obtain, so it is not possible to determine its length and be able to make the corresponding adjustment of the width of the menu in which it is located. It is only possible to determine the prompt of an item, even if the new item is generated by the system, in the WM_DRAWITEM message, but the WM_MEASUREITEM message is executed before the WM_DRAWITEM message, so its dimensions could not be calculated and it is drawn with the width that already had the menu in which it is going to be located.
Now I have used the caption of the new child window created so that I can calculate the dimensions of the item.
As you can understand, it is not a way to solve it related to the structures and methodologies of the menus, but it has been the only way I have found to be able to solve it.
If someone finds a way to find the prompt of an item based on the value of the structure
typedef struct tagMEASUREITEMSTRUCT {
UINT CtlType;
UINT CtlID;
UINT itemID;
UINT itemWidth;
UINT itemHeight;
ULONG_PTR itemData;
} MEASUREITEMSTRUCT, * PMEASUREITEMSTRUCT, * LPMEASUREITEMSTRUCT;
which is passed as parameter lParam in the message WM_MEASUREITEM, please, share your solution, to be able to implement it in a more "clean" way
|
Bug in TMenu [Fixed]
|
Please note that there is no problem when 2015 clause is not used.
EMG
|
Bug in TMenu [Fixed]
|
[quote="Enrico Maria Giordano":3gxwlmzs]Please note that there is no problem when 2015 clause is not used.
EMG[/quote:3gxwlmzs]
It is logical
When the menus are not OWNERDRAW (without styles, fonts, etc.), the menus are painted by the system (Windows) and not by Fivewin.
|
Bug in TMenu [Fixed]
|
Ah, ok. So, without any clauses (2015 or similar) the menu gets a system look?
EMG
|
Bug in TMenu [Fixed]
|
[quote="Enrico Maria Giordano":1mubvsxq]Ah, ok. So, without any clauses (2015 or similar) the menu gets a system look?
EMG[/quote:1mubvsxq]
Yes, from September 2017 version ( read whatsnew )
[quote:1mubvsxq]
* MENUS: By default, when no style is selected, the menus have the appearance of those defined by the OS
because OWNERDRAW is not applied internally to paint the items. Same high and wide as the system menus.
If you want to add any clause to a menu without defining any style, it is necessary to add the COLOR clause
in the definition of our menu
Example:
MENU oMenu
MENUITEM "First"
MENU
MENUITEM "My Test" BOLD
MENUITEM "My Menu" ITALIC
ENDMENU
ENDMENU
In this case, the BOLD and ITALIC clauses are ignored
But, if the menu is defined as:
MENU oMenu COLORS
All clauses are active, if defined, even if no style has been defined
[/quote:1mubvsxq]
In any previous version, all the menus were painted by Fivewin.
|
Bug in TMenu [Fixed]
|
Great, thank you.
EMG
|
Bug in TMenu [Fixed]
|
[code=fw:35ixfde7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> GetnWidthItem<span style="color: #000000;">(</span> <span style="color: #000000;">0.8</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Funciona</span><br /><br /> <span style="color: #0000ff;">MENU</span> oMenu<br /> </div>[/code:35ixfde7]
Regards, saludos.
|
Bug in TMsgItem
|
In the following sample the string CHECKLIST is not centered inside its msgitem:
[code:u50crq65]#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oWnd, oFnt
DEFINE FONT oFnt NAME GETSYSFONT() SIZE 0, -8 BOLD
DEFINE WINDOW oWnd
SET MESSAGE OF oWnd;
TO "This is a status bar";
TIME DATE NOINSET 2007
DEFINE MSGITEM OF oWnd:oMsgBar;
SIZE 80;
PROMPT "CHECKLIST";
FONT oFnt
DEFINE MSGITEM OF oWnd:oMsgBar
ACTIVATE WINDOW oWnd
RELEASE FONT oFnt
RETURN NIL[/code:u50crq65]
EMG
|
Bug in TMsgItem
|
A possible fix seems to replace, in TMsgItem Paint() method:
[code:dwvz6ny4]nLeft - 1 + ( ::nWidth / 2 ) - ( GetTextWidth( hDC, AllTrim( ::cMsg ), ::oMsgBar:oFont:hFont ) / 2 ),;[/code:dwvz6ny4]
with:
[code:dwvz6ny4]nLeft - 1 + ( ::nWidth / 2 ) - ( GetTextWidth( hDC, AllTrim( ::cMsg ), ::oFont:hFont ) / 2 ),;[/code:dwvz6ny4]
EMG
|
Bug in TMsgItem
|
Enrico,
This fix is required in Class TMsgItem:
[code:3ovh191b]
METHOD Paint() CLASS TMsgItem
...
if ::oMsgBar:l2007
::oMsgBar:Say( ::oMsgBar:nHeight / 4 - 2,;
nLeft - 1 + ( ::nWidth / 2 ) - ( GetTextWidth( hDC, AllTrim( ::cMsg ), If( ::oFont != nil, ::oFont:hFont, ::oMsgBar:oFont:hFont ) ) / 2 ),; // new !!!
...
[/code:3ovh191b]
[url=http://imageshack.us:3ovh191b][img:3ovh191b]http://img12.imageshack.us/img12/8291/capturehs0.png[/img:3ovh191b][/url:3ovh191b]
|
Bug in TMsgItem
|
Ok, but it seems not needed as there is
[code:3k1lxmvc]::oFont = If( oFont != nil, oFont, ::oMsgBar:oFont )[/code:3k1lxmvc]
in method New(), if I'm not wrong.
EMG
|
Bug in TMsgItem
|
Enrico,
Then we can simplify the fix <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
[code:2tgn2omt]
GetTextWidth( hDC, AllTrim( ::cMsg ), ::oFont:hFont )
[/code:2tgn2omt]
|
Bug in TMultiGet:Append() method
|
The following sample shows that TMultiGet:Append() method doesn't seem to work:
[code:1cyibnpi]#include "Fwce.ch"
FUNCTION MAIN()
LOCAL oWnd
LOCAL oGet, cVar := ""
DEFINE WINDOW oWnd
@ 1, 1 GET oGet VAR cVar MEMO;
SIZE 200, 100
@ 10, 1 BUTTON "Append";
SIZE 100, 20;
ACTION oGet:Append( "This is a test" + CRLF )
ACTIVATE WINDOW oWnd
RETURN NIL[/code:1cyibnpi]
EMG
|
Bug in TMultiGet:Append() method
|
Any news? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TMultiGet:bChange
|
This is the sample:
[code:apri51yj]#include "Fivewin.ch"
FUNCTION MAIN()
TEST()
TEST()
RETURN NIL
STATIC FUNCTION TEST()
LOCAL oDlg, oBrw
USE TEST
DEFINE DIALOG oDlg
@ 0, 0 LISTBOX oBrw FIELDS
@ 4, 0 BUTTON "&Close" ACTION oDlg:End()
ACTIVATE DIALOG oDlg;
CENTER
CLOSE
RETURN NIL[/code:apri51yj]
If you press Enter you will not hear the beep. But you will hear it if you press Esc.
EMG
|
Bug in TMultiGet:bChange
|
This seems to solve the Enter problem. From KeyChar() method:
[code:1slmo86g] if nKey == VK_RETURN .and. ;
lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_WANTRETURN )
::oWnd:nLastKey = 0
if ::bChange != nil
Eval( ::bChange, nKey, nFlags, Self )
endif
return nil
endif[/code:1slmo86g]
EMG
|
Bug in TProgress [Fixed]
|
Please try the following sample without and with manifest file. Without manifest file it works fine (the bar is filled) while with manifest file the bar is empty. Any workaround?
[code=fw:1nz3apy1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg, oPrg<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">800</span>, <span style="color: #000000;">600</span><br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">PROGRESS</span> oPrg<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> <span style="color: #000000;">(</span> oPrg:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">)</span>,;<br /> oPrg:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> <span style="color: #000000;">10</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:1nz3apy1]
EMG
|
Bug in TProgress [Fixed]
|
Up! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TProgress [Fixed]
|
Enrico,
It is a known bug when using a manifest file with progress bars
Please review samples\progres1.prg to see how to workaround it
|
Bug in TProgress [Fixed]
|
Ok. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
I don't see any valid workaround in progres1.prg... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG
|
Bug in TProgress [Fixed]
|
This is a possible workaround:
[code=fw:e63c8ir1]<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;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oProg1, oProg2<br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Progress Bars"</span><br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">PROGRESS</span> oProg1 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">12</span><br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PROGRESS</span> oProg2 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">12</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">VERTICAL</span><br /> <br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">9</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> oDlg:<span style="color: #000000;">bStart</span> = <span style="color: #000000;">{</span> || Increase<span style="color: #000000;">(</span> oProg1, oProg2 <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> oProg1:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span>,;<br /> oProg2:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #00C800;">function</span> Increase<span style="color: #000000;">(</span> oProg1, oProg2 <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> n<br /><br /> <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">100</span><br /> <span style="color: #00C800;">if</span> n < oProg1:<span style="color: #000000;">nMax</span><br /> oProg1:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> n + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> oProg1:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> n <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> oProg1:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> oProg1:<span style="color: #000000;">nMin</span>, oProg1:<span style="color: #000000;">nMax</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> oProg1:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> oProg1:<span style="color: #000000;">nMax</span> <span style="color: #000000;">)</span><br /> oProg1:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> oProg1:<span style="color: #000000;">nMin</span>, oProg1:<span style="color: #000000;">nMax</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> oProg1:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> oProg1:<span style="color: #000000;">nMax</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> n < oProg2:<span style="color: #000000;">nMax</span><br /> oProg2:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> n + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> oProg2:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> n <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> oProg2:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> oProg2:<span style="color: #000000;">nMin</span>, oProg2:<span style="color: #000000;">nMax</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> oProg2:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> oProg2:<span style="color: #000000;">nMax</span> <span style="color: #000000;">)</span><br /> oProg2:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> oProg2:<span style="color: #000000;">nMin</span>, oProg2:<span style="color: #000000;">nMax</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> oProg2:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> oProg2:<span style="color: #000000;">nMax</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> SysWait<span style="color: #000000;">(</span> <span style="color: #000000;">0.02</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:e63c8ir1]
EMG
|
Bug in TProgress [Fixed]
|
When I run progres1.prg, the progress bars get complete full
|
Bug in TProgress [Fixed]
|
Yes, but only if you use a range 0 -116, that is not what we want.
EMG
|
Bug in TProgress [Fixed]
|
My workaroud works with any range (I hope). The previous was with 0-100, this is with 0-10:
[code=fw:3c4t45cp]<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;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oProg1, oProg2<br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Progress Bars"</span><br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">PROGRESS</span> oProg1 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">12</span><br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PROGRESS</span> oProg2 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">12</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">VERTICAL</span><br /> <br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">9</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> oDlg:<span style="color: #000000;">bStart</span> = <span style="color: #000000;">{</span> || Increase<span style="color: #000000;">(</span> oProg1, oProg2 <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> oProg1:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">)</span>,;<br /> oProg2:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #00C800;">function</span> Increase<span style="color: #000000;">(</span> oProg1, oProg2 <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> n<br /><br /> <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">10</span><br /> <span style="color: #00C800;">if</span> n < oProg1:<span style="color: #000000;">nMax</span><br /> oProg1:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> n + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> oProg1:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> n <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> oProg1:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> oProg1:<span style="color: #000000;">nMin</span>, oProg1:<span style="color: #000000;">nMax</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> oProg1:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> oProg1:<span style="color: #000000;">nMax</span> <span style="color: #000000;">)</span><br /> oProg1:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> oProg1:<span style="color: #000000;">nMin</span>, oProg1:<span style="color: #000000;">nMax</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> oProg1:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> oProg1:<span style="color: #000000;">nMax</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> n < oProg2:<span style="color: #000000;">nMax</span><br /> oProg2:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> n + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> oProg2:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> n <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> oProg2:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> oProg2:<span style="color: #000000;">nMin</span>, oProg2:<span style="color: #000000;">nMax</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> oProg2:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> oProg2:<span style="color: #000000;">nMax</span> <span style="color: #000000;">)</span><br /> oProg2:<span style="color: #000000;">SetRange</span><span style="color: #000000;">(</span> oProg2:<span style="color: #000000;">nMin</span>, oProg2:<span style="color: #000000;">nMax</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> oProg2:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> oProg2:<span style="color: #000000;">nMax</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> SysWait<span style="color: #000000;">(</span> <span style="color: #000000;">1.02</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3c4t45cp]
EMG
|
Bug in TProgress [Fixed]
|
very good <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in TReport
|
The following sample
[code=fw:3r57m9x2]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Report.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> REP01<span style="color: #000000;">(</span> <span style="color: #ff0000;">"1"</span> <span style="color: #000000;">)</span><br /> REP01<span style="color: #000000;">(</span> <span style="color: #ff0000;">"2"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> REP01<span style="color: #000000;">(</span> cNum <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oRpt<br /><br /> USE TEST<br /><br /> REPORT oRpt <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TEST"</span> + cNum PREVIEW<br /><br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"St"</span> <span style="color: #00C800;">DATA</span> Test->State<br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"First Name"</span> <span style="color: #00C800;">DATA</span> Test->First<br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">" Salary"</span> <span style="color: #00C800;">DATA</span> Test->Salary<br /><br /> END REPORT<br /><br /> oRpt:<span style="color: #000000;">CellView</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> REPORT oRpt<br /><br /> CLOSE TEST<br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3r57m9x2]
shows only the first preview and then terminate leaving an error.log containing
[quote:3r57m9x2] Error description: Error BASE/1132 Bound error: array access
Stack Calls
===========
Called from: .\source\classes\RPREVIEW.PRG => TPREVIEW:BUILDWINDOW(448)
Called from: .\source\classes\RPREVIEW.PRG => TPREVIEW:NEW(125)
Called from: .\source\classes\RPREVIEW.PRG => RPREVIEW(1462)
Called from: .\source\classes\REPORT.PRG => (b)TREPORT:NEW(180)
Called from: .\source\classes\REPORT.PRG => TREPORT:ACTIVATE(873)
Called from: REP2.prg => REP01(29)
Called from: REP2.prg => MAIN(8)[/quote:3r57m9x2]
EMG
|
Bug in TReport
|
Any news? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TReport
|
Enrico,
It is not exactly a bug. It is the result of a wrong use of FiveWin, I explain why:
FiveWin uses the first created window as the main window of the application, so when the main window ends, then it means that the application ends too. This concept could be discussed, but it is intended mainly to avoid never ending applications.
If you modify your code this way, then it will work fine:
[code=fw:25398ozo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Report.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd<br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> Reports<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #00C800;">FUNCTION</span> Reports<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> REP01<span style="color: #000000;">(</span> <span style="color: #ff0000;">"1"</span> <span style="color: #000000;">)</span><br /> REP01<span style="color: #000000;">(</span> <span style="color: #ff0000;">"2"</span> <span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />...<br /> </div>[/code:25398ozo]
|
Bug in TReport
|
Great, it works, thank you! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TReport
|
After closing the preview the program crashes with an error and it shows only the first report (the two reports should be in the same preview window):
[code=fw:1mjsvtys]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Report.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oWnd<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> REPORTS<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> REPORTS<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oPrn<br /><br /> <span style="color: #00C800;">PRINT</span> oPrn PREVIEW<br /> REP01<span style="color: #000000;">(</span> oPrn, <span style="color: #ff0000;">"1"</span> <span style="color: #000000;">)</span><br /> REP01<span style="color: #000000;">(</span> oPrn, <span style="color: #ff0000;">"2"</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDPRINT</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> REP01<span style="color: #000000;">(</span> oPrn, cNum <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oRpt<br /><br /> USE TEST<br /><br /> REPORT oRpt <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TEST"</span> + cNum <span style="color: #0000ff;">TO</span> DEVICE oPrn<br /><br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"St"</span> <span style="color: #00C800;">DATA</span> Test->State<br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"First Name"</span> <span style="color: #00C800;">DATA</span> Test->First<br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">" Salary"</span> <span style="color: #00C800;">DATA</span> Test->Salary<br /><br /> END REPORT<br /><br /> oRpt:<span style="color: #000000;">CellView</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> REPORT oRpt<br /><br /> CLOSE TEST<br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:1mjsvtys]
EMG
|
Bug in TRichEdit
|
This is the sample. Try to hit any alphabetic key. It will be rejected:
[code:3ewa7inv]#include "Fivewin.ch"
#include "Richedit.ch"
FUNCTION MAIN()
LOCAL hDll := LOADLIBRARY( "RICHED20.DLL" )
LOCAL oDlg
LOCAL oRich, cVar := ""
DEFINE DIALOG oDlg
@ 0, 0 RICHEDIT oRich VAR cVar
ACTIVATE DIALOG oDlg;
ON INIT oDlg:SetControl( oRich );
CENTER
FREELIBRARY( hDll )
RETURN NIL[/code:3ewa7inv]
EMG
|
Bug in TRichEdit
|
Enrico,
Quite curious. On a window it works ok. And on a dialog only accepts numbers... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
|
Bug in TRichEdit
|
Exactly.
EMG
|
Bug in TRichEdit
|
The sample found in FWH (2.5) TestRich.prg works on a dialog (resource).
It accepts characters too
but if I try to open an existing file it returns the error:
"unrecoverable error 9010: hb_xfree() invalid pointer 004ec06e select the file"
regards
Roberto Chiaiese
|
Bug in TRichEdit
|
Roberto,
Yes, and TestRich.prg keeps working ok in FWH 2.7. It looks as it works ok from resources, but not from source code on a dialog.
With the current Harbour and xharbour versions the error you describe (hb_xfree()) no longer happens.
We keep searching,
|
Bug in TRichEdit
|
The Richedit control does not show bitmaps also.
I'm able to open an rtf file from disk only if I pass its name as a parameter (not trough the button on the sample dialog)
However the control only shows text, not embedded or linked bitmaps
Roberto
|
Bug in TRichEdit
|
I found two dll in my windows directory riched20.dll and riched32.dll
anyone knows the difference ?
I tried both but without any difference, same bugs
Roberto
|
Bug in TRichEdit
|
[quote="chiaiese":356gkp9l]I found two dll in my windows directory riched20.dll and riched32.dll
anyone knows the difference ?
I tried both but without any difference, same bugs
Roberto[/quote:356gkp9l]
The second is only a wrapper to the first (note the small size).
EMG
|
Bug in TRichEdit
|
Enrico,
Fixed the problem in dialogs! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
We are going to re-publish the March build in a few minutes with the new changes and enhancements on Class TRichEdit.
|
Bug in TRichEdit
|
Great! But get ready for more bug reports in this class. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TRichEdit
|
Enrico,
No problem, your feedback is always welcome <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
|
Bug in TRichEdit
|
Antonio,
Objects like bitmaps are also shown now ?
Roberto
|
Bug in TSay
|
Clicking on the button of this sample:
[code:3fikxy9h]#include "Fwce.ch"
FUNCTION MAIN()
LOCAL oWnd, oSay
LOCAL cVar := "Test"
DEFINE WINDOW oWnd
@ 1, 1 SAY oSay VAR cVar
@ 3, 1 BUTTON "Change";
ACTION MSGINFO( oSay:VarGet() )
ACTIVATE WINDOW oWnd
RETURN NIL[/code:3fikxy9h]
you will get
Message not found TSAY:VARGET
EMG
|
Bug in TSay
|
Enrico,
Same as Class TControl Method VarPut(). It was not implemented yet. Its already included for next build:
[code:kf0gco1a]
METHOD VarGet() INLINE If( ValType( ::bSetGet ) == "B", Eval( ::bSetGet ),)
[/code:kf0gco1a]
Thanks for the feedback <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
|
Bug in TSay
|
Thank you!
EMG
|
Bug in TSay
|
The following sample shows the problem:
[code:2m3u7l87]#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg, oSay
LOCAL n := 0
DEFINE DIALOG oDlg
@ 1, 1 SAY oSay PROMPT "Counter: " + LTRIM( STR( n ) );
SIZE 200, 15
@ 2, 1 BUTTON "Start";
ACTION COUNTER( oSay, @n )
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
STATIC FUNCTION COUNTER( oSay, n )
LOCAL i
FOR i = 1 TO 100
n++
oSay:Refresh()
SYSWAIT( 0.01 )
NEXT
TONE( 400, 1 )
RETURN NIL[/code:2m3u7l87]
It should count from 1 to 100 when the button is pressed. Instead the label shows 1 and is not refreshed anymore.
The cause seems to be the statement
[code:2m3u7l87]::VarPut( ::cCaption )[/code:2m3u7l87]
added in the latest TSay class.
EMG
|
Bug in TSay
|
Even during reports generation the counter is not updated anymore.
EMG
|
Bug in TSay
|
Enrico,
We may remove ::VarPut( ::cCaption ) from Class TSay Method SetText(), but then preview page number is wrongly shown.
We need to find a way to fix the preview page number.
|
Bug in TSay
|
Ok, the solution seems to replace in source\classes\rpreview.prg all oPage:SetText(...) into oPage:VarPut(...)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.