The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

A Windows UI thing I just noticed

Thinking back, I've known about this on a user level for years, but it's only just occurred to me to stop and think "Huh?":

Consider the standard Windows message box, configured to display Yes and No buttons. The one you get by calling MessageBox with uType set to MB_YESNO (or as wrapped by your framework of choice). Notice anything strange about it?

No? OK. You see (pressing Alt if necessary under XP) how the Yes button has the Y underlined, and the No button has the N underlined? Standard Windows convention for accelerator keys? Well, the weird thing about _this_ dialog box is that *you don't have to press Alt* to fire the accelerator! Just pressing Y or N is the same as clicking the button!

This might not seem like a big thing. But I just happened to be using a dialog in <some app>, that was like MessageBox except it had a 'Do not show me again' check box. The programmer had correctly given the Yes and No buttons their accelerators; but I was dumbly bashing away at the N button, and wondering why nothing was happening.

Which is how I found this out about MessageBox. If you ask it to do Abort Retry Ignore buttons, then you can just do A R or I (no Alt) there. Strangely, if you supplement your uType with MB_HELP, you get an additional Help button with *no* accelerator (and H does nothing).

Checking other apps I can't seem to find much consistency in whether Alt is required for button / control invocations or not. What's *supposed* to be the rule? I can't find anything in the MSDN.
Larry Lard Send private email
Wednesday, May 31, 2006
 
 
Funny, a post about message boxes just as I post about getting rid of message boxes: http://dualogy.blogs.com/phil/2006/05/nonmodal_user_i.html

Otherwise, yeah I have observed that at some point, too. That programmer must not have been a power keyboarder, which is strange for a programmer.
Philipp Schumann Send private email
Wednesday, May 31, 2006
 
 
> What's *supposed* to be the rule? I can't find anything in the MSDN.

What about the MWUE? http://tinyurl.com/qgge6 says

  Also define access keys to provide navigation to
  controls within a secondary window. This allows
  the user to access a control by pressing and
  holding the ALT key and an alphanumeric key that
  matches the access key character designated in the
  label of the control.

  ...

  Unmodified alphanumeric keys also support navigation
  if the control that currently has the input focus
  does not use these keys for input.
Chris Nelson Send private email
Wednesday, May 31, 2006
 
 
I looked there but missed that second paragraph :( Thanks for finding it for me.

Also, Philipp Schumann, your screenshots are very pretty indeed. I wish my apps looked half as good!
Larry Lard Send private email
Wednesday, May 31, 2006
 
 
Thanks.  :)  It's something I want to sell at some point so looks are more important than they would otherwise be...
Philipp Schumann Send private email
Wednesday, May 31, 2006
 
 
Philipp +1 on the nice UI. Could you say who you used for the icons?
sconto
Thursday, June 01, 2006
 
 
Mainly http://www.famfamfam.com/lab/icons/silk/ --- I guess they're fast becoming the "non-MS icon standard"  ;)
Philipp Schumann Send private email
Thursday, June 01, 2006
 
 
I think Message Boxes are VERY useful.....I opt to counter the vote to get rid of them.....I hope they never go away!

I use them all the time when I program....there is NOTHING wrong with using them...
Brice Richard Send private email
Saturday, June 03, 2006
 
 
I think i read this somewhere, maybe even on this forum
quote
Only reason MessageBoxes exist is because it is very hard to implement proper undo functionality
unquote
Seemore
Wednesday, June 07, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz