Click here to Skip to main content
15,889,096 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: error LNK2005: Pin
Benjamin Bruno11-Dec-09 20:10
Benjamin Bruno11-Dec-09 20:10 
GeneralRe: error LNK2005: Pin
KarstenK13-Dec-09 21:26
mveKarstenK13-Dec-09 21:26 
QuestionChild Dialog gets hidden behind activex control [modified] Pin
indra27110-Dec-09 23:27
indra27110-Dec-09 23:27 
AnswerRe: Child Dialog gets hidden behind activex control Pin
Richard MacCutchan11-Dec-09 0:52
mveRichard MacCutchan11-Dec-09 0:52 
GeneralRe: Child Dialog gets hidden behind activex control Pin
indra27111-Dec-09 4:55
indra27111-Dec-09 4:55 
GeneralRe: Child Dialog gets hidden behind activex control Pin
Abhi Lahare11-Dec-09 5:26
Abhi Lahare11-Dec-09 5:26 
GeneralRe: Child Dialog gets hidden behind activex control Pin
Richard MacCutchan11-Dec-09 5:29
mveRichard MacCutchan11-Dec-09 5:29 
Questionmaking an non-blocking call in VC++ Pin
hrishiS10-Dec-09 23:03
hrishiS10-Dec-09 23:03 
Hi to All,

I have got a message Queue.
A thread function which should be able to process the queue, (that is if any data is available, then do some processing)....otherwise do nothing..

Now, my problem is...I cannot keep a while loop (inside the thread) and keep checking for the queue if there is any element in the queue...because it will consume lots of CPU processing power....Instead, I found the best method is to ......have a method, say getq()...which can be a blocking call...ie, inside my thread while loop , I should be able to do something like

threadFunction()
{
while(1)
{
   if(getq() != 0)
   {
   }
}
}

so the functionality will be...it will go inside(if block)only when there is an element in the queue...otherwise wait there...

Now, I need help/hints to make the getq function...(which will return any value only if there is any elemt in the queue...otherwise it will not return the control...It should keep waiting till any element is there in queue )

thanks in advance

-----------------------------
I am a beginner

AnswerRe: making an non-blocking call in VC++ Pin
CPallini10-Dec-09 23:15
mveCPallini10-Dec-09 23:15 
AnswerRe: making an non-blocking call in VC++ Pin
Cedric Moonen10-Dec-09 23:21
Cedric Moonen10-Dec-09 23:21 
AnswerRe: making an non-blocking call in VC++ Pin
Rajesh R Subramanian10-Dec-09 23:47
professionalRajesh R Subramanian10-Dec-09 23:47 
AnswerRe: making an non-blocking call in VC++ Pin
softwaremonkey11-Dec-09 4:48
softwaremonkey11-Dec-09 4:48 
QuestionCatching WM_POWERBROADCAST message Pin
Still learning how to code10-Dec-09 22:57
Still learning how to code10-Dec-09 22:57 
AnswerRe: Catching WM_POWERBROADCAST message Pin
KarstenK11-Dec-09 1:04
mveKarstenK11-Dec-09 1:04 
GeneralRe: Catching WM_POWERBROADCAST message Pin
Still learning how to code11-Dec-09 1:51
Still learning how to code11-Dec-09 1:51 
GeneralRe: Catching WM_POWERBROADCAST message Pin
KarstenK11-Dec-09 2:04
mveKarstenK11-Dec-09 2:04 
GeneralRe: Catching WM_POWERBROADCAST message Pin
Still learning how to code11-Dec-09 10:20
Still learning how to code11-Dec-09 10:20 
AnswerRe: Catching WM_POWERBROADCAST message ---------------- *** SOLVED *** Pin
Still learning how to code13-Dec-09 12:01
Still learning how to code13-Dec-09 12:01 
QuestionMultithreading in vc++ Pin
mathy10-Dec-09 20:41
mathy10-Dec-09 20:41 
AnswerRe: Multithreading in vc++ Pin
Cedric Moonen10-Dec-09 20:47
Cedric Moonen10-Dec-09 20:47 
AnswerRe: Multithreading in vc++ Pin
CPallini10-Dec-09 21:04
mveCPallini10-Dec-09 21:04 
AnswerRe: Multithreading in vc++ Pin
Rajesh R Subramanian10-Dec-09 21:06
professionalRajesh R Subramanian10-Dec-09 21:06 
QuestionDiff Between ShowWindow and End Dialog Pin
002comp10-Dec-09 20:36
002comp10-Dec-09 20:36 
AnswerRe: Diff Between ShowWindow and End Dialog Pin
Cedric Moonen10-Dec-09 20:44
Cedric Moonen10-Dec-09 20:44 
AnswerRe: Diff Between ShowWindow and End Dialog Pin
CPallini10-Dec-09 20:55
mveCPallini10-Dec-09 20:55 

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.