Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3029

CSliderCtrl::SetPos() Problem

$
0
0
Hi community,
i have a problem to set sliderposition programmaticaly, it would be great if someone can help?

This is my try:

//pointer to my slider control:
// On the begining the range ist 1 to 10
// and the position is on 5
// change the range:
pSliderCtrl->SetRange(1, 100); // ok no problems

// Now, how to "move" btw. how to redraw the position of the slider thumb
// programmaticaliy with c++? Need to send some message, if yes what message i need to send to slider control to move (reposition) the slider thumb?
I try with
// first:
::SendMessage(pSlider->m_hWnd, WM_NOTIFY, TRBN_THUMBPOSCHANGING, 0);
// then with:
::SendMessage(pSlider->m_hWnd, WM_NOTIFY, NM_RELEASEDCAPTURE, 0);

but nothing happens? :(

i know i do something wrong, but what?

Thanks in advance
break;

Viewing all articles
Browse latest Browse all 3029

Latest Images

Trending Articles



Latest Images