• EM_GETSCROLLPOS result != EM_SETSCROLLPOS set values

    From R.Wieser@21:1/5 to All on Fri Apr 8 12:44:31 2022
    Hello all,

    I'm trying to use EM_GETSCROLLPOS and EM_SETSCROLLPOS to save and later load
    a position in a RichText control.

    The problem is that when I set a certain position and *directly after*
    retrieve the position they differ quite a bit (at least 10000 smaller vertical).

    I have no idea why that that happens, and neither MSDN doc to both tells me about it either. :-|

    So, my question : Does anyone here knows whats going on here ?


    On a hunch I just tried to set several vertical positions in the range of
    10000 to 60000, and dividing the results by those numbers returned a steady 0.78. IOW, its not the (constant) hight of the control's window or
    something like that.

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Tue Apr 12 17:31:17 2022
    So, my question : Does anyone here knows whats going on here ?

    Having written some basic stuff to use a RichEd30 control and following a
    hunch I think I know what happens : simply using any font other than the one the control is created with causes the mismatching.

    And that makes the (above mentioned) messages all but worthless for RTF
    files, and /almost/, but not totally, for plain text files. :-(

    Funny though : MSDN doesn't mention it and neither does a quite a bit of googeling and ddg-ing.

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)