Prev: different languages: text file for each language | method to add these text files to the items
Next: different languages: text file for each language | method to add these text files to the items
From: Joseph M. Newcomer on 21 Jun 2010 14:35 See below... On Mon, 21 Jun 2010 21:01:46 +0300, Timothy Madden <terminatorul(a)gmail.com> wrote: >Hello > >I try to present the user with a pop-up menu using TrackPopupMenu, and >although I use menu items with text like _T("&Set UIO Area"), with an >ampersand in front of S to get the letter underlined in the menu so user >knows she can press 'S' key on the keyboard to chose the command from >the menu. > >However the letters never get underlined and I hear this is a Windows >2000 "feature" (is that how they call bugs today ?) and that I have to >changes some system settings in display control panel to get the meniu >right. > >The problem is my client wants the shortcuts on the menu, and I can not >make settings on the client's computer :( **** This is not a decision your client is allowed to make, or has any power over. Only the end user can determine if this is going to be happening, and all they can do is accept the end user's decision. So the answer is: don't waste time trying to figure it out, and don't waste time trying to implement anything. It is not your decision, it is not your client's decision, it is solely and exclusively a decision that the end user, and ONLY the end user, is allowed to make. You put the &s in, and that is the end of your responsibility. The number of people who think they are allowed to dictate final decisions to the end user is huge, and they are all WRONG! ***** > >Is there a way to changes this setting in my application and get the >menu right ? **** No. Stop wasting time. Tell the client that they are not permitted to change the end user's decision, that there is no reliable mechanism for this, and it is a Really Bad Idea. So suck it in and live with it, already! No end user is going to be happy if they find that you have changed their settings. To get it to even pretend to be correct requires endless fiddling, and you are bound to break the user's settings anyway, and this is fatal to product acceptance. joe **** > >Thank you, >Timothy Madden Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Goran on 22 Jun 2010 06:21 On Jun 21, 8:01 pm, Timothy Madden <terminato...(a)gmail.com> wrote: > Hello > > I try to present the user with a pop-up menu using TrackPopupMenu, and > although I use menu items with text like _T("&Set UIO Area"), with an > ampersand in front of S to get the letter underlined in the menu so user > knows she can press 'S' key on the keyboard to chose the command from > the menu. > > However the letters never get underlined and I hear this is a Windows > 2000 "feature" (is that how they call bugs today ?) and that I have to > changes some system settings in display control panel to get the meniu > right. > > The problem is my client wants the shortcuts on the menu, and I can not > make settings on the client's computer :( > > Is there a way to changes this setting in my application and get the > menu right ? Another one to tell you that you're doing it wrong©. That setting is for the user to make. It's there on their system, it's their prerogative, and AFAIK, it's not a per-app setting. If user activates context menu with the keyboard (which you should allow them to!), they __will__ see the underline from the get-go, so in a way, either you or they should get their act straight. Don't try to change the setting. Do things correctly and explain to the user how to achieve desired (or near-desired) result. Goran.
From: Goran on 22 Jun 2010 07:36 On Jun 22, 12:52 pm, Timothy Madden <terminato...(a)gmail.com> wrote: > Joseph M. Newcomer wrote: > > See below... > > On Mon, 21 Jun 2010 21:01:46 +0300, Timothy Madden <terminato...(a)gmail.com> wrote: > > >> Hello > > >> I try to present the user with a pop-up menu using TrackPopupMenu, and > >> although I use menu items with text like _T("&Set UIO Area"), with an > >> ampersand in front of S to get the letter underlined in the menu so user > >> knows she can press 'S' key on the keyboard to chose the command from > >> the menu. > > >> However the letters never get underlined and I hear this is a Windows > >> 2000 "feature" (is that how they call bugs today ?) and that I have to > >> changes some system settings in display control panel to get the meniu > >> right. > > >> The problem is my client wants the shortcuts on the menu, and I can not > >> make settings on the client's computer :( > > **** > > This is not a decision your client is allowed to make, or has any power over. Only the > > end user can determine if this is going to be happening, and all they can do is accept the > > end user's decision. So the answer is: don't waste time trying to figure it out, and > > don't waste time trying to implement anything. It is not your decision, it is not your > > client's decision, it is solely and exclusively a decision that the end user, and ONLY the > > end user, is allowed to make. You put the &s in, and that is the end of your > > responsibility. > > Of course I would not change the global settings for the user. > > I want to ask if there is a way to change the settings for my > application only, or at least if I can convince my pop-up menu only to > display the damn underlines. > > About the context menu key, the thing is I am subclassing the Web > Browser control to add some extra functionality (the ability to select > areas or parts of an HTML page) and to change the IE context menu, and I > think it would be nice if the user would still have some option left to > get the original IE menu in case she might need it. So I think it is a > good idea to open the new context menu, required by my client, with the > mouse, but still have the IE menu available if the context menu key is > used (as you may guess, my client is likely to never notice the original > menu is still there, and even if it does they are likely not interested > about it). The application is used for evaluatin web design outputs and > not for navigation, so the original IE8 page context menu is not needed > by the client. > > Besides I find it a really reasonable request from my client to have the > key shortcuts on the menu, I mean really I think they should be there But they __are__ there: when you invoke a context menu through a keyboard, you get shortcuts. It's logical: you are working with the keyboard, it's useful. If, however, you invoke the menu with the mouse, why do you need shortcuts? So that you can leave the mouse and work with keyboard? How's that good? On top of that, if you are using a mouse, shortcuts are just a visual nuisance. And, if the customer is hell-bent on having them, he/she can re-enable them through Control Panel. You know what? Your "original" error is changing the rules of the game in the first place - you did that when you decided to use (I am guessing) right mouse button click to pop-up your own menu. I honestly believe that your idea is not good. There are three ways to invoke context menu in windwos: ctx menu key, Shift-F10 and right mouse click. They behave as they do since a long time ago. Now you come in and decide that you will use one of three ways, but make it behave as other two. Well, you deserve your faith when you meddle like that. I hope you fail with this idea. That said, how about having two modes in your program: one when invoking ctx menu invokes your own, and another when you leave it to the browser control? Goran.
From: Joseph M. Newcomer on 22 Jun 2010 13:00 See below... On Tue, 22 Jun 2010 13:52:02 +0300, Timothy Madden <terminatorul(a)gmail.com> wrote: >Joseph M. Newcomer wrote: >> See below... >> On Mon, 21 Jun 2010 21:01:46 +0300, Timothy Madden <terminatorul(a)gmail.com> wrote: >> >>> Hello >>> >>> I try to present the user with a pop-up menu using TrackPopupMenu, and >>> although I use menu items with text like _T("&Set UIO Area"), with an >>> ampersand in front of S to get the letter underlined in the menu so user >>> knows she can press 'S' key on the keyboard to chose the command from >>> the menu. >>> >>> However the letters never get underlined and I hear this is a Windows >>> 2000 "feature" (is that how they call bugs today ?) and that I have to >>> changes some system settings in display control panel to get the meniu >>> right. >>> >>> The problem is my client wants the shortcuts on the menu, and I can not >>> make settings on the client's computer :( >> **** >> This is not a decision your client is allowed to make, or has any power over. Only the >> end user can determine if this is going to be happening, and all they can do is accept the >> end user's decision. So the answer is: don't waste time trying to figure it out, and >> don't waste time trying to implement anything. It is not your decision, it is not your >> client's decision, it is solely and exclusively a decision that the end user, and ONLY the >> end user, is allowed to make. You put the &s in, and that is the end of your >> responsibility. > >Of course I would not change the global settings for the user. > >I want to ask if there is a way to change the settings for my >application only, or at least if I can convince my pop-up menu only to >display the damn underlines. **** No. Not even worthy of consideration, because even this decision belongs to the end user, not to you. If they've turned the option off, it is simply not permissible for you to change that behavior. **** > >About the context menu key, the thing is I am subclassing the Web >Browser control to add some extra functionality (the ability to select >areas or parts of an HTML page) and to change the IE context menu, and I >think it would be nice if the user would still have some option left to >get the original IE menu in case she might need it. So I think it is a >good idea to open the new context menu, required by my client, with the >mouse, but still have the IE menu available if the context menu key is >used (as you may guess, my client is likely to never notice the original >menu is still there, and even if it does they are likely not interested >about it). The application is used for evaluatin web design outputs and >not for navigation, so the original IE8 page context menu is not needed >by the client. **** Rationale doesn't matter. The presence of highlighting is a user-selected option. Therefore, whatever happens, happens, and you cannot change it. **** > >Besides I find it a really reasonable request from my client to have the >key shortcuts on the menu, I mean really I think they should be there **** Doesn't matter what you or the client thing. The OS does what the OS does, and it does it unfiormly for everyone. You are entitled to register this as a bug with Microsoft Connect, but you are not going to change what happens in hundreds of millions of operating systems worldwide. Not worth worrying about. Concentrate on things that matter. I've had to tell clients "take it up with Microsoft, or be prepared to spend amazing amounts of money while I try to make it work the way you want. I can't guarantee I will succeed, but it will cost you a lot of money while I try. Your choice. Note that you won't like the cost or the final result, assuming it can be done at all, but I'm willing to take all your money until you have nothing left. And I can practically guarantee that the end users will complain, and we'll have to rip it all out anyway." It is amazing how many clients are suddenly willing to accept whatever the OS does. joe **** > >Thank you >Timothy Madden Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: David Ching on 22 Jun 2010 15:12
"Timothy Madden" <terminatorul(a)gmail.com> wrote in message news:4c2095d3$0$285$14726298(a)news.sunsite.dk... > I want to ask if there is a way to change the settings for my application > only, or at least if I can convince my pop-up menu only to display the > damn underlines. > Like everyone here, I don't think it's a good idea to special case the behavior for your app, but since you asked if there was a way, I believe this will work for you. There's a good chance Windows calls SystemParametersInfo(SPI_GETKEYBOARDCUES) or SystemParametersInfo(SPI_GETMENUUNDERLINES) to determine whether to show your menus with underlines. So, the idea is to use API hooking of SystemParametersInfo() so that your function is called. In your function, if it is either SPI_GETMENUUNDERLINES or SPI_GETKEYBOARDCUES, set TRUE so that the underlines will be present in your app regardless of the global user setting. I recommend MadCodeHook as the API hooking library. Others include MS Detours and some free ones you can find by internet searching. -- David |