News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

using timers

Started by timertik, April 15, 2007, 10:16:33 AM

Previous topic - Next topic

timertik

what i want to do is delay my dialog items at the start of the app
I thought using some kind of a timer would be the best place to start

I plan to use ShowWindow to hide and restore the items for example
at startup all the items will be hid then a timer is set for say 7 seconds
after the timer finishes the buttons are restored.

can someone help me get started and show me how to use a timer like this?

zooba

invoke SetTimer, hWnd, 1, 7000, 0
...
.if(uMsg == WM_TIMER)
    .if(wParam == 1)
        ; display controls
    .endif
.endif
...


Cheers,

Zooba :U

timertik

wow thanks man I didnt know it was that simple very nice and interesting

Vortex

timertik,

Don't forget to destroy the timer when it completes the task :

invoke KillTimer,hWnd,ID_TIMER

zooba

Quote from: Vortex on April 16, 2007, 05:02:54 PM
Don't forget to destroy the timer when it completes the task :

Oops, forgot that.

BTW. ID_TIMER is whatever you pass to SetTimer in place of the 1, and what you compare wParam to.