• Advertisement
Sign in to follow this  

Accessing slider control value MFC

This topic is 3295 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I want to now how to get the position of the thumb on a slider control after the dialog it is on has been exited, for example:
CBrightness bright; //Brightness Dialog

if( bright.DoModal() == IDOK )
{
	int width = image->getWidth();
	int height = image->getHeight();

	for( int x=0; x < width; ++x )
		for( int y=0; y < height; ++y )
		{
			unsigned char c = image->getPixel( x, y );
			c += bright.m_SliderVal; //Need to use the slider value here
			image->setPixel( c, x, y );
		}
}
As you can see I created a value variable for the control (m_SliderVal), and I tried to use this once DoModal() has ended but it is producing some strange results. Any ideas anyone? thanks

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement