IonicWind Software

Aurora Compiler => GUI => Topic started by: Parker on February 12, 2006, 08:13:05 PM

Title: Dialog/Scrollbar
Post by: Parker on February 12, 2006, 08:13:05 PM
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?
Title: Re: Dialog/Scrollbar
Post by: Ionic Wind Support Team on February 12, 2006, 09:30:02 PM
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.
Title: Re: Dialog/Scrollbar
Post by: Parker on February 13, 2006, 08:20:44 AM
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).
Title: Re: Dialog/Scrollbar
Post by: Ionic Wind Support Team on February 13, 2006, 01:48:43 PM
Windows sends WM_HSCROLL and WM_VSCROLL messages for scrollbars, hence the separate handlers.  It's another Microsoft inconsistancy with controls ;)