Click here to Skip to main content
15,885,537 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PostThreadMessage does not work sometimes Pin
Rajesh R Subramanian23-Sep-11 5:46
professionalRajesh R Subramanian23-Sep-11 5:46 
GeneralRe: PostThreadMessage does not work sometimes Pin
Albert Holguin23-Sep-11 6:04
professionalAlbert Holguin23-Sep-11 6:04 
GeneralRe: PostThreadMessage does not work sometimes Pin
Rajesh R Subramanian23-Sep-11 6:07
professionalRajesh R Subramanian23-Sep-11 6:07 
GeneralRe: PostThreadMessage does not work sometimes Pin
Albert Holguin23-Sep-11 6:11
professionalAlbert Holguin23-Sep-11 6:11 
GeneralRe: PostThreadMessage does not work sometimes Pin
Rajesh R Subramanian23-Sep-11 6:14
professionalRajesh R Subramanian23-Sep-11 6:14 
GeneralRe: PostThreadMessage does not work sometimes Pin
rahul.kulshreshtha23-Sep-11 21:37
rahul.kulshreshtha23-Sep-11 21:37 
GeneralRe: PostThreadMessage does not work sometimes Pin
Albert Holguin25-Sep-11 10:24
professionalAlbert Holguin25-Sep-11 10:24 
GeneralRe: PostThreadMessage does not work sometimes Pin
rahul.kulshreshtha26-Sep-11 7:13
rahul.kulshreshtha26-Sep-11 7:13 
Thanks Albert,
That's what I was doing till now but it could not work. To confirm this issue, I made one test project. I had posted 10005 messages on a dialog with different scenarios.

Scenario 1: I sent all the messages using a "for" loop
for(....)
{
   ::PostMessage(.....);
   Or
   ::PostThreadMessage(....);
}


Scenario 2: I added a Sleep statement after Posting message. (I am not using Sleep in my project, it was just for testing purpose)

I run both the scenarios 10 times. Messages were missed only once. MessageCount was 9993 instead of 10000. I know last 5 will miss for sure. This does not happen frequently so it's difficult to reproduce.

My live project is still under testing so waiting for it's test result.
GeneralRe: PostThreadMessage does not work sometimes Pin
Albert Holguin26-Sep-11 7:57
professionalAlbert Holguin26-Sep-11 7:57 
GeneralRe: PostThreadMessage does not work sometimes Pin
Rajesh R Subramanian25-Sep-11 22:31
professionalRajesh R Subramanian25-Sep-11 22:31 
GeneralRe: PostThreadMessage does not work sometimes Pin
rahul.kulshreshtha26-Sep-11 7:29
rahul.kulshreshtha26-Sep-11 7:29 
GeneralRe: PostThreadMessage does not work sometimes Pin
Albert Holguin26-Sep-11 7:59
professionalAlbert Holguin26-Sep-11 7:59 
GeneralRe: PostThreadMessage does not work sometimes Pin
Rajesh R Subramanian23-Sep-11 6:08
professionalRajesh R Subramanian23-Sep-11 6:08 
GeneralRe: PostThreadMessage does not work sometimes Pin
Albert Holguin23-Sep-11 6:13
professionalAlbert Holguin23-Sep-11 6:13 
GeneralRe: PostThreadMessage does not work sometimes Pin
Rajesh R Subramanian23-Sep-11 6:15
professionalRajesh R Subramanian23-Sep-11 6:15 
GeneralRe: PostThreadMessage does not work sometimes Pin
MicroVirus23-Sep-11 5:55
MicroVirus23-Sep-11 5:55 
GeneralRe: PostThreadMessage does not work sometimes Pin
Albert Holguin23-Sep-11 6:05
professionalAlbert Holguin23-Sep-11 6:05 
AnswerRe: PostThreadMessage does not work sometimes Pin
Randor 23-Sep-11 15:04
professional Randor 23-Sep-11 15:04 
GeneralRe: PostThreadMessage does not work sometimes Pin
rahul.kulshreshtha23-Sep-11 21:38
rahul.kulshreshtha23-Sep-11 21:38 
QuestionHigh CPU usage Pin
john563222-Sep-11 23:32
john563222-Sep-11 23:32 
AnswerRe: High CPU usage Pin
Code-o-mat22-Sep-11 23:57
Code-o-mat22-Sep-11 23:57 
AnswerMessage Removed Pin
23-Sep-11 1:37
rahul.kulshreshtha23-Sep-11 1:37 
GeneralRe: High CPU usage Pin
Erudite_Eric23-Sep-11 2:18
Erudite_Eric23-Sep-11 2:18 
AnswerRe: High CPU usage Pin
Erudite_Eric23-Sep-11 2:19
Erudite_Eric23-Sep-11 2:19 
AnswerRe: High CPU usage Pin
Chuck O'Toole23-Sep-11 4:59
Chuck O'Toole23-Sep-11 4:59 

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.