DCBROWSE mousewheel
Posted: Fri Jul 16, 2010 1:35 pm
By default, moving the mouse wheel on a Windows system equals 3 times "cursor down" or "cursor up". This value can by changed using this code:
Calling this function with no parameter or the value zero or below shows the settings, calling it with 1 or higher sets it. There is no need to include the API-function "SystemParametersA", cause it's already inside eXpress++ (_dcfunct.prg).
But this function sets the value for the whole system - and other applications aswell. I'd prefer to set this only for browses inside my application. I already played with the :Wheel-slot, but I failed when I tried to create a subclass for DC_XbpBrowse which includes this.
Is there an easy solution for something like DCBROWSE ... MOUSEWHEEL n?
Code: Select all
FUNCTION SetMouseWheel(nScrollRows)
DEFAULT nScrollRows := 0
IF nScrollRows <= 0
SystemParametersInfoA(104,0,@nScrollRows,0)
MsgBox('Wheel is set to move the cursor '+LTrim(Str(nScrollRows))+' lines')
ELSE
SystemParametersInfoA(105,@nScrollRows,0,0x0002)
ENDIF
RETURN nil
But this function sets the value for the whole system - and other applications aswell. I'd prefer to set this only for browses inside my application. I already played with the :Wheel-slot, but I failed when I tried to create a subclass for DC_XbpBrowse which includes this.
Is there an easy solution for something like DCBROWSE ... MOUSEWHEEL n?
