Click here to Skip to main content
12,072,067 members (58,436 online)

C / C++ / MFC

 
GeneralRe: Again KeyBoar dll Pin
Trevor Johansen3-Mar-10 20:04
memberTrevor Johansen3-Mar-10 20:04 
QuestionC code in VC Pin
Punima Sen20-Feb-10 6:34
memberPunima Sen20-Feb-10 6:34 
AnswerRe: C code in VC Pin
DavidCrow20-Feb-10 7:12
mvpDavidCrow20-Feb-10 7:12 
AnswerRe: C code in VC Pin
CPallini20-Feb-10 12:15
mvpCPallini20-Feb-10 12:15 
AnswerRe: C code in VC Pin
Rajesh R Subramanian21-Feb-10 2:02
mvpRajesh R Subramanian21-Feb-10 2:02 
Questionmfc receive sms [modified] Pin
saneevil20-Feb-10 4:16
membersaneevil20-Feb-10 4:16 
AnswerRe: mfc receive sms Pin
CPallini20-Feb-10 5:16
mvpCPallini20-Feb-10 5:16 
QuestionMore help sought for my Monitoring and Controlling Worker Thread article... Pin
Ben Aldhouse20-Feb-10 3:11
memberBen Aldhouse20-Feb-10 3: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 4:24
memberStephen Hewitt20-Feb-10 4:24 
GeneralRe: More help sought for my Monitoring and Controlling Worker Thread article... Pin
Ben Aldhouse20-Feb-10 22:35
memberBen Aldhouse20-Feb-10 22:35 
AnswerRe: More help sought for my Monitoring and Controlling Worker Thread article... Pin
Randor 20-Feb-10 12:53
member Randor 20-Feb-10 12:53 
GeneralRe: More help sought for my Monitoring and Controlling Worker Thread article... Pin
Ben Aldhouse20-Feb-10 22:43
memberBen Aldhouse20-Feb-10 22:43 
GeneralRe: More help sought for my Monitoring and Controlling Worker Thread article... Pin
Ben Aldhouse26-Feb-10 12:49
memberBen Aldhouse26-Feb-10 12:49 
GeneralRe: More help sought for my Monitoring and Controlling Worker Thread article... Pin
Ben Aldhouse13-Apr-10 11:38
memberBen Aldhouse13-Apr-10 11:38 
Questionhow do i send a long sms exceeding 160 characters using AT command? Pin
Le@rner20-Feb-10 2:03
memberLe@rner20-Feb-10 2:03 
AnswerRe: how do i send a long sms exceeding 160 characters using AT command? Pin
Richard MacCutchan20-Feb-10 5:05
mvpRichard MacCutchan20-Feb-10 5:05 
QuestionHow Do display a Name in place of SMS sender phone no using AT Commands? Pin
Le@rner20-Feb-10 0:43
memberLe@rner20-Feb-10 0:43 
AnswerRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Garth J Lancaster20-Feb-10 1:10
memberGarth J Lancaster20-Feb-10 1:10 
AnswerRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Richard MacCutchan20-Feb-10 1:37
mvpRichard MacCutchan20-Feb-10 1:37 
QuestionRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Maximilien20-Feb-10 2:48
memberMaximilien20-Feb-10 2:48 
AnswerRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Le@rner20-Feb-10 2:53
memberLe@rner20-Feb-10 2:53 
GeneralRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Richard MacCutchan20-Feb-10 5:02
mvpRichard MacCutchan20-Feb-10 5:02 
GeneralRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Maximilien20-Feb-10 5:26
memberMaximilien20-Feb-10 5:26 
GeneralRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
Le@rner21-Feb-10 19:20
memberLe@rner21-Feb-10 19:20 
GeneralRe: How Do display a Name in place of SMS sender phone no using AT Commands? Pin
m_k_b_h14-Jul-11 1:02
memberm_k_b_h14-Jul-11 1: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 | Mobile
Web04 | 2.8.160208.1 | Last Updated 10 Feb 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid