Click here to Skip to main content
15,922,007 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone,

I want to display the value on the dialog box depending upon the slider position (Slider control). As the slider moves the value should change. For this am using static text tool. I have created int type variable of the static text and am updating it under CustomDraw Event handler. The value is getting updated but it gets overwritten on the previous value. I tried invalidate function too but its not working. Please help me out.
Here the code am using.

C++
void CSensorGain::OnNMCustomdrawSensorgainGapmodeslider(NMHDR *pNMHDR, LRESULT *pResult)
{
	LPNMCUSTOMDRAW pNMCD = reinterpret_cast<LPNMCUSTOMDRAW>(pNMHDR);
	// TODO: Add your control notification handler code here
	*pResult = 0;
	
	m_GapModeResistanceControl.Invalidate(TRUE);
	m_GapModeResistance = m_GapModeSlider.GetPos();
		
	UpdateData(FALSE);
}
Posted
Updated 27-May-13 1:59am
v2
Comments
Richard MacCutchan 27-May-13 9:43am    
I don't see anything in the above that is writing to a static text label. Also, what's wrong with using SetWindowText()?

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