API Windows é uma merd.
Enviado: 30 Abr 2023 21:59
Essa é a explicação detalhada de como usar, e pra que serve.The SBM_SETPOS message is sent to set the position of the scroll box (thumb) and, if requested, redraw the scroll bar to reflect the new position of the scroll box.
Applications should not send this message directly. Instead, they should use the SetScrollPos function. A window receives this message through its WindowProc function. Applications which implement a custom scroll bar control must respond to these messages for the SetScrollPos function to work properly.
Parameters
wParam
Specifies the new position of the scroll box. It must be within the scrolling range. If this parameter is outside of the scrolling range, the value is rounded up or down to the nearest valid value.
lParam
Specifies whether the scroll bar should be redrawn to reflect the new scroll box position. If this parameter is TRUE, the scroll bar is redrawn. If it is FALSE, the scroll bar is not redrawn.
Return value
ComCtl32.dll version 5.0: If the position of the scroll box changed, the return value is the previous position of the scroll box; otherwise, it is zero.
ComCtl32.dll version 6.0: The current position of the scroll box, regardless of whether it has changed.
Remarks
If the scroll bar control is redrawn by a subsequent call to another function, setting the lParam parameter to FALSE is useful.
Mas atenção a esta parte:
Em outras palavras: é assim que usa, mas não é pra usar.Applications should not send this message directly. Instead, they should use the SetScrollPos function