Trackbar/Sliderbar problem
-
Hi, I am new to windows programming. I want to change the slider bar position of a third party software (using WinAPI only), which I have accomplished by sending message. SendMessage( aControlHWnd, TBM_SETPOS, (WPARAM) TRUE, (LPARAM) aPosition ); Now, the position of the sliderbar it is changed, but the corresponding values in other objects (like textbox showing the value related to this sliderbar) are not updated. I can only use Win API and donot have any access to the event handlers, but if the slider is moved manually by mouse the corresponding values in other objects (like textbox showing the value related to this sliderbar) are also changed. So I am assuming that an event handler already exists in the software which automatically updates other related objects. Now I just need to send the right message to the right handler to accomplish the task. Any help would be greatly appriciated. Thanks.
-
Hi, I am new to windows programming. I want to change the slider bar position of a third party software (using WinAPI only), which I have accomplished by sending message. SendMessage( aControlHWnd, TBM_SETPOS, (WPARAM) TRUE, (LPARAM) aPosition ); Now, the position of the sliderbar it is changed, but the corresponding values in other objects (like textbox showing the value related to this sliderbar) are not updated. I can only use Win API and donot have any access to the event handlers, but if the slider is moved manually by mouse the corresponding values in other objects (like textbox showing the value related to this sliderbar) are also changed. So I am assuming that an event handler already exists in the software which automatically updates other related objects. Now I just need to send the right message to the right handler to accomplish the task. Any help would be greatly appriciated. Thanks.
When you change the position of the slider, some messages will be sent to the parent. If you send those messages by yourself to the parent of the slider in the same manner you did for the slider, I believe you will get what you expected. You can watch the messages using Spy++. WM_HSCROLL or WM_VSCROLL messages will be they. You can identify the message parameters by refering MSDN.
- NS -