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 ?
win32Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Meir RivkinConnect With a Mentor Full stack Software EngineerCommented:
or go to the link below and download it, whatever u like:
http://codeproject.com/miscctrl/lbspin.asp
0
 
MichaelSCommented:
Did you tried EnableWindow(FALSE)?
0
 
win32Author Commented:
Now see thats the problem MichaelS if i do it like that I will enable/disable all of the button..
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
Meir RivkinFull stack Software EngineerCommented:
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)
0
 
win32Author Commented:
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 ?
0
 
sri_darrCommented:
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.
0
 
Meir RivkinFull stack Software EngineerCommented:
win32: no other way dude, and let me disagree, i think this smart spin control is totaly cool and no hard work too.
0
 
MadYugoslavCommented:
Try to set range of spin control to Min, Max.
Then Set position to Min or Max to disable Up or DOWN arrow.
0
 
win32Author Commented:
Sure sedqwick it's cool, just a bit of code to get the job done, but thanks for the help :-)
0
 
win32Author Commented:
Sure sedqwick it's cool, just a bit of code to get the job done, but thanks for the help :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.