Click here to Skip to main content
15,888,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help !! Pin
Sreekanth Muralidharan16-May-05 22:38
Sreekanth Muralidharan16-May-05 22:38 
GeneralRe: Help !! Pin
ThatsAlok16-May-05 22:52
ThatsAlok16-May-05 22:52 
GeneralRe: Help !! Pin
Sreekanth Muralidharan16-May-05 23:28
Sreekanth Muralidharan16-May-05 23:28 
GeneralRe: Help !! Pin
ThatsAlok17-May-05 0:29
ThatsAlok17-May-05 0:29 
GeneralRe: Help !! Pin
Sreekanth Muralidharan18-May-05 17:59
Sreekanth Muralidharan18-May-05 17:59 
GeneralRe: Help !! Pin
ThatsAlok18-May-05 18:12
ThatsAlok18-May-05 18:12 
GeneralRe: Help !! Pin
Sreekanth Muralidharan18-May-05 18:15
Sreekanth Muralidharan18-May-05 18:15 
GeneralRe: Help !! Pin
ThatsAlok18-May-05 18:42
ThatsAlok18-May-05 18:42 
HI Sreekanth!
here a small piece of code that will help you in PAUSING you application
CYourDlg 
{
 public:
  --- your function---
  --- your variable---
 BOOL isStop;
 BOOL isPause
}

// let this is function that open recording thread 
// for you
CYourDlg::OpenThread()
{
  /// as We Playing no need to set Stop and Pause var
  this->isStop=FALSE;
  this->isPause=FALSE;

  // Start thread and send current class pointer as   
  // parameter
  AfxBeginThread(&yourWorkerThread,reinterpret_cast<LPVOID>(this));
}

UINT yourWorkerThread(LPVOID lpParam)
{

  // Cast it back to original 
  CYourDlg *m_Dlg=( CYourDlg *)lpParam;

  // Now Main Loop will check condition for
  // STOP
  while(!m_Dlg->isStop)
  {

  
   // Sub Loop for Pause!
    while(m_Dlg->isPause)
      Sleep(20);

   ----Do you reading writing blah blah-------

  }

return 0;
}


Tthis is just sample logic, you can use waitable Timer to get more accurate result!



"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow


cheers,
Alok Gupta
GeneralRe: Help !! Pin
Sreekanth Muralidharan18-May-05 19:19
Sreekanth Muralidharan18-May-05 19:19 
GeneralRe: Help !! Pin
ThatsAlok18-May-05 19:25
ThatsAlok18-May-05 19:25 
GeneralRe: Help !! Pin
Sreekanth Muralidharan18-May-05 19:28
Sreekanth Muralidharan18-May-05 19:28 
GeneralRe: Help !! Pin
Sreekanth Muralidharan18-May-05 23:14
Sreekanth Muralidharan18-May-05 23:14 
GeneralRe: Help !! Pin
ThatsAlok18-May-05 23:29
ThatsAlok18-May-05 23:29 
GeneralRe: Help !! Pin
Sreekanth Muralidharan19-May-05 17:10
Sreekanth Muralidharan19-May-05 17:10 
GeneralRe: Help !! Pin
ThatsAlok19-May-05 20:44
ThatsAlok19-May-05 20:44 
GeneralRe: Help !! Pin
Sreekanth Muralidharan19-May-05 23:17
Sreekanth Muralidharan19-May-05 23:17 
GeneralRe: Help !! Pin
ThatsAlok19-May-05 23:25
ThatsAlok19-May-05 23:25 
GeneralRe: Help !! Pin
Sreekanth Muralidharan20-May-05 17:27
Sreekanth Muralidharan20-May-05 17:27 
GeneralRe: Help !! Pin
ThatsAlok20-May-05 22:21
ThatsAlok20-May-05 22:21 
GeneralRe: Help !! Pin
Sreekanth Muralidharan22-May-05 17:08
Sreekanth Muralidharan22-May-05 17:08 
GeneralRe: Help !! Pin
ThatsAlok22-May-05 17:49
ThatsAlok22-May-05 17:49 
GeneralRe: Help !! Pin
Sreekanth Muralidharan23-May-05 18:33
Sreekanth Muralidharan23-May-05 18:33 
GeneralRe: Help !! Pin
ThatsAlok23-May-05 18:50
ThatsAlok23-May-05 18:50 
GeneralRe: Help !! Pin
Sreekanth Muralidharan23-May-05 20:31
Sreekanth Muralidharan23-May-05 20:31 
GeneralRe: Help !! Pin
ThatsAlok23-May-05 20:35
ThatsAlok23-May-05 20:35 

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.