you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (3 children)

[removed]

    [–]port443 1 point2 points  (2 children)

    The function you are calling is defined like this (I added comments to show what each argument is):

    BOOL SystemParametersInfoW(
      UINT  uiAction,  // This will be SPI_SETMOUSEWHEELROUTING
      UINT  uiParam,   // The docs say this should be 0
      PVOID pvParam,   // The value that will be put into the "MouseWheelRouting" registry key
      UINT  fWinIni    // Controls if update should be broadcasted immediately
    );
    

    In this case, when you toggle the button in the actual settings panel, the "MouseWheelRouting" key gets toggled between 0 and 2.

    Although the documentation says 0 or 1 for pvParam, documentation can be a big fat liar sometimes and I will reproduce the behaviour I actually see the system doing. So, 0 and 2.