I'm wondering, since dialogs work differently than windows and don't have actual control objects, how would I manipulate a scrollbar control generated by the dialog editor?
Is it safe to make a CScrollBar* in the OnInitDialog method and modify that?
Could you be a little bit more specific? Look at the modplayer demo I posted. That uses two scrollbars in a dialog.
CScrollBar *pScroll = GetControl(VOLUME_SCROLL);
pScroll->SetScrollRange(0,100);
pScroll->SetScrollPos(0);
Then just add handlers for OnHScroll and OnVScroll.
Paul.
Thanks, I'll try that. I was trying to handle scrolling in the OnControl handler, I'll try OnHScroll later today (it's a horizontal scrollbar).
Windows sends WM_HSCROLL and WM_VSCROLL messages for scrollbars, hence the separate handlers. It's another Microsoft inconsistancy with controls ;)