[Win32 API] Creating timed messagebox (disappears after N sec.)

Started by
8 comments, last by Rydinare 16 years, 2 months ago
How do you create a messagebox, that auto-disappears after, say, 5 seconds? (and how do you make the "Ok" button disappear?) Any workaround? I need to make something like the Alert box in J2ME. It just displays a window with a text. (I'm going to use it for something like: "connecting" status message, etc.) Thanks!
Advertisement
It is a Usenet (very) FAQ.
ask on win32 api newsgroup :
comp.os.ms-windows.programmer.win32


[Edited by - george135 on March 6, 2008 8:12:29 AM]
sorry but i don't know how to use usenet...:(
alright i just created another dialog box instead and made it look like a message box (without the OK button).

thanks anyway.
You could make your own window with a wndproc function that closed itself after 5 seconds.

You will have to create a class and register it then create the window.
Quote:Original post by helloworld123
sorry but i don't know how to use usenet...:(


???
Usenet exists for 30 years and all Win32 api questions have been answered since!
Timed messagebox is a classic one.
You access with Google Groups or Outlook Express or etc...

@george135 - please stop sending me private messages (it's becoming spam-like already) about going to that usenet link. as i've said before, i don't know how to use usenet. and i've solved my problem already. you are starting to annoy me.

really? all win32 api questions have been answered? my question is a classic? why couldn't you help copy/paste the solution here then?

oh...right...you want me to go there...
A little off topic here, but I fail to see how usernet would be any better help than the GameDev.Net community we have here.

And to the OP: Yeah, the best way to solve the problem is excactly what you've done (Assuming you're using the DialogBox or DialogBoxParam function to create the dialog).
The MessageBox function is just a simple helper function, so it doesn't have much in the way of customisation available.
Contrary to popular belief, usenet is not for researching problems. It's for when you are feeling good about yourself and you need to have random morons call you a f**kin idiot in order to bring yourself back to Earth. See: sci.physics.relativity
Quote:Original post by taby
Contrary to popular belief, usenet is not for researching problems. It's for when you are feeling good about yourself and you need to have random morons call you a f**kin idiot in order to bring yourself back to Earth. See: sci.physics.relativity


QFT.

Seriously, the last time I asked a question on usenet, I then followed up with another question because the author's response was a little vague. I was flamed with stuff like "why don't you read what I tell you!!!!".

I was tempted to respond again and suggest anger management classes. [smile]

This topic is closed to new replies.

Advertisement