OWL NExt - Knowledge Base

[ Home | Contents | Search | Next | Previous | Up ]

TVSlider and constant updating?

Date: 11/30/99
Time: 12:24:17 AM

Q. I've seen many programs that update slider postions while moving the tab. How can I do that. I have a derived TSlider Class and know of the
protected update function but cannot seem to get a screen update. Any thoughts?

A.

    DEFINE_RESPONSE_TABLE1(MyDialog, TDialog)
    EV_WM_HSCROLL,
    END_RESPONSE_TABLE;

void MyDialog::EvHScroll (uint /*scrollCode*/, uint /*thumbPos*/, HWND hWndCtl)
{
    SetDlgItemInt(IDC_GOTO_EDIT, ::SendMessage(hWndCtl, TBM_GETPOS, 0, 0l), false);
}

Yura

Last changed: July 14, 2001