Click here to Skip to main content
15,922,155 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCRectTracker Pin
shiv@nand13-Apr-10 1:55
shiv@nand13-Apr-10 1:55 
AnswerRe: CRectTracker Pin
Eugen Podsypalnikov13-Apr-10 3:00
Eugen Podsypalnikov13-Apr-10 3:00 
QuestionMFC Thread queue size Pin
ajmalsiddiqi12-Apr-10 23:42
ajmalsiddiqi12-Apr-10 23:42 
QuestionRe: MFC Thread queue size Pin
David Crow13-Apr-10 2:52
David Crow13-Apr-10 2:52 
AnswerRe: MFC Thread queue size Pin
ajmalsiddiqi13-Apr-10 7:14
ajmalsiddiqi13-Apr-10 7:14 
GeneralRe: MFC Thread queue size Pin
David Crow13-Apr-10 7:32
David Crow13-Apr-10 7:32 
AnswerRe: MFC Thread queue size Pin
Stephen Hewitt13-Apr-10 13:57
Stephen Hewitt13-Apr-10 13:57 
GeneralRe: MFC Thread queue size Pin
ajmalsiddiqi13-Apr-10 21:30
ajmalsiddiqi13-Apr-10 21:30 
Thanks, I am little bit cofused by your reply and unable to understand.There is no issue I just want to add some functionality in my application threads, I just want to check queue length,In my application there are 15 threads one of them is main thread(Controller Thread).All threads are posting theire different customized message and some data in WPARAM/LPARAM using using PostThreadMessage function.

Now the controller thread receive all these messages using PeekMessage(pmsg, NULL, 0, 0, PM_NOREMOVE)from thread mesage queue in its Run method.

// code snap shot
Controller::Run()
{
While(1)
{
while(PeekMessage(pmsg, NULL, 0, 0, PM_NOREMOVE))
{
switch(pmsg ->message)
{
case MSG_RE_START:
// log here pending messages in queue
//do some functionality
case MSG_RE_StOP:
// log here pending messages in queue
//do some functionality

}
PeekMessage(pmsg, NULL, 0, 0, PM_REMOVE);
}

}
}

So when I receive one message I wan to log the pending messages which are still in queue and will be processed in next iteration means in call of PeekMessage.
After Processing one Message I remove it from Thread queue using PeekMessage(pmsg, NULL, 0, 0, PM_REMOVE)

So can I get the queue status , how many number of messages are in thread queue or queue length.?
ajmalsiddiqui

GeneralRe: MFC Thread queue size Pin
Stephen Hewitt14-Apr-10 1:18
Stephen Hewitt14-Apr-10 1:18 
GeneralRe: MFC Thread queue size Pin
ajmalsiddiqi14-Apr-10 2:10
ajmalsiddiqi14-Apr-10 2:10 
GeneralRe: MFC Thread queue size Pin
Stephen Hewitt14-Apr-10 2:48
Stephen Hewitt14-Apr-10 2:48 
GeneralRe: MFC Thread queue size Pin
ajmalsiddiqi14-Apr-10 3:35
ajmalsiddiqi14-Apr-10 3:35 
QuestionCustom dropdown for CComboBox [modified] Pin
SpaceMonkey197012-Apr-10 21:25
SpaceMonkey197012-Apr-10 21:25 
AnswerRe: Custom dropdown for CComboBox Pin
Iain Clarke, Warrior Programmer12-Apr-10 22:57
Iain Clarke, Warrior Programmer12-Apr-10 22:57 
GeneralRe: Custom dropdown for CComboBox Pin
SpaceMonkey197013-Apr-10 0:47
SpaceMonkey197013-Apr-10 0:47 
GeneralRe: Custom dropdown for CComboBox Pin
Iain Clarke, Warrior Programmer13-Apr-10 0:56
Iain Clarke, Warrior Programmer13-Apr-10 0:56 
AnswerRe: Custom dropdown for CComboBox Pin
Code-o-mat13-Apr-10 6:18
Code-o-mat13-Apr-10 6:18 
GeneralRe: Custom dropdown for CComboBox Pin
SpaceMonkey197013-Apr-10 8:49
SpaceMonkey197013-Apr-10 8:49 
GeneralRe: Custom dropdown for CComboBox Pin
Code-o-mat13-Apr-10 9:15
Code-o-mat13-Apr-10 9:15 
QuestionConverting an image into jpeg format Pin
Srivathsa_12-Apr-10 20:57
Srivathsa_12-Apr-10 20:57 
AnswerRe: Converting an image into jpeg format Pin
Vijjuuu.12-Apr-10 21:06
Vijjuuu.12-Apr-10 21:06 
GeneralRe: Converting an image into jpeg format Pin
Iain Clarke, Warrior Programmer12-Apr-10 23:20
Iain Clarke, Warrior Programmer12-Apr-10 23:20 
GeneralRe: Converting an image into jpeg format Pin
CPallini12-Apr-10 23:35
mveCPallini12-Apr-10 23:35 
GeneralRe: Converting an image into jpeg format Pin
Vijjuuu.12-Apr-10 23:40
Vijjuuu.12-Apr-10 23:40 
GeneralRe: Converting an image into jpeg format Pin
CPallini12-Apr-10 23:47
mveCPallini12-Apr-10 23:47 

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.