Click here to Skip to main content
15,793,452 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
i have done these steps
1. Insert two static texts, one edit, and one slider controls.
2. Add variable name slider to slider control which is of Category
Control and of the Variable Type CSliderCtrl.
3. Add variable name slidervalue to edit text which is of Category value and of the Variable Type CString.
4. add this in OnInitDialog() function:
slider.SetRangeMin(1, false);
slider.SetRangeMax(100, false);
sliderValue = "1";
UpdateData(FALSE);
5. Implement the OnHScroll() function as follows:
C#
if(nSBCode == SB_THUMBPOSITION)
    {
    slidervalue.Format(_T("%d"), nPos);
    UpdateData(false);
    }
    else
    {
    CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
    }


now my question is where i can specify the conditions that

MIDL
if(slidervalue="10")
{
//do this
}
Posted
Comments
Sandeep Mewara 28-Jun-10 1:54am    
So many questions posted by you on the last day of your project submission?
Sweety Khan 28-Jun-10 3:08am    
:) i wanna add more features to my project and wannt to complete some uncomplete features. i will be heartly thankful if someone help

If you want to check if the user changes the text in the CEdit (since sliderValue was hooked to a CEdit) you should add an event handler for the EN_CHANGE message from the CEdit.
 
Share this answer
 
C#
m_Slider.SetPos(32);
 
Share this answer
 
Comments
[no name] 21-Mar-13 9:09am    
The question asked and answered 3 years ago. There is no need to answer it again.

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