What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » slidercontrol in vertical

slidercontrol in vertical
Author: Message:
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: RE: slidercontrol in vertical
quote:
Originally posted by Felu
Try using [Library] SliderControl?

That shouldn't be necessary.

What message are you looking for?

For horizontal scrollbars, you'll want to look for WM_HSCROLL. However, since your scrollbar is vertical, you'll want to register a notification for WM_VSCROLL. However, you will need to do further processing on wParam to find the specific action being executed on the scrollbar.

This code is not tested but should probably work (it does not check specifically what is happening with the scrollbar):
code:
var WM_HSCROLL = 0x0114;
var WM_VSCROLL = 0x0115;

function OnEvent_Initialize(bMessengerStart){
     // Create a window that theoretically contains both a horizontal and vertical scrollbar.
     var pWnd = MsgPlus.CreateWnd("ScrollbarExample.xml", "ScrollbarWnd");
     // Register message notifications for each type of scrollbar
     pWnd.RegisterMessageNotification(WM_HSCROLL);
     pWnd.RegisterMessageNotification(WM_VSCROLL);
}

// An event for the window
function OnScrollbarWndEvent_MessageNotification(pWnd, nMessage, wParam, lParam){
     // check which message it is
     switch(nMessage){
          case WM_HSCROLL: // if it is the horizontal one
               Debug.Trace("Horizontal scrollbar changed!");
               break; // so it doesn't go on
          case WM_VSCROLL: // if it is the vertical one
               Debug.Trace("Vertical scrollbar changed!");
               break; // so it doesn't go on
     }
     // let Windows process the message like normal
     return -1;
}

This post was edited on 02-27-2007 at 04:56 AM by deAd.
02-27-2007 04:48 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
slidercontrol in vertical - by Dennis Mike on 02-27-2007 at 04:10 AM
RE: slidercontrol in vertical - by Felu on 02-27-2007 at 04:34 AM
RE: RE: slidercontrol in vertical - by deAd on 02-27-2007 at 04:48 AM
RE: slidercontrol in vertical - by Dennis Mike on 02-27-2007 at 05:32 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On