Zooming with "Ctrl + MouseWheel" issues

  • Hi Julian,

    Just today I noted that you added Zooming using Ctrl + MouseWheel (wpZoomWithMouseWheel in EditOptionsEx), but unfortunately I saw a different behavior from others applications, like MSWord, IE and Firefox. In your code, it will fire the zooming change if Ctrl is pressed, instead of if ONLY Ctrl is pressed. It means that if I use Ctrl + Shift + Alt + MouseWheel it will also fire the zooming change.

    I don't know if it was the intentional behavior or just a miss but, anyway, is it something that could be changed, or overwritten, maybe using another $IFDEF?

    You have this:

    Code
    if not Result and    (wpZoomWithMouseWheel in EditOptionsEx) and    (GetAsyncKeyState(VK_CONTROL) < 0)    then  begin

    Should be this (only Ctrl):

    Code
    if not Result and    (wpZoomWithMouseWheel in EditOptionsEx) and    (Shift = [ssCtrl])    then  begin

    Or this (using $IFDEF):

    Code
    if not Result and
        (wpZoomWithMouseWheel in EditOptionsEx) and
        {$IFNDEF CTRL_ONLY_MOUSEWHEEL_ZOOMING}(GetAsyncKeyState(VK_CONTROL) < 0){$ELSE}(Shift = [ssCtrl]){$ENDIF}
        then
      begin

    I also noted that the zooming change is not as smooth it appears. In your code you update the zooming by 2, if it smaller than 100%, and by 10 if greater. But instead of this, it fires a lot more. In my tests, it updates by 14 if smaller than 100% and by 70 if greater! MSWord for instance uses 10, always. Besides solving this problem, these values could be made properties, or creating global variables so I could use my own values?

    And also, if I'm using other zooming than wpAutoZoomOff, it doesn't fire the changing. I guess this was intentional.

    Thanks for your help

    Alessandro Fragnani

  • Hi Julian,

    The zooming change is a bit better, but still big while greater than 100 (now around 40 instead of 70) and 6 instead o 14 while smaller than 100. The expected behavior was to be "constant", like 2 or 10, but I guess it doesn't respect that because of the "messages infrastructure" that WPTools 5 has. It is probably handling a lot of MouseWheel messages before the reformat is fired by Iddle times.

    Anyway, what about the "Ctrl Key"? Do you intend to change anything? Is your statement "Thanks for the suggestion" related to this?

    Thanks for your help

    Alessandro Fragnani