Click here to Skip to main content
15,907,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: std::string to float Pin
Stephen Hewitt4-May-06 15:06
Stephen Hewitt4-May-06 15:06 
QuestionTray icon notifier when usb plugging Pin
asancho4-May-06 6:32
asancho4-May-06 6:32 
AnswerRe: Tray icon notifier when usb plugging Pin
toxcct4-May-06 6:44
toxcct4-May-06 6:44 
GeneralRe: Tray icon notifier when usb plugging Pin
asancho5-May-06 1:36
asancho5-May-06 1:36 
QuestionXML string to DataTable Pin
lsugirljte4-May-06 6:27
lsugirljte4-May-06 6:27 
GeneralRe: XML string to DataTable Pin
lsugirljte4-May-06 6:29
lsugirljte4-May-06 6:29 
QuestionAppending text to a richedit Pin
KellyR4-May-06 6:05
KellyR4-May-06 6:05 
AnswerRe: Appending text to a richedit Pin
Justin Tay4-May-06 12:17
Justin Tay4-May-06 12:17 
Not exactly sure what you are doing in your worker thread.

But if you are doing
chat_window_rich.SetSel(GetWindowTextLength(chat_window_rich), -1);
chat_window_rich.SetSelectionCharFormat(cf);
chat_window_rich.ReplaceSel(buff);

in your worker thread

Create a handler for a user message that does something like this
LRESULT OnAppendText(WPARAM wParam, LPARAM lParam)
{
  int start, end;
  chat_window_rich.GetSel(&start, &end);
  chat_window_rich.SetSel(GetWindowTextLength(chat_window_rich), -1);
  chat_window_rich.SetSelectionCharFormat(cf);
  chat_window_rich.ReplaceSel( (LPCTSTR) wParam);
  chat_window_rich.SetSel(start, end);
}


From your worker thread send (or post - you would be responsible for allocating and deallocating the string you want to append) the user defined message to the main thread when you want to append text.
Questionmonitoring print dialog box Pin
Atron4-May-06 4:58
Atron4-May-06 4:58 
QuestionThank you Pin
Charles Reese4-May-06 4:51
Charles Reese4-May-06 4:51 
AnswerRe: Thank you Pin
toxcct4-May-06 5:22
toxcct4-May-06 5:22 
GeneralRe: Thank you Pin
Eytukan4-May-06 6:12
Eytukan4-May-06 6:12 
QuestionUrgent: Trapping documentcomplete event in IE browser Pin
rana744-May-06 4:19
rana744-May-06 4:19 
AnswerRe: Urgent: Trapping documentcomplete event in IE browser Pin
led mike4-May-06 7:52
led mike4-May-06 7:52 
AnswerRe: Urgent: Trapping documentcomplete event in IE browser Pin
Sheng Jiang 蒋晟4-May-06 15:10
Sheng Jiang 蒋晟4-May-06 15:10 
QuestionOle DB for OLAP Pin
Tarek Jabri4-May-06 4:13
Tarek Jabri4-May-06 4:13 
AnswerRe: Ole DB for OLAP Pin
Steve Echols4-May-06 20:03
Steve Echols4-May-06 20:03 
QuestionOle DB for OLAP Pin
Tarek Jabri4-May-06 4:11
Tarek Jabri4-May-06 4:11 
QuestionHow to keep image displayed in dialog box? Pin
houari_id4-May-06 3:55
houari_id4-May-06 3:55 
AnswerRe: How to keep image displayed in dialog box? Pin
Cedric Moonen4-May-06 4:13
Cedric Moonen4-May-06 4:13 
GeneralRe: How to keep image displayed in dialog box? Pin
houari_id5-May-06 8:22
houari_id5-May-06 8:22 
GeneralRe: How to keep image displayed in dialog box? Pin
Cedric Moonen5-May-06 21:53
Cedric Moonen5-May-06 21:53 
QuestionCheckbox with BITMAP Pin
Raja Bose C Leo4-May-06 3:30
Raja Bose C Leo4-May-06 3:30 
AnswerRe: Checkbox with BITMAP Pin
toxcct4-May-06 3:44
toxcct4-May-06 3:44 
GeneralRe: Checkbox with BITMAP Pin
Raja Bose C Leo4-May-06 20:48
Raja Bose C Leo4-May-06 20:48 

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.