replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - %em/%mn menu corruption
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

%em/%mn menu corruption

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
steveDoyle



Joined: 04 Sep 2009
Posts: 117
Location: Manchester

PostPosted: Thu May 22, 2014 11:25 am    Post subject: %em/%mn menu corruption Reply with quote

i think there is a possible issue with %em when applied to %mn

when the menu entry reaches about 30 characters the resulting menu only shows 6-7 characters.

it is a bit strange as i can generated entries in the "recent file" list upto 64 characters

test code

program test_em

include <windows.ins>
integer test_cb
external test_cb
integer iwin
IWIN = WINIO@('%em[theme1]&')
! this menu item displays as expected
! IWIN = WINIO@('%mn[menu[&12345678901234567890123456789]]&',
! this menu item rsults in a thin menu
IWIN = WINIO@('%mn[menu[&123456789012345678901234567890]]&',
+ test_cb)
IWIN = WINIO@('%ff')

end
integer function test_cb()

test_cb = 1
end
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Thu May 22, 2014 4:15 pm    Post subject: Reply with quote

I will log this for investigation.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Tue Jan 20, 2015 5:37 pm    Post subject: Reply with quote

This issue has been investigated and the reason for the limitation to about 30 characters when using one to the themes is not apparent. At the moment it looks like it may be somewhere in the depths of the Microsoft API.

The essence of the issue is that ClearWin+ uses a call to ModifyMenu for the themes and a call to SetMenuItemInfo (with HBMMENU_CALLBACK) otherwise.
Hence ClearWin+ draws the menu text for a themed menu otherwise this is done by the API. In both cases the width of a menu item appears to set by the API and this is what is causing the problem.

For the moment this is a known limitation when using %em with one of the theme options w7, w8, theme1 and theme2.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Tue Jan 20, 2015 5:50 pm    Post subject: Reply with quote

Steve,

While many applications do have a most recently used (MRU) file list dynamically attached to the File menu, quite a lot of applications only have a'Recent files'item that opens up a dialog box. This makes me think that the issue is a long-standing one for Windows, and isn't merely an issue for FTN95.

If you see how recent MS Office versions cope with MRU files lists, they are even more elaborate, and my favourite Corel applications seem to have incorporated the MRU list in a second startup splash screen.

I think having a look around other applications and handling the issue via an alternative approach may even make your software look more 'modern'.

Eddie

PS Before putting a user file saved into the MRU repository up in a menu or anywhere else, it is worth checking that it exists. It is frustrating to click on it to select it, but then find that it won't start up, because it can't be found. Saving it on removable media (subsequently removed) is a case in point. It is easier to show accessible and inaccessible user files in a dialog box approach than it is in a dynamic menu, as greying the names out is not helpful to a novice user.
Back to top
View user's profile Send private message
steveDoyle



Joined: 04 Sep 2009
Posts: 117
Location: Manchester

PostPosted: Fri Jan 30, 2015 12:22 pm    Post subject: Reply with quote

Eddie


I have altered my MRU implementation to give an abbreviated version of the file-path when in win7/8, theme 1&2 but is does look a little cryptic.

I will look at alternative mechanisms as you suggest

I also run into menu issues in areas apart from the MRU list with industry standard names for certain type of analysis

It is a shame the the %em has such limitations as it was a relatively efficient way of getting a more modern look to the applications

tahnks

steve
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Fri Jan 30, 2015 2:44 pm    Post subject: Reply with quote

Steve,

I'm fascinated by the issue with 'industry standard names'.

I've stalled in my attempts to bring the Windows 8 'Metro' style into any of my applications. MS Office is the least standards conforming of any software (MS standards on User Experience, that is), but in the past I've viewed it as pointing the way forward. Now, I'm not so sure.

Paul's 'menus with icons', increase the line spacing to cater for 16x16 icons, but this looks odd. Normally this is done with 13x13 icons which look right, but MS Office has its 'ribbon' with no menus at all, and in my Office 365, the tabs are in capitals which not only looks awful, but also is contrary to decades of Windows standards. Its scroll bars disappear if you don't use them for a while, which is also contrary to the standards recommended by MS.

Eddie
Back to top
View user's profile Send private message
steveDoyle



Joined: 04 Sep 2009
Posts: 117
Location: Manchester

PostPosted: Fri Jan 30, 2015 3:19 pm    Post subject: Reply with quote

Eddie

The Industry standard names i refer to are from the world of engineering/thermodynamics as many of my users often do not have English as their first language to abbreviations can get confusing.

Users like consistency rather than optimality. I have wasted countless man-years effort of trying to keep up with the ever changing look/feel of windows that is decided by some style guru or focus group that is accountable to nobody in the real world.

You are quiet correct that MS does not conform to its owns standards so why should the wider user community.

I just look at the features of Clearwin+ and implement what is of benefit to the end user. I even stopped using feature like %PB as a lot of my users got confused with them as they are not seen in other windows applications.

Steve
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Sat Jan 31, 2015 1:13 pm    Post subject: Reply with quote

Steve,

I agree with what you say. My applications are entirely non-commercial, but I have a range of users with a very variable range of knowledge and expertise.

Most of them are used to using MS Office applications, and so something that looks and feels recognisably similar makes them feel comfortable from the get-go. The divergence from what I could do with Clearwin+ and what was happening in Office started after Office 2003, with the introduction of the 'ribbon' as a hybrid of toolbar and menu. I found that I could largely imitate the 3D toolbar look in 2003 and 2007, plus of course, elements from 2010, but at huge cost in redrawing icons for toolbars. While I can draw icons in Metro style, it's the rest of it I can't emulate.

I also have an exclusion list of controls I can't make work, or at least can't make work in a way that is helpful to me, and there are a smaller handful of things that I would find useful, such as 're-blanking' a data input box and clearing the mouse events queue so that after I've registered one I don't get 'bounce'.

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Sat Jan 31, 2015 2:01 pm    Post subject: Reply with quote

Re-blanking data input might be quite easy.

For example, for %rd and %rf you could use a call to SetWindowText(hwnd, "").
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Sat Jan 31, 2015 5:19 pm    Post subject: Reply with quote

That's great - I'll try it.

eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group