Click here to Skip to main content
15,910,083 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Difference btw MBCS and Unicode? Pin
Anthony_Yio13-Oct-03 1:05
Anthony_Yio13-Oct-03 1:05 
AnswerRe: Difference btw MBCS and Unicode? Pin
Michael Dunn13-Oct-03 4:37
sitebuilderMichael Dunn13-Oct-03 4:37 
GeneralRe: Difference btw MBCS and Unicode? Pin
fynox13-Oct-03 16:28
fynox13-Oct-03 16:28 
General100% CPU Usage problem in multithreading Pin
samhita12-Oct-03 22:32
samhita12-Oct-03 22:32 
GeneralRe: 100% CPU Usage problem in multithreading Pin
jmkhael12-Oct-03 22:49
jmkhael12-Oct-03 22:49 
GeneralRe: 100% CPU Usage problem in multithreading Pin
Anand Paranjpe12-Oct-03 22:51
Anand Paranjpe12-Oct-03 22:51 
GeneralRe: 100% CPU Usage problem in multithreading Pin
samhita13-Oct-03 2:51
samhita13-Oct-03 2:51 
GeneralRe: 100% CPU Usage problem in multithreading Pin
jhwurmbach13-Oct-03 3:19
jhwurmbach13-Oct-03 3:19 
samhita wrote:
SendMessage and not PostMessage. Is this the culprit???

Sure it is - You can't SendMessage from a thread (as you have seen demonstrated Smile | :) )

samhita wrote:
[...]that sturcture passed to the PostMessage function goes out of scope.

Construct that structure on the heap (new ...). (Your whole process with all threads shares one memory space)

Then send the address of that struct with PostMessage and do not delete it in your calling function. With the call to PostMessage, you transfer the ownership to your message handler.

After use (in your message-handler), you call delete on the struct, so as not to leak memory.

Hope this helps



Who is 'General Failure'? And why is he reading my harddisk?!?
GeneralRe: 100% CPU Usage problem in multithreading Pin
Michael Dunn13-Oct-03 4:40
sitebuilderMichael Dunn13-Oct-03 4:40 
GeneralRe: 100% CPU Usage problem in multithreading Pin
jhwurmbach13-Oct-03 4:46
jhwurmbach13-Oct-03 4:46 
Questionwho knows shared memory of command window? Pin
includeh1012-Oct-03 22:10
includeh1012-Oct-03 22:10 
AnswerRe: who knows shared memory of command window? Pin
Anthony_Yio13-Oct-03 1:13
Anthony_Yio13-Oct-03 1:13 
GeneralRemoving icon from header Pin
Chernobog112-Oct-03 21:51
Chernobog112-Oct-03 21:51 
GeneralRe: Removing icon from header Pin
Anand Paranjpe12-Oct-03 22:45
Anand Paranjpe12-Oct-03 22:45 
GeneralRe: Removing icon from header Pin
Chernobog112-Oct-03 23:34
Chernobog112-Oct-03 23:34 
GeneralRe: Removing icon from header Pin
Anand Paranjpe12-Oct-03 23:50
Anand Paranjpe12-Oct-03 23:50 
QuestionODBC in RunTime? Pin
murali_utr12-Oct-03 21:01
murali_utr12-Oct-03 21:01 
QuestionHow to get mapped drive info Pin
samhita12-Oct-03 20:40
samhita12-Oct-03 20:40 
AnswerRe: How to get mapped drive info Pin
David Crow13-Oct-03 9:58
David Crow13-Oct-03 9:58 
GeneralUnable to set font to menu in Windows 2000 Pin
samhita12-Oct-03 19:37
samhita12-Oct-03 19:37 
GeneralFont Pin
act_x12-Oct-03 17:03
act_x12-Oct-03 17:03 
GeneralRe: Font Pin
Johann Gerell12-Oct-03 19:46
Johann Gerell12-Oct-03 19:46 
GeneralRect positioning Pin
act_x12-Oct-03 16:45
act_x12-Oct-03 16:45 
GeneralRe: Rect positioning Pin
YaronNir12-Oct-03 21:52
YaronNir12-Oct-03 21:52 
GeneralRe: UpdateData() and worker thread Pin
valikac12-Oct-03 16:32
valikac12-Oct-03 16:32 

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.