View unanswered posts | View active topics It is currently Mon Sep 22, 2014 12:11 pm



Reply to topic  [ 3 posts ] 
 Wait Window TimeOut X seconds 
Author Message
User avatar

Joined: Tue Aug 23, 2005 7:01 am
Posts: 70
Post Wait Window TimeOut X seconds
Hello,

I would like to program under C++ a similar : MessageBox(NULL, "Error during initialization of WinIo.", "Error!", MB_ICONEXCLAMATION | MB_OK); but instead of hitting a keyboard to continue processing I want a TimeOut of 2 seconds window display without pressing any key
Any idea how to do it? Please, Thanks


Sat Jan 21, 2012 6:52 pm
Profile
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 291
Post Re: Wait Window TimeOut X seconds
Just start a timer and when you get a WM_TIMER message, kill the timer, or whatever you need to do and then fire this event off with the message box, OR insert a user message into the event queue, and let the winproc dispatch the message to your event handler. But, bottom line, just use a normal windows timer and have it generate a WM_TIMER event in 2 seconds. Simple, windows stuff.

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Kind of thing is all you need.

Read a good windows book cover to cover like Petzolds or similar.

Andre'


Mon Feb 06, 2012 8:36 am
Profile WWW
User avatar

Joined: Tue Aug 23, 2005 7:01 am
Posts: 70
Post Re: Wait Window TimeOut X seconds
Oh, well, that is how windows OS is design, it sends messages, I ‘m surprised that I did thought about that, Thank you Sir!


Mon Feb 06, 2012 4:12 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.