May 04, 2024, 12:11:49 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Dialog/Scrollbar

Started by Parker, February 12, 2006, 08:13:05 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Parker

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?

Ionic Wind Support Team

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.
Ionic Wind Support Team

Parker

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).

Ionic Wind Support Team

Windows sends WM_HSCROLL and WM_VSCROLL messages for scrollbars, hence the separate handlers.  It's another Microsoft inconsistancy with controls ;)
Ionic Wind Support Team