Doing something and still having the GUI go 
Author Message
 Doing something and still having the GUI go

In my program it does a bunch of reading and writing when a button is pushed
but then the whole GUI freezes up and the user just has to sit and wait. Is
there a way that I can make it still keep going and updating so the user
doesn't think that the program froze up. There has to be a way to do this.
Can someone help me out and give me some pointers? Thanks.
Dave Johansen


Tue, 05 Aug 2003 15:45:06 GMT  
 Doing something and still having the GUI go
Use worker thread to do whatever task you are doing. That would free up the
main GUI thread to respond to user actions.

--
Ajay Kalra [MVP - VC++]

Note: Please post all replies to newsgroup only.


Quote:
> In my program it does a bunch of reading and writing when a button is
pushed
> but then the whole GUI freezes up and the user just has to sit and wait.
Is
> there a way that I can make it still keep going and updating so the user
> doesn't think that the program froze up. There has to be a way to do this.
> Can someone help me out and give me some pointers? Thanks.
> Dave Johansen



Tue, 05 Aug 2003 15:53:52 GMT  
 Doing something and still having the GUI go
hi dave,

Quote:
> In my program it does a bunch of reading and writing when a button is pushed
> but then the whole GUI freezes up and the user just has to sit and wait. Is
> there a way that I can make it still keep going and updating so the user
> doesn't think that the program froze up. There has to be a way to do this.
> Can someone help me out and give me some pointers? Thanks.
> Dave Johansen

Make your reading and writing in a worker-thread, the reason is, that
your operation is stoppping the message-loop as long as your operation
goes on. if you do that in a thread, the message loop doesnt stop ...

Regards
Andreas Lander

--
I do not like spam!
Please remove "123" from my address if you reply by e-mail.



Tue, 05 Aug 2003 15:49:24 GMT  
 Doing something and still having the GUI go
I've never used threads before. Could you point me to an example or
explanation on using em? Thanks.
Dave Johansen


Wed, 06 Aug 2003 05:23:03 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Threading problem. I'm doing something wrong

2. OnInitDialog and doing something after the window is shown

3. doing something with an icon resource

4. can something like this be done...

5. Getting an embedded table relationship without having to go via the hyperlink

6. GUI freezes up doing socket communication

7. How Should I go about doing this?

8. Ok, how would i go about doing this?

9. how to go abt doing it?

10. Re-use ATL GUI component in another ATL GUI component

11. why is lint going/gone?

12. MSQuickC for DOS ... am I doing something wrong?

 

 
Powered by phpBB® Forum Software