Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can we initialise an output Control Variable of the Text Label as int instead of cstring for slider control ????

i have made a slider control and a text label of type string to control slider. i give the range like that slider1.SetRangeMin(0, false); slider1.SetRangeMax(9, false); but it still shows 0-100 when i move the slider. i wanna give a condition if(slidervalue=="50") but == doesnot use with strings. so i am thinking of initialising control variable as int type thats why asking this.
Posted
Updated 19-Jun-10 21:24pm
v2
Comments
Richard MacCutchan 20-Jun-10 3:24am    
Jayant Dash has given you the answer.

Sweety Khan wrote:
waiting........


There is no need to add comments like this; your query will get answered when someone has something useful to say.

As to your actual question it is not clear what you are trying to do. Please try and rephrase to explain your problem in better detail.
 
Share this answer
 
Comments
Sweety Khan 19-Jun-10 14:00pm    
ok.
i have made a slider control and a text label of type string to control slider. i give the range like that
slider1.SetRangeMin(0, false);
slider1.SetRangeMax(9, false);
but it still shows 0-100 when i move the slider. i wanna give a condition
if(slidervalue=="50") but == doesnot use with strings. so i am thinking of initialising control variable as int type thats why asking this.

Now i know you will say to ask it as a new question.
Sweety Khan 19-Jun-10 15:01pm    
that is my ever stupid question. i can use it like this if(slidervalue="50")
can i delete this question???
if you want to compare the label text to the integer then u have to convert that string to the int type.

GetDlgItemtext(phWnd, ItemID, lBuf);

int lVal = wtoi(lBuf);

now you can compare those values.

hope this helps you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900