Saulius Krasuckas Saulius.Krasuckas@elst.vtu.lt writes:
may now i ask someone for a help or explanation? the question is: if the win16 doesn't handle SBM_GETRANGE message, should wine send it in a case of win16 app? if no, then i'd like to start writing an additional check ;-).
No, there is an SBM_GETRANGE16 message apparently, only it's not documented. What is needed is to investigate how that message is supposed to behave, and then implement the proper translation in WINPROC_MapMsg32ATo16.
If the nBar parameter is SB_CTL and the window specified by the hWnd parameter is not a system scroll bar control, the system sends the SBM_GETRANGE message to the window to obtain scroll bar information. This allows GetScrollRange to operate on a custom control that mimics a scroll bar.
aren't we missing one more check here? maybe we need to check class-name of control targeted by hwnd?
No I think our check is fine. If the scrollbar is a window then we send the message, if it's a system scrollbar (SB_HORZ or SB_VERT) we don't. Do not pay too much attention to the exact wording of the MSDN docs, they are not written by someone who really understands the code.