CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: Pause?? Timmer?

  1. #1
    Join Date
    Apr 1999
    Posts
    9

    Pause?? Timmer?

    I need to be able to pause for a peroid of time.. any Ideas??
    thank you!


  2. #2
    Join Date
    May 1999
    Posts
    31

    Re: Pause?? Timmer?

    Hi,

    The SleepEx Win32 API function pauses the program for a specified number of milliseconds. You should check the documentation for full details.

    Daniel.


  3. #3
    Join Date
    May 1999
    Location
    Atlanta, GA, USA
    Posts
    443

    Re: Pause?? Timmer?

    Hi.

    Try this.
    ::Sleep(1000);//All thread will stop during 1000ms.

    Hope for help.
    -Masaaki Onishi-


  4. #4
    Join Date
    Apr 1999
    Posts
    9

    Re: Pause?? Timmer?

    All the docs that I have is what came with the cds... ( Microsoft ) and it shows " Void Sleep(DWORD milliseconds); "

    this generates an error.." sleep does not take 1 param.
    but thank you!



  5. #5
    Join Date
    Apr 1999
    Posts
    9

    Re: Pause?? Timmer?

    ok, I should include the " :: " before the Sleep???
    thanks ever so much.


  6. #6
    Join Date
    May 1999
    Posts
    31

    Re: Pause?? Timmer?

    That's true. SleepEx takes two params. The first is the number of milliseconds you want to sleep. The second is a BOOL variable that specifies wether or not I/O or APC callbacks should disrupt the sleep. It should work if you use two params (i.e SleepEx(500,FALSE)).

    Daniel.


  7. #7
    Join Date
    Apr 1999
    Posts
    9

    Re: Pause?? Timmer?

    I will give that a try! and thanks



  8. #8
    Join Date
    May 1999
    Location
    Atlanta, GA, USA
    Posts
    443

    Re: Pause?? Timmer?

    Hi.
    "::" means that this function is an API function.
    In Vc++, we use "::" from the direct call of API function
    in MFC project.

    Hope for help.
    -Masaaki Onishi-


  9. #9
    Join Date
    Apr 1999
    Posts
    9

    Re: Pause?? Timmer?

    ok, lost me a little but I will read up a little more, I jumped from learning c++ to VC++ & mfc.. getting pretty far tho for only a week of spare time... All thats left from my frist program is either a function that will read values (strings) from a file in reandom order or to set up an array.. but thats a lot of strings for an array..



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured