...

View Full Version : C++ time function



alibaloch1
11-04-2007, 01:37 PM
Hi guyz I am very new to C++ I want some help the question is
What will be the code if I want the opened window to close after 3 seconds ?

can anybody help me out of this....Thanx :)

Dunna
11-06-2007, 04:32 AM
pseudo code:


SetTimer(0, NULL, 3000);

^ unique timer number
^ timer proc (not needed)
^ callback time (3 seconds in milliseconds)

Then in your message loop:

if (msg.message == WM_TIMER)
CloseWindow(hWnd);



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum