Click here to Skip to main content
15,905,238 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Windos/Cygwin Pin
Anka_Ame18-Apr-07 2:55
Anka_Ame18-Apr-07 2:55 
GeneralRe: Windos/Cygwin Pin
Maximilien18-Apr-07 3:35
Maximilien18-Apr-07 3:35 
GeneralRe: Windos/Cygwin Pin
markkuk18-Apr-07 4:16
markkuk18-Apr-07 4:16 
GeneralRe: Windos/Cygwin Pin
Anka_Ame18-Apr-07 5:37
Anka_Ame18-Apr-07 5:37 
AnswerRe: Windos/Cygwin Pin
malaugh18-Apr-07 9:11
malaugh18-Apr-07 9:11 
Questionquick help with timer/time (MFC dialog app) Pin
ldsdbomber18-Apr-07 0:28
ldsdbomber18-Apr-07 0:28 
AnswerRe: quick help with timer/time (MFC dialog app) Pin
Arman S.18-Apr-07 1:04
Arman S.18-Apr-07 1:04 
AnswerRe: quick help with timer/time (MFC dialog app) Pin
baerten18-Apr-07 1:09
baerten18-Apr-07 1:09 
Hi,

i try to help you...

In your view/dialog/frame class you declare a
<br />
UINT_PTR MyTimer


and a Handler to the Event :

afx_msg void OnTimer(UINT_PTR nIDEvent);

in the .cpp

you link the Event with the handler in the MESSAGE_MAP :

ON_WM_TIMER()

your code for the handler :
<br />
void xxx::OnTimer(UINT_PTR nIDEvent)<br />
{<br />
  if(nIDEvent == 5)<br />
  {<br />
     //do work<br />
     KillTimer(MyTimer); // kills the timer<br />
  }<br />
}


and a function which starts/initializes your timer :

void xxx::InitMyTimer(void)<br />
{<br />
  MyTimer = SetTimer(5/*ID*/,100/*milliseconds*/,NULL);<br />
}


Good luck Smile | :)
AnswerRe: quick help with timer/time (MFC dialog app) Pin
David Crow18-Apr-07 3:32
David Crow18-Apr-07 3:32 
QuestionDDX control Pin
deeps_cute18-Apr-07 0:22
deeps_cute18-Apr-07 0:22 
AnswerRe: DDX control Pin
baerten18-Apr-07 1:00
baerten18-Apr-07 1:00 
GeneralRe: DDX control Pin
deeps_cute18-Apr-07 1:10
deeps_cute18-Apr-07 1:10 
GeneralRe: DDX control Pin
baerten18-Apr-07 1:21
baerten18-Apr-07 1:21 
GeneralRe: DDX control Pin
deeps_cute18-Apr-07 1:25
deeps_cute18-Apr-07 1:25 
GeneralRe: DDX control Pin
baerten18-Apr-07 1:40
baerten18-Apr-07 1:40 
Questionabout CPU Usage Pin
mt_samiei18-Apr-07 0:03
mt_samiei18-Apr-07 0:03 
AnswerRe: about CPU Usage Pin
Paresh Chitte18-Apr-07 0:17
Paresh Chitte18-Apr-07 0:17 
GeneralRe: about CPU Usage Pin
mt_samiei18-Apr-07 0:37
mt_samiei18-Apr-07 0:37 
GeneralRe: about CPU Usage Pin
David Crow18-Apr-07 3:38
David Crow18-Apr-07 3:38 
AnswerRe: about CPU Usage Pin
Mark Salsbery18-Apr-07 6:14
Mark Salsbery18-Apr-07 6:14 
GeneralRe: about CPU Usage Pin
Roger Stoltz18-Apr-07 6:26
Roger Stoltz18-Apr-07 6:26 
GeneralRe: about CPU Usage Pin
Mark Salsbery18-Apr-07 6:35
Mark Salsbery18-Apr-07 6:35 
QuestionBitmap [modified] Pin
Vijayan.S17-Apr-07 23:49
Vijayan.S17-Apr-07 23:49 
AnswerRe: Bitmap Pin
Paresh Chitte18-Apr-07 0:15
Paresh Chitte18-Apr-07 0:15 
AnswerRe: Bitmap Pin
Hamid_RT18-Apr-07 1:30
Hamid_RT18-Apr-07 1:30 

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.