Jump to content
  • Advertisement
Sign in to follow this  

Accessing slider control value MFC

This topic is 3570 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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!