Click here to Skip to main content
13,589,862 members

C / C++ / MFC

 
GeneralRe: Again KeyBoar dll Pin
Trevor Johansen3-Mar-10 19:04
memberTrevor Johansen3-Mar-10 19:04 
QuestionC code in VC Pin
Punima Sen20-Feb-10 5:34
memberPunima Sen20-Feb-10 5:34 
AnswerRe: C code in VC Pin
DavidCrow20-Feb-10 6:12
mvpDavidCrow20-Feb-10 6:12 
AnswerRe: C code in VC Pin
CPallini20-Feb-10 11:15
mvpCPallini20-Feb-10 11:15 
AnswerRe: C code in VC Pin
Rajesh R Subramanian21-Feb-10 1:02
mvpRajesh R Subramanian21-Feb-10 1:02 
Questionmfc receive sms [modified] Pin
saneevil20-Feb-10 3:16
membersaneevil20-Feb-10 3:16 
AnswerRe: mfc receive sms Pin
CPallini20-Feb-10 4:16
mvpCPallini20-Feb-10 4:16 
QuestionMore help sought for my Monitoring and Controlling Worker Thread article... Pin
Ben Aldhouse20-Feb-10 2:11
memberBen Aldhouse20-Feb-10 2:11 
I'm currently working on a rewrite of my most recent article Monitoring and Controlling a Recursing Function in a Worker Thread and would love to know your opinions on the fowing block of code I use in the worker thread...

do {
    Sleep(1);
}while (pMyView->m_strCurFile != pMyView->m_strConfirm);


This has the effect of slowing things up enough so that the main thread can display a gratifyingly fast moving display of files flash past in the text box on the dialog. I was going to say that, without it, the dialag doesn;t display any file information until the thread has stopped running but I've just tried it and, in fact, with out it I get an Access Violation error!

It doesn't seem like a very nice bit of code to me. Could it be replaced with WaitForSingleObject or something, somehow?

Interestingly, if I try and speed the thread up by putting in an extra mod test so that it only runs every tenth loop...

if (n % 10 ==0){
            do {
                Sleep(1);
            }while (pMyView->m_strCurFile != pMyView->m_strConfirm);
}


...this also causes problems...
AnswerRe: More help sought for my Monitoring and Controlling Worker Thread article... Pin
Stephen Hewitt20-Feb-10 3:24
memberStephen Hewitt20-Feb-10 3:24 
GeneralRe: More help sought for my Monitoring and Controlling Worker Thread article... Pin
Ben Aldhouse20-Feb-10 21:35
memberBen Aldhouse20-Feb-10 21:35 
AnswerRe: More help sought for my Monitoring and Controlling Worker Thread article... Pin
Randor 20-Feb-10 11:53
member Randor 20-Feb-10 11:53 
GeneralRe: More help sought for my Monitoring and Controlling Worker Thread article... Pin
Ben Aldhouse20-Feb-10 21:43
memberBen Aldhouse20-Feb-10 21:43 
GeneralRe: More help sought for my Monitoring and Controlling Worker Thread article... Pin
Ben Aldhouse26-Feb-10 11:49
memberBen Aldhouse26-Feb-10 11:49 
GeneralRe: More help sought for my Monitoring and Controlling Worker Thread article... Pin
Ben Aldhouse13-Apr-10 10:38
memberBen Aldhouse13-Apr-10 10:38 
Questionhow do i send a long sms exceeding 160 characters using AT command? Pin
Le@rner20-Feb-10 1:03
memberLe@rner20-Feb-10 1:03 
AnswerRe: how do i send a long sms exceeding 160 characters using AT command? Pin
Richard MacCutchan20-Feb-10 4:05
mvpRichard MacCutchan20-Feb-10 4:05 
QuestionHow Do display a Name in place of SMS sender phone no using AT Commands? Pin
Le@rner19-Feb-10 23:43
memberLe@rner19-Feb-10 23:43 
AnswerRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Garth J Lancaster20-Feb-10 0:10
memberGarth J Lancaster20-Feb-10 0:10 
AnswerRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Richard MacCutchan20-Feb-10 0:37
mvpRichard MacCutchan20-Feb-10 0:37 
QuestionRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Maximilien20-Feb-10 1:48
memberMaximilien20-Feb-10 1:48 
AnswerRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Le@rner20-Feb-10 1:53
memberLe@rner20-Feb-10 1:53 
GeneralRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Richard MacCutchan20-Feb-10 4:02
mvpRichard MacCutchan20-Feb-10 4:02 
GeneralRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Maximilien20-Feb-10 4:26
memberMaximilien20-Feb-10 4:26 
GeneralRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Le@rner21-Feb-10 18:20
memberLe@rner21-Feb-10 18:20 
GeneralRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
m_k_b_h14-Jul-11 0:02
memberm_k_b_h14-Jul-11 0:02 

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.


Advertise | Privacy | Cookies | Terms of Service
Web04 | 2.8.180618.1 | Last Updated 18 Jun 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid