The MASM Forum

General => The Campus => Topic started by: Alesath on April 13, 2014, 06:31:33 AM

Title: moving trackbar with a timer
Post by: Alesath on April 13, 2014, 06:31:33 AM
Hello everybody. Oversimplifying my project, i have to modify the value of a trackbar with a timer (basically a tick will determine a movement of the trackbar) and to output the value of the trackbar on a window. I am familiar with asm, but unfortunately i have no experience whatsoever with windows api and masm. I have only found examples of trackbars in dialog boxes and not in windows and i am not sure how to influence the trackbar without a buddy control. Any help would be appreciated. Thanks a lot!
Title: Re: moving trackbar with a timer
Post by: jj2007 on April 13, 2014, 08:29:38 AM
Hello Alesath,

Have a look at http://masm32.com/board/index.php?topic=426.msg2929#msg2929

Welcome to the Forum :icon14:
Title: Re: moving trackbar with a timer
Post by: Alesath on April 13, 2014, 08:35:35 PM
Thank you for your answer, jj2007. I have already seen that topic and I created the trackbar. My problem is with changing the value of the trackbar. I know i should do this with TBM_setpos and getpos, I also know how things should look like: at a tick of the timer, the trackbar value should be incremented with setpos and with getpos i should output the value in a text control. It looks simple and straightforward, but ... the 'newbieness' says its word.
Title: Re: moving trackbar with a timer
Post by: Alesath on April 13, 2014, 10:46:04 PM
Got this done, I will post the solution once it's finished.

EDIT: Here is the program if anybody else needs it (it's part of a bigger project so there are some extra things). However, it lacks the manual scroll function.

Could anybody tell me if there is a way to format the time (an integer basically) to hh:mm:ss? I have seen the GetTimeFormat function, but that needs a specific SYSTEMTIME value to transform.