Solved

changing the range of a spin control

Posted on 2000-03-29
6
194 Views
Last Modified: 2013-11-20
Hi!

I have an application where the value of a field changes the range of available values in another field.  From what i've seen, using setrange32 two times doesn't seem to change the previous range of values sent to the spin using the very same function.  Can you tell me if the range can be set and then reset dynamically?

Thanks!
0
Comment
Question by:asavard
  • 2
  • 2
  • 2
6 Comments
 
LVL 23

Expert Comment

by:naveenkohli
ID: 2667277
you should not have any problem with changing the range value dynamically by SetRange function. Are you resetting the values in some other function? May be thats what you are running into.
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2667301
I am not aware of any limitation here.

Try it in debug mode, and trace all calls to SetRange.

Perhaps you are calling it once with the new and then again with the old values.  Or the values you are actually calling with are not what you think they are.
0
 

Author Comment

by:asavard
ID: 2669374
OK I am an idiot!  Can someone come here and kick my silly ass?  Of course the problem was another function reseting the values.  But worse, the functions were both in the same function.  Well that's what happens when you are bored with some code, you become too lazy to step into it and find a pretty obvious answer...

HO WELL!

OK, who deserves those points?
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 10

Accepted Solution

by:
RONSLOW earned 50 total points
ID: 2672680
Consider your silly ass kicked .. perhaps you can do the same for me sometime, as I kick my own often enough :-)

I think I desrve the pointer .. I suggested that you had two calls.  

Didn't think you'd be silly enough to do it in the same function ;-)

0
 

Author Comment

by:asavard
ID: 2673097
OK RON

Considering you also explained me some stuff as a comment in another question, i think it at least deserves a couple of pointes heh!

Thanks!
0
 
LVL 23

Expert Comment

by:naveenkohli
ID: 2673379
just to make my point..
i think i made that comment first :-)
the problem solved thats what matters..

Have Fun
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

785 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