Click here to Skip to main content
15,923,852 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Project type Pin
_AnsHUMAN_ 16-Jul-07 23:00
_AnsHUMAN_ 16-Jul-07 23:00 
GeneralRe: Project type Pin
josip cagalj17-Jul-07 1:20
josip cagalj17-Jul-07 1:20 
QuestionAdding Chart object into Crystal Reports Pin
ksandy4516-Jul-07 22:11
ksandy4516-Jul-07 22:11 
QuestionHow to make a window modal? Pin
Navaid Alam16-Jul-07 21:39
Navaid Alam16-Jul-07 21:39 
AnswerRe: How to make a window modal? Pin
Mark Salsbery17-Jul-07 6:08
Mark Salsbery17-Jul-07 6:08 
AnswerRe: How to make a window modal? Pin
DevMentor.org17-Jul-07 7:02
DevMentor.org17-Jul-07 7:02 
GeneralRe: How to make a window modal? Pin
Navaid Alam18-Jul-07 0:55
Navaid Alam18-Jul-07 0:55 
QuestionUsing timers Pin
minkowski16-Jul-07 21:27
minkowski16-Jul-07 21:27 
Hi,

I am a bit confused on how to make and use a timer. Currently I have
<br />
void MyClass::func()<br />
{<br />
<br />
<br />
            UINT m_Timer = SetTimer(1, 2000, 0);<br />
            CMainFrame *pFrame = (CMainFrame *)AfxGetMainWnd();<br />
	            ASSERT(pFrame != NULL);<br />
            pFrame->OnTimer(1);<br />
<br />
}<br />

where
<br />
void CMainFrame::OnTimer(UINT nIDEvent) <br />
{<br />
	<br />
	FlashScreen();<br />
	CWnd::OnTimer(nIDEvent);<br />
<br />
}<br />
<br />

I wish the screen to blink every 2 seconds. What I dont understand in the examples I have seen is that OnTimer is not explicitly called. So if you have 2 timers how does each timer know which OnTimer to call? I know that the 1st parameter in the SetTimer function is the nIDEvent which is supposed to be assciociated with the OnTimer() to uniquely identify the timer. I hope that you could provide me with an example where OnTimer is invoked? Thanks!
AnswerRe: Using timers Pin
Navaid Alam16-Jul-07 21:46
Navaid Alam16-Jul-07 21:46 
GeneralRe: Using timers Pin
minkowski16-Jul-07 22:01
minkowski16-Jul-07 22:01 
GeneralRe: Using timers Pin
Navaid Alam16-Jul-07 23:35
Navaid Alam16-Jul-07 23:35 
GeneralRe: Using timers Pin
minkowski17-Jul-07 0:25
minkowski17-Jul-07 0:25 
AnswerRe: Using timers Pin
Cedric Moonen16-Jul-07 21:49
Cedric Moonen16-Jul-07 21:49 
GeneralRe: Using timers Pin
minkowski16-Jul-07 22:03
minkowski16-Jul-07 22:03 
GeneralRe: Using timers Pin
minkowski16-Jul-07 22:17
minkowski16-Jul-07 22:17 
AnswerRe: Using timers Pin
Abhijeet Pathak16-Jul-07 22:18
Abhijeet Pathak16-Jul-07 22:18 
QuestionWhere can i find Class Wizard in VS2005 Pin
yaminisridaran16-Jul-07 21:24
yaminisridaran16-Jul-07 21:24 
AnswerRe: Where can i find Class Wizard in VS2005 Pin
prasad_som16-Jul-07 22:21
prasad_som16-Jul-07 22:21 
GeneralRe: Where can i find Class Wizard in VS2005 Pin
yaminisridaran16-Jul-07 23:11
yaminisridaran16-Jul-07 23:11 
AnswerRe: Where can i find Class Wizard in VS2005 Pin
prasad_som16-Jul-07 23:51
prasad_som16-Jul-07 23:51 
GeneralRe: Where can i find Class Wizard in VS2005 Pin
yaminisridaran16-Jul-07 23:55
yaminisridaran16-Jul-07 23:55 
Questionboost::lexical_cast Pin
User 58385216-Jul-07 19:56
User 58385216-Jul-07 19:56 
AnswerRe: boost::lexical_cast Pin
Hans Dietrich16-Jul-07 23:52
mentorHans Dietrich16-Jul-07 23:52 
GeneralRe: boost::lexical_cast Pin
Nemanja Trifunovic17-Jul-07 1:49
Nemanja Trifunovic17-Jul-07 1:49 
GeneralRe: boost::lexical_cast Pin
James R. Twine17-Jul-07 3:38
James R. Twine17-Jul-07 3:38 

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.