Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Multiple timers on single window/application

Sonx_hvn7Sonx_hvn7 Member Posts: 54
Is it possible to have more than one timer in one window/application? Want to animate different objects on different times, or timings!

Comments

  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : Is it possible to have more than one timer in one
    : window/application? Want to animate different objects on different
    : times, or timings!
    :
    [color=Blue]Yes, when creating timers - give them unique identifiers and then, when WM_TIMER comes in - check the WPARAM for the ID.[/color]
  • Sonx_hvn7Sonx_hvn7 Member Posts: 54
    : : Is it possible to have more than one timer in one
    : : window/application? Want to animate different objects on different
    : : times, or timings!
    : :
    : [color=Blue]Yes, when creating timers - give them unique identifiers
    : and then, when WM_TIMER comes in - check the WPARAM for the
    : ID.[/color]

    the CASE (or IF) within WM_TIMER will handle each timer at a time, how do you simultaneously run both timers? Perhaps at different speeds
  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : : : Is it possible to have more than one timer in one
    : : : window/application? Want to animate different objects on different
    : : : times, or timings!
    : : :
    : : [color=Blue]Yes, when creating timers - give them unique identifiers
    : : and then, when WM_TIMER comes in - check the WPARAM for the
    : : ID.[/color]
    :
    : the CASE (or IF) within WM_TIMER will handle each timer at a time,
    : how do you simultaneously run both timers? Perhaps at different
    : speeds
    :
    [color=Blue]If you need all events in one case - you can make one timer (say at 50 msec)and during WM_TIMER simply service all events at once:
    [code]
    case WM_TIMER:
    PerformService1 ();
    PerformService2 ();
    PerformService3 ();
    [color=Green]// etc.[/color]
    break;
    [/code]
    [/color]
Sign In or Register to comment.