4.1.1.2.7 Handling Slider Events

Event macros for use with Origin C Slider objects include:


Macro Description
ON_SLIDE_BEFORE(_idCntrl,_ocHandler) When the slider having the resource ID _idCntrlis slid the function _ocHandler is run before the slider updates. _ocHandler has the prototype:
BOOL _ocHandler(Control ctrl, uint nScrollCode, uint nScrollPos)
ON_SLIDE(_idCntrl,_ocHandler) When the slider having the resource ID _idCntrl is slid the function _ocHandler is run after the slider updates. _ocHandler has the prototype:
BOOL _ocHandler(Control ctrl, uint nScrollCode, uint nScrollPos)
ON_WM_VSCROLL_BEFORE(_idCntrl,_ocHandler) When the vertical slider having the resource ID _idCntrl is slid the function _ocHandler is run before the slider updates. _ocHandlerhas the prototype:
BOOL _ocHandler(Control ctrl, uint nScrollCode, uint nScrollPos)
ON_WM_HSCROLL_BEFORE(_idCntrl,_ocHandler) When the horizontal slider having the resource ID _idCntrlis slid the function _ocHandler is run before the slider updates. _ocHandlerhas the prototype:
BOOL _ocHandler(Control ctrl, uint nScrollCode, uint nScrollPos)
ON_WM_VSCROLL(_idCntrl, _ocHandler) When the vertical slider having the resource ID ''is slid the function _ocHandler is run after the slider updates. _ocHandler has the prototype:
BOOL _ocHandler(Control ctrl, uint nScrollCode, uint nScrollPos)
ON_WM_HSCROLL(_idCntrl, _ocHandler) When the horizontal slider having the resource ID _idCntrl is slid the function _ocHandler is run after the slider updates.
BOOL _ocHandler(Control ctrl, uint nScrollCode, uint nScrollPos)

For a detailed example demonstrating how to handle Slider events see the topic Accessing a Static and Slider Controls with Origin C.