The Bride of the First House (bride) wrote,
The Bride of the First House

Abbott & Costello Style Software Development

weather: light rain
outside: 10°C
mood: *sigh*
Get this — MFC Class CSpinButtonCtrl exerpt:

Note The default range for the spin button has the maximum set to zero (0) and the minimum set to 100. Since the maximum value is less than the minimum value, clicking the up arrow will decrease the position and clicking the down arrow will increase it. Use CSpinButtonCtrl::SetRange to adjust these values.

Why THE PHUQUE would the maximum be '0' and the minimum be '100'?!?! NONE of the major Microsoft applications (Word, Excel, PowerPoint, Access, for example) have spin controls that work this way.

Do this:

  1. Launch MS Word... I know, I know, just put the crucifix down and humour me for a sec...
  2. In the new empty document, type "asdf".
  3. Highlight "asdf".
  4. Go to Format->Paragraph.
  5. In the "Indentation" section, on the "Left:" setting, there's a field where you can type in the number of inches you want to set your indentation. To the right of that are two little arrow buttons. These are called "Spin Control Buttons".
  6. Click the "Up" button and your left indent value increases.
  7. Click the "Down" button and your left indent value decreases.

You'd be hard-pressed to find a spinner that increases on "Down" and decreases on "Up", but the Microsoft Foundation Class control does the counterintuitive by default.

It's lead to some very amusing exchanges in the style of "Which Way's Up?", "Who's On First?" and "I'm going to START this conversation!"

It's all in a day's work. =}


  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded