Ok, I have written a program that controls a trackbar on another program. I have succeeded in making this trackbar move using set_range and set_pos. Unfourtunatly the target program will not acknowledge the fact that the slider has moved. For example, there is static text next to the trackbar giving it's current value. When you move the slider with the mouse the static text changes. When you move it using the set_pos the track bar moves but the staic text doesnt change. This tells me that the variable being linked the trackbar is not being refreshed or something else may be wrong.

Just for future reference, the program I'm trying to control was not written by me so I'm using SendMessage() to give it commands. Also, If I move the bar and than click it with the mouse the value on the static text refreshes.

Does anyone know how I could simulate a user exactly through windows messages? Or if possibly there is a message I can send it to refresh the variable attached to it. Either way, this is my last problem for my final project with is due in two weeks so I'd be very grateful to anyone who can get me back on track.

Using SPY++ I notice that the program I am trying to control send these messages when using the trackbar with the mouse:
-WM_MOUSEACTIVATE
-WM_HSCROLL->SB_THUMBTRACK
-WM_HSCROLL->SB_THUMBPOSITION
-WM_HSCROLL->SB_ENDSCROLL
-WM_NOTIFY
-WM_SETCURSOR