Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Pointer array question

mojo0000mojo0000 Member Posts: 1
Hi everyone. I am trying to generate a certain number of sliders on my CDialog, that certain number is not fixed. I managed to make the sliders appear by doing this:

for certain length{
CSliderCtrl *tracker = new CSliderCtrl();
tracker->Create(WS_CHILD | WS_VISIBLE,
CRect(left, top, right, bottom), this, i);
}

However when I try to get the results of each slider, it only returns the position of the last slider:

for certain length{
int f = tracker->GetPos();
Change f to fString;
MessageBox(fString);
}

Is the only around this to use arrays? I tried to set up an array of sliders but it's not working. I don't think I understand what I need to do to program it. Any help is appreciated! Thanks.

Comments

Sign In or Register to comment.