Solved

CSpinButtonCtrl Disable/Enable

Posted on 2001-06-12
10
699 Views
Last Modified: 2013-11-20
Can you disable, the UP/DOWN button, in a CSpinbuttonCtrl.. I don't wanna disable both up/down..

How is it done ?
0
Comment
Question by:win32
10 Comments
 
LVL 6

Expert Comment

by:MichaelS
ID: 6182273
Did you tried EnableWindow(FALSE)?
0
 

Author Comment

by:win32
ID: 6182292
Now see thats the problem MichaelS if i do it like that I will enable/disable all of the button..
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 6182387
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
 
LVL 42

Accepted Solution

by:
sedgwick earned 100 total points
ID: 6182393
or go to the link below and download it, whatever u like:
http://codeproject.com/miscctrl/lbspin.asp
0
 

Author Comment

by:win32
ID: 6182970
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 4

Expert Comment

by:sri_darr
ID: 6183456
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
 
LVL 42

Expert Comment

by:sedgwick
ID: 6184931
win32: no other way dude, and let me disagree, i think this smart spin control is totaly cool and no hard work too.
0
 
LVL 2

Expert Comment

by:MadYugoslav
ID: 6184973
Try to set range of spin control to Min, Max.
Then Set position to Min or Max to disable Up or DOWN arrow.
0
 

Author Comment

by:win32
ID: 6258897
Sure sedqwick it's cool, just a bit of code to get the job done, but thanks for the help :-)
0
 

Author Comment

by:win32
ID: 6258898
Sure sedqwick it's cool, just a bit of code to get the job done, but thanks for the help :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
while loop over for loop 7 93
FizzBuzz challenge 9 76
firstChar challenge 13 110
wordappend challenge 8 147
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now