Shoutbox

ScrollBarControl - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: ScrollBarControl (/showthread.php?tid=68431)

ScrollBarControl by bigbob85 on 11-14-2006 at 09:57 AM

Does anyone have any idea how to use this??

I haven't seen any scripts that use this and I can't get it to flukishly work.

EDIT :

code:
<Control xsi:type="ScrollBarControl " Id="ScrollBar">
    <Position Top="5" Width="100" Height="100" Left="5" />
    <VerticalBar></VerticalBar>
    <HorizontalBar></HorizontalBar>
</Control>

Thats as much as PlusInterface.xsd requires (I think).

EDIT 2 :

code:
<Control xsi:type="ScrollBarControl" Id="ScrollBar">
    <Position Top="5" Width="100" Height="100" Left="5" />
    <VerticalBar></VerticalBar>
</Control>

Fixed the space, and only have one Bar thing. I can put it there, but don't see anyway to use it yet, anyone got any ideas?
RE: ScrollBarControl by matty on 11-14-2006 at 03:31 PM

Not all controls are usable by scripts.


RE: ScrollBarControl by Mnjul on 11-14-2006 at 04:12 PM

You'll probably need to use SendControlMessage along with SBM_* messages. Search for MSDN Library for details :)


RE: ScrollBarControl by matty on 11-14-2006 at 05:39 PM

quote:
Originally posted by Mnjul
You'll probably need to use SendControlMessage along with SBM_* messages. Search for MSDN Library for details :)
I tried previously didn't work, the scrollbar wouldn't change when I clicked it, I set the Max and Min values and clicking it wouldn't change the position..

SBM_* Messages

quote:
Originally posted by Mnjul
plz wub me
I will wub wu

RE: ScrollBarControl by markee on 11-15-2006 at 04:47 AM

I also gave this a try once and even had a go at attaching it to a textbox that you couldn't see al of it but it didn't work (it made the scrollbar like one pixel wide if i remember rightly).  I thought it was me doing something wrong but maybe not...


RE: ScrollBarControl by Patchou on 11-15-2006 at 05:12 AM

it's usable as every other control with windows messages, hwoever, scrollbars are a pain in the bottom, even in C++ programs, they're just miles from being user friendly. Here's a piece of code from Plus! that may help you.

code:
SCROLLINFO infoScroll; ZeroMemory(&infoScroll, sizeof(infoScroll));
        infoScroll.cbSize = sizeof(SCROLLINFO);
        infoScroll.fMask = SIF_DISABLENOSCROLL|SIF_PAGE|SIF_POS|SIF_RANGE;
        infoScroll.nPage = rcOptionsArea.Height();
        infoScroll.nMax = pOptionsWnd->m_nRealHeight;
        infoScroll.nPos = pOptionsWnd->m_nCurrentScrollPos;
        if(infoScroll.nMax <= (int)infoScroll.nPage)
        {
            ::EnableScrollBar(wndScroll, SB_CTL, ESB_DISABLE_BOTH);
            wndScroll.ShowWindow(SW_HIDE);
        }
        else
        {
            ::EnableScrollBar(wndScroll, SB_CTL, ESB_ENABLE_BOTH);
            wndScroll.ShowWindow(SW_SHOW);
        }

        :: SetScrollInfo(wndScroll, SB_CTL, &infoScroll, TRUE);