Toon posts:

[Win32/C++] Trackbars

Pagina: 1
Acties:

Verwijderd

Topicstarter
ik probeer in een window meerdere trackbars te implementeren. Nu is dit geen probleem, ze verschijnen ook mooi. Maar... ik wil natuurlijk weten wat de gebruiker met die trackbars doet :)

Alle messages van trackbars worden naar hun parent window gestuurd. Maar hoe kan ik nu uitvinden van welke trackbar die (WM_HSCROLL)-events afkomen?

Ik probeer nu te vergelijken of de HNWD van de inkomende message gelijk is aan de HNWD van een van de trackbars.. helaas is dit niet hetzelfde? Kan iemand plz vertellen wat is fout doe of hoe het kan worden opgelost??

  • AaroN
  • Registratie: Februari 2001
  • Laatst online: 16-08-2023

AaroN

JayGTeam (213177)

Als ik het zo bekijk, wordt in de LPARAM de handle geleverd naar de scrollbar die de Message veroorzaakt heeft. Op die manier kun je dus checken.

JayGTeam (213177)


Verwijderd

Topicstarter
Dank, AaroN

Ik kon het niet vinden, want ik zocht specifiek naar Trackbar. Blijkbaar werkt dat hetzelfde als een scrollbar, want het werkt.

(Een trackbar is een slider, zoals in het Volume-schermpje zit, en dus GEEN scrollbar)

[ Voor 25% gewijzigd door Verwijderd op 02-10-2003 13:20 ]


  • .oisyn
  • Registratie: September 2000
  • Laatst online: 21-08 12:02

.oisyn

Moderator Devschuur®

Demotivational Speaker

http://msdn.microsoft.com...tls/trackbar/trackbar.asp
Trackbar Notification Messages
A trackbar notifies its parent window of user actions by sending the parent a WM_HSCROLL or WM_VSCROLL message. A trackbar with the TBS_HORZ style sends WM_HSCROLL messages. A trackbar with the TBS_VERT style sends WM_VSCROLL messages. The low-order word of the wParam parameter of WM_HSCROLL or WM_VSCROLL contains the notification code. For the TB_THUMBPOSITION and TB_THUMBTRACK notifications, the high-order word of the wParam parameter specifies the position of the slider. For all other notifications, the high-order word is zero; send the TBM_GETPOS message to determine the slider position. The lParam parameter is the handle to the trackbar.
;)

Give a man a game and he'll have fun for a day. Teach a man to make games and he'll never have fun again.