An Spin control next to an Edit control increases by down arrow and decreases by up arrow...Strange as it seems ,how do you swap this functionality.
Printable View
An Spin control next to an Edit control increases by down arrow and decreases by up arrow...Strange as it seems ,how do you swap this functionality.
The reason for this is the maximum value is 0 and minimum value is 100.hrm..
Try setting maximum to 100 and minimum to 0, or whatever numbers you want to use. This should work.
Max 100 and Min 0 is set by the control itself and i have not set them....
and there is no ref to Min and Max on the aproperties on the CTRL.
Hi,
with Your Spin Control You have a message handler:
OnDeltapos(NMHDR* pNMHDR, LRESULT* pResult)
Class wizard defines a variable in it:
NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
The numbers are changed with the value
pNMUpDown->iDelta
To swap it You only have to multiplicate it with -1.
BTW: the direction of the spin button is exactly the same as it is with scrollbars. So, lots of people (including me) would expect the standard behavior...
HTH
Rudolf
void CSpinButtonCtrl::SetRange( int nLower, int nUpper );
Good Stuff...Thanks