Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 754
  • Last Modified:

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 ?
0
win32
Asked:
win32
1 Solution
 
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
 
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Meir RivkinFull stack Software EngineerCommented:
or go to the link below and download it, whatever u like:
http://codeproject.com/miscctrl/lbspin.asp
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now