win32
asked on
CSpinButtonCtrl Disable/Enable
Can you disable, the UP/DOWN button, in a CSpinbuttonCtrl.. I don't wanna disable both up/down..
How is it done ?
How is it done ?
Did you tried EnableWindow(FALSE)?
ASKER
Now see thats the problem MichaelS if i do it like that I will enable/disable all of the button..
if u wanna disable one of them u need to post your e-mail address and i'll send u a sample program since its pretty long (but not difficult though)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I can see that.. Hmm but it's not realy cool, youd would have to overload that standard MFC class, because it is not included..
There is no other way ?
There is no other way ?
The other way is to process the click :-) ... Jokes apart ... What you cd do is leave it enabled .. and OnClick of that spin button you wd anyway get the message and when u get the message as say an UPSPIN, and your program knows that it should not UPSPIN - just give a BEEP and don't process further.
In essence, just add the BEEP in you OnClick function when u don't need it.
In essence, just add the BEEP in you OnClick function when u don't need it.
win32: no other way dude, and let me disagree, i think this smart spin control is totaly cool and no hard work too.
Try to set range of spin control to Min, Max.
Then Set position to Min or Max to disable Up or DOWN arrow.
Then Set position to Min or Max to disable Up or DOWN arrow.
ASKER
Sure sedqwick it's cool, just a bit of code to get the job done, but thanks for the help :-)
ASKER
Sure sedqwick it's cool, just a bit of code to get the job done, but thanks for the help :-)