Shoutbox

slidercontrol in vertical - 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: slidercontrol in vertical (/showthread.php?tid=72141)

slidercontrol in vertical by Dennis Mike on 02-27-2007 at 04:10 AM

why slidercontrol in vertical not produce the event OnWindowidEvent_MessageNotification?
if the slidercontrol in horizontal yes produce 


RE: slidercontrol in vertical by Felu on 02-27-2007 at 04:34 AM

Try using [Library] SliderControl?


RE: RE: slidercontrol in vertical by deAd on 02-27-2007 at 04:48 AM

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;
}

RE: RE: slidercontrol in vertical by deAd on 02-27-2007 at 05:01 AM

quote:
Originally posted by Dennis Mike
watch the Attachment

What attachment?
RE: slidercontrol in vertical by Dennis Mike on 02-27-2007 at 05:32 AM

thanks by WM_VSCROLL, i had used only WM_HSCROL