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

Thread: Work on file

  1. #1
    Join Date
    Apr 1999
    Posts
    8

    Work on file

    My application opens a big file (100 Mo), reads bytes and copy some of them in an another file.When it's running, the display of my window isn't refresh, some buttons diseppear, the task manager says that my application doesn't answer (but in fact, it's working). How can i avoid this thing.
    Thank you.


  2. #2
    Join Date
    Apr 1999
    Posts
    383

    Re: Work on file

    Fire up a worker thread to do the heavy duty processing.

    Dave


  3. #3
    Join Date
    Apr 1999
    Posts
    8

    Re: Work on file

    can you give me more details ?


  4. #4
    Join Date
    Apr 1999
    Posts
    383

    Re: Work on file

    You write a thread function that contains the processing you want to perform in the background. Running this allows your application interface to function normally while the background processing continues. When the thread has finished its task, it can send a notification message to your application before terminating.

    For full details, check out 'Multithreading: Creating Worker Threads' in the online docs, and for various examples, see 'Threads/Processes' in the 'Misc' section of this site.

    Dave


  5. #5
    Join Date
    Apr 1999
    Posts
    8

    Re: Work on file

    Thank you very much.


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