API Windows é uma merd.

Aqui é o lugar para bater papo e trocar idéias sobre os mais variados assuntos

Moderador: Moderadores

Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

API Windows é uma merd.

Mensagem por JoséQuintas »

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.
Essa é a explicação detalhada de como usar, e pra que serve.
Mas atenção a esta parte:
Applications should not send this message directly. Instead, they should use the SetScrollPos function
Em outras palavras: é assim que usa, mas não é pra usar.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

API Windows é uma merd.

Mensagem por JoséQuintas »

Note The SetScrollPos function is provided for backward compatibility. New applications should use the SetScrollInfo function.
Também não é pra usar aquela, é pra usar outra....
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Responder