-
Trackbar controls
Hi all - just wondering if someone can help me out here. I have created a Trackbar and given it a buddy edit control, much like you do with a spinner control - but I have noticed that there isn't an equivalent style for the UDS_SETBUDDYINT. Can I presume then we are responsible for updating the buddy edit control, and if so, what is the point of setting a buddy control?
Code:
hwndSlider = CreateWindowEx(0, TRACKBAR_CLASS, NULL, WS_CHILD | WS_VISIBLE | TBS_HORZ | TBS_AUTOTICKS, 10, 10, 200, 40, hwnd,
(HMENU) ID_TRACKBAR, hInstance, NULL);
hwndBuddy = CreateWindowEx(0, TEXT("edit"), NULL, WS_CHILD | WS_VISIBLE | WS_BORDER, 0, 0, 50, 20, hwnd,
(HMENU) ID_BUDDY, hInstance, NULL);
SendMessage(hwndSlider, TBM_SETBUDDY, (WPARAM) FALSE, (LPARAM)hwndBuddy);
Cheers all. :)
-
Good point.
From the documentation, its sounds like it's just for posistioning the buddy window relative to the control.
gg
-
Yeah, I have just processed the WM_HSCROLL / WM_VSCROLL messages for the control (depending on orientation) and updated the buddy control with a message to it. Works fine, just thought it was odd that there wasn't an equivalant for the trackbar control, and was hoping it wasn't my brain... :)