Click here to Skip to main content
15,903,724 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: What is this called? Pin
Mark Salsbery11-Feb-08 9:15
Mark Salsbery11-Feb-08 9:15 
GeneralRe: What is this called? Pin
Waldermort11-Feb-08 9:23
Waldermort11-Feb-08 9:23 
GeneralRe: What is this called? Pin
Mark Salsbery11-Feb-08 9:28
Mark Salsbery11-Feb-08 9:28 
GeneralRe: What is this called? Pin
Waldermort11-Feb-08 9:34
Waldermort11-Feb-08 9:34 
GeneralRe: What is this called? Pin
Mark Salsbery11-Feb-08 9:38
Mark Salsbery11-Feb-08 9:38 
AnswerRe: What is this called? Pin
krmed11-Feb-08 10:24
krmed11-Feb-08 10:24 
AnswerRe: What is this called? Pin
Michael Martin11-Feb-08 16:20
professionalMichael Martin11-Feb-08 16:20 
QuestionPostMessage failure. How best to proceed? Pin
Chris Meech11-Feb-08 8:38
Chris Meech11-Feb-08 8:38 
I have a worker thread that is posting a registered message to my UI thread to add data items to a combo box. Under extreme conditions, ie. lots of data items to be added, the PostMessage call fails. My suspicion is that the PostMessage is failing because the message queue is full of unprocessed messages that the worker thread has already posted. Besides doing the following, are there any better ways of doing this.
if ( !PostMessage(m_nRegisteredWndMessage, 0, (LPARAM)pItemData) )
{
	Sleep(250);
	if ( !PostMessage(m_nRegisteredWndMessage, 0, (LPARAM)pItemData) )
	{
		TRACE1("PostMessage has failed for %s\n.", pSecurities->GetSecurityID());
	}
}

Like a PostMessageButYouCanBlockMeIfTheQueueIsFull() call? Smile | :) Thanks.

Chris Meech
I am Canadian. [heard in a local bar]
Donate to help Conquer Cancer[^]

AnswerRe: PostMessage failure. How best to proceed? Pin
Nemanja Trifunovic11-Feb-08 8:50
Nemanja Trifunovic11-Feb-08 8:50 
GeneralRe: PostMessage failure. How best to proceed? Pin
Chris Meech11-Feb-08 9:48
Chris Meech11-Feb-08 9:48 
AnswerRe: PostMessage failure. How best to proceed? Pin
Mark Salsbery11-Feb-08 9:11
Mark Salsbery11-Feb-08 9:11 
GeneralRe: PostMessage failure. How best to proceed? Pin
Chris Meech11-Feb-08 9:53
Chris Meech11-Feb-08 9:53 
GeneralRe: PostMessage failure. How best to proceed? Pin
Cedric Moonen11-Feb-08 20:24
Cedric Moonen11-Feb-08 20:24 
GeneralRe: PostMessage failure. How best to proceed? Pin
Mark Salsbery12-Feb-08 5:32
Mark Salsbery12-Feb-08 5:32 
QuestionAuto-byte-swapping that can be used in a union [modified] Pin
ClementsDan11-Feb-08 6:56
ClementsDan11-Feb-08 6:56 
GeneralRe: Auto-byte-swapping that can be used in a union [modified] Pin
Mark Salsbery11-Feb-08 7:29
Mark Salsbery11-Feb-08 7:29 
GeneralRe: Auto-byte-swapping that can be used in a union Pin
led mike11-Feb-08 7:47
led mike11-Feb-08 7:47 
GeneralRe: Auto-byte-swapping that can be used in a union Pin
Mark Salsbery11-Feb-08 7:52
Mark Salsbery11-Feb-08 7:52 
GeneralDb query failing in MFC Pin
krishnan.s11-Feb-08 4:51
krishnan.s11-Feb-08 4:51 
GeneralAnd the errors are? Pin
jhwurmbach11-Feb-08 4:56
jhwurmbach11-Feb-08 4:56 
GeneralRe: And the errors are? Pin
krishnan.s11-Feb-08 4:59
krishnan.s11-Feb-08 4:59 
GeneralRe: And the errors are? Pin
krishnan.s11-Feb-08 5:00
krishnan.s11-Feb-08 5:00 
GeneralRe: And the errors are? Pin
jhwurmbach11-Feb-08 5:07
jhwurmbach11-Feb-08 5:07 
GeneralRe: Db query failing in MFC Pin
led mike11-Feb-08 5:08
led mike11-Feb-08 5:08 
GeneralRe: Db query failing in MFC Pin
krishnan.s11-Feb-08 17:33
krishnan.s11-Feb-08 17:33 

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.