Click here to Skip to main content
15,915,089 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to get Undo/Redo effect as in Notepad like applications Pin
l a u r e n21-Nov-03 18:45
l a u r e n21-Nov-03 18:45 
Generalremoving a char array from another Pin
thunderflash2121-Nov-03 12:20
thunderflash2121-Nov-03 12:20 
GeneralRe: removing a char array from another Pin
Anonymous21-Nov-03 12:43
Anonymous21-Nov-03 12:43 
GeneralRe: removing a char array from another Pin
thunderflash2121-Nov-03 15:35
thunderflash2121-Nov-03 15:35 
GeneralRe: removing a char array from another Pin
thunderflash2121-Nov-03 15:41
thunderflash2121-Nov-03 15:41 
GeneralRe: removing a char array from another Pin
Rickard Andersson2022-Nov-03 5:38
Rickard Andersson2022-Nov-03 5:38 
GeneralPlease help with Threads Pin
tqdo21-Nov-03 11:59
tqdo21-Nov-03 11:59 
GeneralRe: Please help with Threads Pin
Peter Molnar21-Nov-03 12:16
Peter Molnar21-Nov-03 12:16 
tqdo wrote:
The application is working fine but while it is retrieving
the data and processing on it, the GUI seems "hang"



tqdo wrote:
Currently, I have a wrapper class derived from CAsynSocket that
takes care of connecting and getting the data buffer from the
socket.


The two statements contradict each other. CAsyncSocket is used asynchronously, that is in a non blocking manner. No hanging should be possible then.

If you decided to use multiple threads I would recommend you to use syncronous socket - just as you describe- in your worker thread.
Worker threads are really easy to use:

1. Create a global function wich will execute your communication task (if you insist on using dialog member functions for this purpose then create a static member of your dialog)
2. From your dialog call AfxBeginThread which will launch your worker thread (i.e. the function from 1./
3.AfxBeginThread returns immediately after you called it so your app reserves responsiveness
while your worker thread "works".

Peter Molnar
GeneralShifting elements of struct over to next element.. Pin
IrishSonic21-Nov-03 10:49
IrishSonic21-Nov-03 10:49 
GeneralRe: Shifting elements of struct over to next element.. Pin
Michael Dunn21-Nov-03 11:14
sitebuilderMichael Dunn21-Nov-03 11:14 
GeneralInserting a char array into another Pin
thunderflash2121-Nov-03 10:47
thunderflash2121-Nov-03 10:47 
GeneralRe: Inserting a char array into another Pin
m0xx21-Nov-03 11:48
m0xx21-Nov-03 11:48 
GeneralSOCKADDR_IN structure port conversion Pin
Kuniva21-Nov-03 10:06
Kuniva21-Nov-03 10:06 
GeneralRe: SOCKADDR_IN structure port conversion Pin
Mike Dimmick21-Nov-03 13:05
Mike Dimmick21-Nov-03 13:05 
GeneralRe: SOCKADDR_IN structure port conversion Pin
Kuniva22-Nov-03 1:08
Kuniva22-Nov-03 1:08 
GeneralTrimLeft() question Pin
speedpacer21-Nov-03 9:44
speedpacer21-Nov-03 9:44 
GeneralRe: TrimLeft() question Pin
speedpacer21-Nov-03 10:07
speedpacer21-Nov-03 10:07 
GeneralRe: TrimLeft() question Pin
speedpacer21-Nov-03 11:00
speedpacer21-Nov-03 11:00 
GeneralRe: TrimLeft() question Pin
John R. Shaw21-Nov-03 11:24
John R. Shaw21-Nov-03 11:24 
GeneralRe: TrimLeft() question Pin
speedpacer21-Nov-03 12:21
speedpacer21-Nov-03 12:21 
GeneralRe: TrimLeft() question Pin
Mike Dimmick21-Nov-03 13:10
Mike Dimmick21-Nov-03 13:10 
GeneralPrinting and Bitmap Coding. Pin
krondorl21-Nov-03 8:50
krondorl21-Nov-03 8:50 
GeneralRe: Printing and Bitmap Coding. Pin
John R. Shaw21-Nov-03 11:59
John R. Shaw21-Nov-03 11:59 
GeneralRe: Printing and Bitmap Coding. Pin
krondorl22-Nov-03 5:30
krondorl22-Nov-03 5:30 
GeneralRe: Printing and Bitmap Coding. Pin
John R. Shaw22-Nov-03 7:12
John R. Shaw22-Nov-03 7:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.