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.
- Launch MS Word... I know, I know, just put the crucifix down and humour me for a sec...
- In the new empty document, type "asdf".
- Highlight "asdf".
- Go to Format->Paragraph.
- 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".
- Click the "Up" button and your left indent value increases.
- 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. =}